agregado puntos de informacion
agregado tabla estadisticas
This commit is contained in:
@@ -72,6 +72,9 @@
|
|||||||
<li id="liMS" class="nav-item">
|
<li id="liMS" class="nav-item">
|
||||||
<NavLink class="nav-link" href="CalculoCDCI">Calculo CD+CI</NavLink>
|
<NavLink class="nav-link" href="CalculoCDCI">Calculo CD+CI</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
<li id="liMS" class="nav-item">
|
||||||
|
<NavLink class="nav-link" href="PuntosInfo">Puntos de información</NavLink>
|
||||||
|
</li>
|
||||||
<li id="liMS" class="nav-item">
|
<li id="liMS" class="nav-item">
|
||||||
<NavLink class="nav-link" href="Manuales">Manuales</NavLink>
|
<NavLink class="nav-link" href="Manuales">Manuales</NavLink>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -67,6 +67,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12 d-flex align-items-center justify-content-center colorEMenu dive">
|
||||||
|
<a href="PuntosInfo">
|
||||||
|
<div>
|
||||||
|
<h4 class="text-center">Puntos de información</h4>
|
||||||
|
@* <p style="text-align: center;">Revise sus simulaciones creadas anteriormente</p> *@
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
@page "/PuntosInfo"
|
||||||
|
|
||||||
|
@inject NavigationManager Navigation
|
||||||
|
@layout ConfiguracionLayout
|
||||||
|
@using BlazorBootstrap
|
||||||
|
@using System.Globalization
|
||||||
|
@using bdHerramientaCACOA.db
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="container-fluid pt-3">
|
||||||
|
<Tabs>
|
||||||
|
<Tab Title="Información Herramienta CASA" Active>
|
||||||
|
<Content>
|
||||||
|
<div class="CajaTab p-2">
|
||||||
|
<HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosHerraCASAConf></HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosHerraCASAConf>
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
|
</Tab>
|
||||||
|
|
||||||
|
<Tab Title="Información Licitación CASA">
|
||||||
|
<Content>
|
||||||
|
<div class="CajaTab p-2">
|
||||||
|
<HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosLicitacionCASAConf></HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosLicitacionCASAConf>
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
|
</Tab>
|
||||||
|
|
||||||
|
<Tab Title="Información Herramienta URBAN">
|
||||||
|
<Content>
|
||||||
|
<div class="CajaTab p-2">
|
||||||
|
<HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosHerraURBANConf></HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosHerraURBANConf>
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
|
</Tab>
|
||||||
|
|
||||||
|
<Tab Title="Información Licitación URBAN">
|
||||||
|
<Content>
|
||||||
|
<div class="CajaTab p-2">
|
||||||
|
<HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosLicitacionURBANConf></HerramientaCASA.Components.Pages.ConfiguracionPages.PuntosInfoTabs.PuntosLicitacionURBANConf>
|
||||||
|
</div>
|
||||||
|
</Content>
|
||||||
|
</Tab>
|
||||||
|
</Tabs>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
@inject NavigationManager Navigation
|
||||||
|
@layout ConfiguracionLayout
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@using BlazorBootstrap
|
||||||
|
@using System.Globalization
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using bdHerramientaCACOA.db
|
||||||
|
|
||||||
|
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||||
|
|
||||||
|
<EditForm EditContext="@editContext" OnValidSubmit="guardarFormulario" OnInvalidSubmit="@MostrarErrores" FormName="PuntoInfoForm">
|
||||||
|
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||||
|
<Modal @ref="popupGestionDatos" title="@tituloPopup" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||||
|
<BodyTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Título:</label>
|
||||||
|
<InputText MaxLength="60" @bind-Value="TituloPunto" @oninput="e => ValidarYActualizar(e, nameof(TituloPunto))" class="inputForm"></InputText>
|
||||||
|
</div>
|
||||||
|
<div class="validation-message">@GetExternalValidationMessage(nameof(TituloPunto))</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Descripción:</label>
|
||||||
|
<TextAreaInput Style="height:220px; max-height:220px" MaxLength="400" @bind-Value="@DescripcionPunto" Rows="3" TextAlignment="Alignment.Start" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</BodyTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupGestionDatos">Cerrar</Button>
|
||||||
|
<Button Type="ButtonType.Submit" Color="ButtonColor.Primary">@("Modificar")</Button>
|
||||||
|
</FooterTemplate>
|
||||||
|
</Modal>
|
||||||
|
</EditForm>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Grid TItem="puntosinformacion"
|
||||||
|
Class="tablaCACOA table"
|
||||||
|
Data="listadoPuntosInfo"
|
||||||
|
AllowFiltering="false"
|
||||||
|
PageSize="10"
|
||||||
|
FixedHeader="true"
|
||||||
|
Height="750"
|
||||||
|
Unit="Unit.Px"
|
||||||
|
EmptyText="No hay registros."
|
||||||
|
PageSizeSelectorVisible="false"
|
||||||
|
Responsive="true">
|
||||||
|
<GridColumns>
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" Class="columna20Ancho" HeaderText="Título">
|
||||||
|
<span>@context.Titulo</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" HeaderText="Descripción">
|
||||||
|
<span>@context.Descripcion</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" Class="botonesTabla columna3Ancho" HeaderText="">
|
||||||
|
<div class="btnTablasEspaciado">
|
||||||
|
<span @onclick="@(() => abrirPopupGestionDatos(@context, false))" class="btnBorrarGuardar">
|
||||||
|
<Icon CustomIconName="fas fa-edit"></Icon>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
</Grid>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
public List<puntosinformacion> listadoPuntosInfo { get; set; } = new List<puntosinformacion>();
|
||||||
|
|
||||||
|
[SupplyParameterFromForm]
|
||||||
|
private puntosinformacion itemSeleccionado { get; set; } = new puntosinformacion();
|
||||||
|
|
||||||
|
private string tituloPopup = "";
|
||||||
|
public string Filter { get; set; } = "";
|
||||||
|
private Modal popupGestionDatos = default!;
|
||||||
|
|
||||||
|
private string TituloPunto = "";
|
||||||
|
private string DescripcionPunto = "";
|
||||||
|
|
||||||
|
List<ToastMessage> mensajes = new List<ToastMessage>();
|
||||||
|
|
||||||
|
private EditContext? editContext;
|
||||||
|
private ValidationMessageStore? messageStore;
|
||||||
|
public tsHerramientasCACOA bd;
|
||||||
|
|
||||||
|
private int idHerramienta = 31;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||||
|
|
||||||
|
editContext = new EditContext(itemSeleccionado);
|
||||||
|
messageStore = new ValidationMessageStore(editContext);
|
||||||
|
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task abrirPopupGestionDatos(puntosinformacion objeto, bool esNuevo)
|
||||||
|
{
|
||||||
|
itemSeleccionado = objeto;
|
||||||
|
|
||||||
|
TituloPunto = objeto.Titulo;
|
||||||
|
DescripcionPunto = objeto.Descripcion;
|
||||||
|
|
||||||
|
tituloPopup = "Modificar punto información";
|
||||||
|
|
||||||
|
|
||||||
|
await popupGestionDatos.ShowAsync();
|
||||||
|
}
|
||||||
|
private async Task cerrarPopupGestionDatos()
|
||||||
|
{
|
||||||
|
await popupGestionDatos.HideAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarYActualizar(ChangeEventArgs e, string fieldName)
|
||||||
|
{
|
||||||
|
var value = e.Value?.ToString();
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
|
||||||
|
switch (fieldName)
|
||||||
|
{
|
||||||
|
case nameof(TituloPunto):
|
||||||
|
if (!string.IsNullOrEmpty(value))
|
||||||
|
{
|
||||||
|
|
||||||
|
TituloPunto = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TituloPunto = "";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageStore?.Clear(field);
|
||||||
|
if (fieldName == nameof(TituloPunto) && TituloPunto == "")
|
||||||
|
{
|
||||||
|
messageStore?.Add(field, "El título no puede estar vacío.");
|
||||||
|
}
|
||||||
|
editContext?.NotifyValidationStateChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarTodo()
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = TituloPunto }, nameof(TituloPunto));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetExternalValidationMessage(string fieldName)
|
||||||
|
{
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
return messageStore?[field].FirstOrDefault() ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task GestionarDatos(string accion)
|
||||||
|
{
|
||||||
|
switch (accion)
|
||||||
|
{
|
||||||
|
case "update":
|
||||||
|
var puntoObtenido = bd.puntosinformacion.Where(x => x.idPuntosInformacion == itemSeleccionado.idPuntosInformacion).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
|
itemSeleccionado.Descripcion = DescripcionPunto;
|
||||||
|
itemSeleccionado.Titulo = TituloPunto;
|
||||||
|
|
||||||
|
UtilidadesCASA.actualizarPuntoInformacion(bd, puntoObtenido, itemSeleccionado);
|
||||||
|
|
||||||
|
await cerrarPopupGestionDatos();
|
||||||
|
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Primary,
|
||||||
|
Message = $"Actualizado correctamente.",
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
bd.SaveChanges();
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GUARDAR
|
||||||
|
private async Task guardarFormulario()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ValidarTodo();
|
||||||
|
|
||||||
|
if (!editContext!.GetValidationMessages().Any())
|
||||||
|
{
|
||||||
|
string accion = "update";
|
||||||
|
await GestionarDatos(accion);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Warning,
|
||||||
|
Message = $"Debe rellenar los campos obligatorios.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Danger,
|
||||||
|
Message = $"Error al guardar.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MostrarErrores()
|
||||||
|
{
|
||||||
|
messageStore?.Clear();
|
||||||
|
foreach (var field in new[] { nameof(TituloPunto)})
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = typeof(puntosinformacion).GetProperty(field)?.GetValue(itemSeleccionado) }, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
@inject NavigationManager Navigation
|
||||||
|
@layout ConfiguracionLayout
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@using BlazorBootstrap
|
||||||
|
@using System.Globalization
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using bdHerramientaCACOA.db
|
||||||
|
|
||||||
|
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||||
|
|
||||||
|
<EditForm EditContext="@editContext" OnValidSubmit="guardarFormulario" OnInvalidSubmit="@MostrarErrores" FormName="PuntoInfoForm">
|
||||||
|
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||||
|
<Modal @ref="popupGestionDatos" title="@tituloPopup" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||||
|
<BodyTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Título:</label>
|
||||||
|
<InputText MaxLength="60" @bind-Value="TituloPunto" @oninput="e => ValidarYActualizar(e, nameof(TituloPunto))" class="inputForm"></InputText>
|
||||||
|
</div>
|
||||||
|
<div class="validation-message">@GetExternalValidationMessage(nameof(TituloPunto))</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Descripción:</label>
|
||||||
|
<TextAreaInput Style="height:220px; max-height:220px" MaxLength="400" @bind-Value="@DescripcionPunto" Rows="3" TextAlignment="Alignment.Start" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</BodyTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupGestionDatos">Cerrar</Button>
|
||||||
|
<Button Type="ButtonType.Submit" Color="ButtonColor.Primary">@("Modificar")</Button>
|
||||||
|
</FooterTemplate>
|
||||||
|
</Modal>
|
||||||
|
</EditForm>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Grid TItem="puntosinformacion"
|
||||||
|
Class="tablaCACOA table"
|
||||||
|
Data="listadoPuntosInfo"
|
||||||
|
AllowFiltering="false"
|
||||||
|
PageSize="10"
|
||||||
|
FixedHeader="true"
|
||||||
|
Height="750"
|
||||||
|
Unit="Unit.Px"
|
||||||
|
EmptyText="No hay registros."
|
||||||
|
PageSizeSelectorVisible="false"
|
||||||
|
Responsive="true">
|
||||||
|
<GridColumns>
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" Class="columna20Ancho" HeaderText="Título">
|
||||||
|
<span>@context.Titulo</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" HeaderText="Descripción">
|
||||||
|
<span>@context.Descripcion</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" Class="botonesTabla columna3Ancho" HeaderText="">
|
||||||
|
<div class="btnTablasEspaciado">
|
||||||
|
<span @onclick="@(() => abrirPopupGestionDatos(@context, false))" class="btnBorrarGuardar">
|
||||||
|
<Icon CustomIconName="fas fa-edit"></Icon>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
</Grid>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
public List<puntosinformacion> listadoPuntosInfo { get; set; } = new List<puntosinformacion>();
|
||||||
|
|
||||||
|
[SupplyParameterFromForm]
|
||||||
|
private puntosinformacion itemSeleccionado { get; set; } = new puntosinformacion();
|
||||||
|
|
||||||
|
private string tituloPopup = "";
|
||||||
|
public string Filter { get; set; } = "";
|
||||||
|
private Modal popupGestionDatos = default!;
|
||||||
|
|
||||||
|
private string TituloPunto = "";
|
||||||
|
private string DescripcionPunto = "";
|
||||||
|
|
||||||
|
List<ToastMessage> mensajes = new List<ToastMessage>();
|
||||||
|
|
||||||
|
private EditContext? editContext;
|
||||||
|
private ValidationMessageStore? messageStore;
|
||||||
|
public tsHerramientasCACOA bd;
|
||||||
|
|
||||||
|
private int idHerramienta = 34;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||||
|
|
||||||
|
editContext = new EditContext(itemSeleccionado);
|
||||||
|
messageStore = new ValidationMessageStore(editContext);
|
||||||
|
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task abrirPopupGestionDatos(puntosinformacion objeto, bool esNuevo)
|
||||||
|
{
|
||||||
|
itemSeleccionado = objeto;
|
||||||
|
|
||||||
|
TituloPunto = objeto.Titulo;
|
||||||
|
DescripcionPunto = objeto.Descripcion;
|
||||||
|
|
||||||
|
tituloPopup = "Modificar punto información";
|
||||||
|
|
||||||
|
|
||||||
|
await popupGestionDatos.ShowAsync();
|
||||||
|
}
|
||||||
|
private async Task cerrarPopupGestionDatos()
|
||||||
|
{
|
||||||
|
await popupGestionDatos.HideAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarYActualizar(ChangeEventArgs e, string fieldName)
|
||||||
|
{
|
||||||
|
var value = e.Value?.ToString();
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
|
||||||
|
switch (fieldName)
|
||||||
|
{
|
||||||
|
case nameof(TituloPunto):
|
||||||
|
if (!string.IsNullOrEmpty(value))
|
||||||
|
{
|
||||||
|
|
||||||
|
TituloPunto = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TituloPunto = "";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageStore?.Clear(field);
|
||||||
|
if (fieldName == nameof(TituloPunto) && TituloPunto == "")
|
||||||
|
{
|
||||||
|
messageStore?.Add(field, "El título no puede estar vacío.");
|
||||||
|
}
|
||||||
|
editContext?.NotifyValidationStateChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarTodo()
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = TituloPunto }, nameof(TituloPunto));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetExternalValidationMessage(string fieldName)
|
||||||
|
{
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
return messageStore?[field].FirstOrDefault() ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task GestionarDatos(string accion)
|
||||||
|
{
|
||||||
|
switch (accion)
|
||||||
|
{
|
||||||
|
case "update":
|
||||||
|
var puntoObtenido = bd.puntosinformacion.Where(x => x.idPuntosInformacion == itemSeleccionado.idPuntosInformacion).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
|
itemSeleccionado.Descripcion = DescripcionPunto;
|
||||||
|
itemSeleccionado.Titulo = TituloPunto;
|
||||||
|
|
||||||
|
UtilidadesCASA.actualizarPuntoInformacion(bd, puntoObtenido, itemSeleccionado);
|
||||||
|
|
||||||
|
await cerrarPopupGestionDatos();
|
||||||
|
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Primary,
|
||||||
|
Message = $"Actualizado correctamente.",
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
bd.SaveChanges();
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GUARDAR
|
||||||
|
private async Task guardarFormulario()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ValidarTodo();
|
||||||
|
|
||||||
|
if (!editContext!.GetValidationMessages().Any())
|
||||||
|
{
|
||||||
|
string accion = "update";
|
||||||
|
await GestionarDatos(accion);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Warning,
|
||||||
|
Message = $"Debe rellenar los campos obligatorios.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Danger,
|
||||||
|
Message = $"Error al guardar.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MostrarErrores()
|
||||||
|
{
|
||||||
|
messageStore?.Clear();
|
||||||
|
foreach (var field in new[] { nameof(TituloPunto) })
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = typeof(puntosinformacion).GetProperty(field)?.GetValue(itemSeleccionado) }, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,226 @@
|
|||||||
|
@inject NavigationManager Navigation
|
||||||
|
@layout ConfiguracionLayout
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@using BlazorBootstrap
|
||||||
|
@using System.Globalization
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using bdHerramientaCACOA.db
|
||||||
|
|
||||||
|
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||||
|
|
||||||
|
<EditForm EditContext="@editContext" OnValidSubmit="guardarFormulario" OnInvalidSubmit="@MostrarErrores" FormName="PuntoInfoForm">
|
||||||
|
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||||
|
<Modal @ref="popupGestionDatos" title="@tituloPopup" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||||
|
<BodyTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Título:</label>
|
||||||
|
<InputText MaxLength="60" @bind-Value="TituloPunto" @oninput="e => ValidarYActualizar(e, nameof(TituloPunto))" class="inputForm"></InputText>
|
||||||
|
</div>
|
||||||
|
<div class="validation-message">@GetExternalValidationMessage(nameof(TituloPunto))</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Descripción:</label>
|
||||||
|
<TextAreaInput Style="height:220px; max-height:220px" MaxLength="400" @bind-Value="@DescripcionPunto" Rows="3" TextAlignment="Alignment.Start" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</BodyTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupGestionDatos">Cerrar</Button>
|
||||||
|
<Button Type="ButtonType.Submit" Color="ButtonColor.Primary">@("Modificar")</Button>
|
||||||
|
</FooterTemplate>
|
||||||
|
</Modal>
|
||||||
|
</EditForm>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Grid TItem="puntosinformacion"
|
||||||
|
Class="tablaCACOA table"
|
||||||
|
Data="listadoPuntosInfo"
|
||||||
|
AllowFiltering="false"
|
||||||
|
PageSize="10"
|
||||||
|
FixedHeader="true"
|
||||||
|
Height="750"
|
||||||
|
Unit="Unit.Px"
|
||||||
|
EmptyText="No hay registros."
|
||||||
|
PageSizeSelectorVisible="false"
|
||||||
|
Responsive="true">
|
||||||
|
<GridColumns>
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" Class="columna20Ancho" HeaderText="Título">
|
||||||
|
<span>@context.Titulo</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" HeaderText="Descripción">
|
||||||
|
<span>@context.Descripcion</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" Class="botonesTabla columna3Ancho" HeaderText="">
|
||||||
|
<div class="btnTablasEspaciado">
|
||||||
|
<span @onclick="@(() => abrirPopupGestionDatos(@context, false))" class="btnBorrarGuardar">
|
||||||
|
<Icon CustomIconName="fas fa-edit"></Icon>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
</Grid>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
public List<puntosinformacion> listadoPuntosInfo { get; set; } = new List<puntosinformacion>();
|
||||||
|
|
||||||
|
[SupplyParameterFromForm]
|
||||||
|
private puntosinformacion itemSeleccionado { get; set; } = new puntosinformacion();
|
||||||
|
|
||||||
|
private string tituloPopup = "";
|
||||||
|
public string Filter { get; set; } = "";
|
||||||
|
private Modal popupGestionDatos = default!;
|
||||||
|
|
||||||
|
private string TituloPunto = "";
|
||||||
|
private string DescripcionPunto = "";
|
||||||
|
|
||||||
|
List<ToastMessage> mensajes = new List<ToastMessage>();
|
||||||
|
|
||||||
|
private EditContext? editContext;
|
||||||
|
private ValidationMessageStore? messageStore;
|
||||||
|
public tsHerramientasCACOA bd;
|
||||||
|
|
||||||
|
private int idHerramienta = 32;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||||
|
|
||||||
|
editContext = new EditContext(itemSeleccionado);
|
||||||
|
messageStore = new ValidationMessageStore(editContext);
|
||||||
|
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task abrirPopupGestionDatos(puntosinformacion objeto, bool esNuevo)
|
||||||
|
{
|
||||||
|
itemSeleccionado = objeto;
|
||||||
|
|
||||||
|
TituloPunto = objeto.Titulo;
|
||||||
|
DescripcionPunto = objeto.Descripcion;
|
||||||
|
|
||||||
|
tituloPopup = "Modificar punto información";
|
||||||
|
|
||||||
|
|
||||||
|
await popupGestionDatos.ShowAsync();
|
||||||
|
}
|
||||||
|
private async Task cerrarPopupGestionDatos()
|
||||||
|
{
|
||||||
|
await popupGestionDatos.HideAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarYActualizar(ChangeEventArgs e, string fieldName)
|
||||||
|
{
|
||||||
|
var value = e.Value?.ToString();
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
|
||||||
|
switch (fieldName)
|
||||||
|
{
|
||||||
|
case nameof(TituloPunto):
|
||||||
|
if (!string.IsNullOrEmpty(value))
|
||||||
|
{
|
||||||
|
|
||||||
|
TituloPunto = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TituloPunto = "";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageStore?.Clear(field);
|
||||||
|
if (fieldName == nameof(TituloPunto) && TituloPunto == "")
|
||||||
|
{
|
||||||
|
messageStore?.Add(field, "El título no puede estar vacío.");
|
||||||
|
}
|
||||||
|
editContext?.NotifyValidationStateChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarTodo()
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = TituloPunto }, nameof(TituloPunto));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetExternalValidationMessage(string fieldName)
|
||||||
|
{
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
return messageStore?[field].FirstOrDefault() ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task GestionarDatos(string accion)
|
||||||
|
{
|
||||||
|
switch (accion)
|
||||||
|
{
|
||||||
|
case "update":
|
||||||
|
var puntoObtenido = bd.puntosinformacion.Where(x => x.idPuntosInformacion == itemSeleccionado.idPuntosInformacion).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
|
itemSeleccionado.Descripcion = DescripcionPunto;
|
||||||
|
itemSeleccionado.Titulo = TituloPunto;
|
||||||
|
|
||||||
|
UtilidadesCASA.actualizarPuntoInformacion(bd, puntoObtenido, itemSeleccionado);
|
||||||
|
|
||||||
|
await cerrarPopupGestionDatos();
|
||||||
|
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Primary,
|
||||||
|
Message = $"Actualizado correctamente.",
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
bd.SaveChanges();
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GUARDAR
|
||||||
|
private async Task guardarFormulario()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ValidarTodo();
|
||||||
|
|
||||||
|
if (!editContext!.GetValidationMessages().Any())
|
||||||
|
{
|
||||||
|
string accion = "update";
|
||||||
|
await GestionarDatos(accion);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Warning,
|
||||||
|
Message = $"Debe rellenar los campos obligatorios.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Danger,
|
||||||
|
Message = $"Error al guardar.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void MostrarErrores()
|
||||||
|
{
|
||||||
|
messageStore?.Clear();
|
||||||
|
foreach (var field in new[] { nameof(TituloPunto) })
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = typeof(puntosinformacion).GetProperty(field)?.GetValue(itemSeleccionado) }, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,226 @@
|
|||||||
|
@inject NavigationManager Navigation
|
||||||
|
@layout ConfiguracionLayout
|
||||||
|
@rendermode InteractiveServer
|
||||||
|
|
||||||
|
@using BlazorBootstrap
|
||||||
|
@using System.Globalization
|
||||||
|
@using Microsoft.EntityFrameworkCore
|
||||||
|
@using bdHerramientaCACOA.db
|
||||||
|
|
||||||
|
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||||
|
|
||||||
|
<EditForm EditContext="@editContext" OnValidSubmit="guardarFormulario" OnInvalidSubmit="@MostrarErrores" FormName="PuntoInfoForm">
|
||||||
|
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||||
|
<Modal @ref="popupGestionDatos" title="@tituloPopup" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||||
|
<BodyTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Título:</label>
|
||||||
|
<InputText MaxLength="60" @bind-Value="TituloPunto" @oninput="e => ValidarYActualizar(e, nameof(TituloPunto))" class="inputForm"></InputText>
|
||||||
|
</div>
|
||||||
|
<div class="validation-message">@GetExternalValidationMessage(nameof(TituloPunto))</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12 formatoCampos pt-2">
|
||||||
|
<label class="tituloLbl">Descripción:</label>
|
||||||
|
<TextAreaInput Style="height:220px; max-height:220px" MaxLength="400" @bind-Value="@DescripcionPunto" Rows="3" TextAlignment="Alignment.Start" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</BodyTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupGestionDatos">Cerrar</Button>
|
||||||
|
<Button Type="ButtonType.Submit" Color="ButtonColor.Primary">@("Modificar")</Button>
|
||||||
|
</FooterTemplate>
|
||||||
|
</Modal>
|
||||||
|
</EditForm>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Grid TItem="puntosinformacion"
|
||||||
|
Class="tablaCACOA table"
|
||||||
|
Data="listadoPuntosInfo"
|
||||||
|
AllowFiltering="false"
|
||||||
|
PageSize="10"
|
||||||
|
FixedHeader="true"
|
||||||
|
Height="750"
|
||||||
|
Unit="Unit.Px"
|
||||||
|
EmptyText="No hay registros."
|
||||||
|
PageSizeSelectorVisible="false"
|
||||||
|
Responsive="true">
|
||||||
|
<GridColumns>
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" Class="columna20Ancho" HeaderText="Título">
|
||||||
|
<span>@context.Titulo</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" HeaderTextAlignment="Alignment.Center" HeaderText="Descripción">
|
||||||
|
<span>@context.Descripcion</span>
|
||||||
|
</GridColumn>
|
||||||
|
|
||||||
|
<GridColumn TItem="puntosinformacion" Class="botonesTabla columna3Ancho" HeaderText="">
|
||||||
|
<div class="btnTablasEspaciado">
|
||||||
|
<span @onclick="@(() => abrirPopupGestionDatos(@context, false))" class="btnBorrarGuardar">
|
||||||
|
<Icon CustomIconName="fas fa-edit"></Icon>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
</Grid>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
|
||||||
|
public List<puntosinformacion> listadoPuntosInfo { get; set; } = new List<puntosinformacion>();
|
||||||
|
|
||||||
|
[SupplyParameterFromForm]
|
||||||
|
private puntosinformacion itemSeleccionado { get; set; } = new puntosinformacion();
|
||||||
|
|
||||||
|
private string tituloPopup = "";
|
||||||
|
public string Filter { get; set; } = "";
|
||||||
|
private Modal popupGestionDatos = default!;
|
||||||
|
|
||||||
|
private string TituloPunto = "";
|
||||||
|
private string DescripcionPunto = "";
|
||||||
|
|
||||||
|
List<ToastMessage> mensajes = new List<ToastMessage>();
|
||||||
|
|
||||||
|
private EditContext? editContext;
|
||||||
|
private ValidationMessageStore? messageStore;
|
||||||
|
public tsHerramientasCACOA bd;
|
||||||
|
|
||||||
|
private int idHerramienta = 35;
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||||
|
|
||||||
|
editContext = new EditContext(itemSeleccionado);
|
||||||
|
messageStore = new ValidationMessageStore(editContext);
|
||||||
|
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task abrirPopupGestionDatos(puntosinformacion objeto, bool esNuevo)
|
||||||
|
{
|
||||||
|
itemSeleccionado = objeto;
|
||||||
|
|
||||||
|
TituloPunto = objeto.Titulo;
|
||||||
|
DescripcionPunto = objeto.Descripcion;
|
||||||
|
|
||||||
|
tituloPopup = "Modificar punto información";
|
||||||
|
|
||||||
|
|
||||||
|
await popupGestionDatos.ShowAsync();
|
||||||
|
}
|
||||||
|
private async Task cerrarPopupGestionDatos()
|
||||||
|
{
|
||||||
|
await popupGestionDatos.HideAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarYActualizar(ChangeEventArgs e, string fieldName)
|
||||||
|
{
|
||||||
|
var value = e.Value?.ToString();
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
|
||||||
|
switch (fieldName)
|
||||||
|
{
|
||||||
|
case nameof(TituloPunto):
|
||||||
|
if (!string.IsNullOrEmpty(value))
|
||||||
|
{
|
||||||
|
|
||||||
|
TituloPunto = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TituloPunto = "";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
messageStore?.Clear(field);
|
||||||
|
if (fieldName == nameof(TituloPunto) && TituloPunto == "")
|
||||||
|
{
|
||||||
|
messageStore?.Add(field, "El título no puede estar vacío.");
|
||||||
|
}
|
||||||
|
editContext?.NotifyValidationStateChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ValidarTodo()
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = TituloPunto }, nameof(TituloPunto));
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GetExternalValidationMessage(string fieldName)
|
||||||
|
{
|
||||||
|
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||||
|
return messageStore?[field].FirstOrDefault() ?? string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task GestionarDatos(string accion)
|
||||||
|
{
|
||||||
|
switch (accion)
|
||||||
|
{
|
||||||
|
case "update":
|
||||||
|
var puntoObtenido = bd.puntosinformacion.Where(x => x.idPuntosInformacion == itemSeleccionado.idPuntosInformacion).FirstOrDefault();
|
||||||
|
|
||||||
|
|
||||||
|
itemSeleccionado.Descripcion = DescripcionPunto;
|
||||||
|
itemSeleccionado.Titulo = TituloPunto;
|
||||||
|
|
||||||
|
UtilidadesCASA.actualizarPuntoInformacion(bd, puntoObtenido, itemSeleccionado);
|
||||||
|
|
||||||
|
await cerrarPopupGestionDatos();
|
||||||
|
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Primary,
|
||||||
|
Message = $"Actualizado correctamente.",
|
||||||
|
});
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
bd.SaveChanges();
|
||||||
|
listadoPuntosInfo = bd.puntosinformacion.Where(x => x.idTipoHerramienta == idHerramienta).ToList();
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
// GUARDAR
|
||||||
|
private async Task guardarFormulario()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ValidarTodo();
|
||||||
|
|
||||||
|
if (!editContext!.GetValidationMessages().Any())
|
||||||
|
{
|
||||||
|
string accion = "update";
|
||||||
|
await GestionarDatos(accion);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Warning,
|
||||||
|
Message = $"Debe rellenar los campos obligatorios.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
mensajes.Add(new ToastMessage
|
||||||
|
{
|
||||||
|
Type = ToastType.Danger,
|
||||||
|
Message = $"Error al guardar.",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
private void MostrarErrores()
|
||||||
|
{
|
||||||
|
messageStore?.Clear();
|
||||||
|
foreach (var field in new[] { nameof(TituloPunto) })
|
||||||
|
{
|
||||||
|
ValidarYActualizar(new ChangeEventArgs { Value = typeof(puntosinformacion).GetProperty(field)?.GetValue(itemSeleccionado) }, field);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -191,6 +191,8 @@
|
|||||||
{
|
{
|
||||||
int idtipoSimulacion = bd.enumeraciones.First(x => x.Codigo == HerramientaCASA.UtilidadesCASA.obtenerTipoSimulacion(HerramientaCASA.UtilidadesCASA.TiposSimulaciones.CASA)).idEnumeracion;
|
int idtipoSimulacion = bd.enumeraciones.First(x => x.Codigo == HerramientaCASA.UtilidadesCASA.obtenerTipoSimulacion(HerramientaCASA.UtilidadesCASA.TiposSimulaciones.CASA)).idEnumeracion;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string jsonObjeto = Newtonsoft.Json.JsonConvert.SerializeObject(casa);
|
string jsonObjeto = Newtonsoft.Json.JsonConvert.SerializeObject(casa);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(idSimulador))
|
if (string.IsNullOrEmpty(idSimulador))
|
||||||
|
|||||||
@@ -169,6 +169,9 @@
|
|||||||
// para evitar loops
|
// para evitar loops
|
||||||
int idtipoSimulacion = bd.enumeraciones.First(x => x.Codigo == HerramientaCASA.UtilidadesCASA.obtenerTipoSimulacion(HerramientaCASA.UtilidadesCASA.TiposSimulaciones.URBAN)).idEnumeracion;
|
int idtipoSimulacion = bd.enumeraciones.First(x => x.Codigo == HerramientaCASA.UtilidadesCASA.obtenerTipoSimulacion(HerramientaCASA.UtilidadesCASA.TiposSimulaciones.URBAN)).idEnumeracion;
|
||||||
|
|
||||||
|
// para evitar loops
|
||||||
|
|
||||||
|
|
||||||
string jsonObjeto = Newtonsoft.Json.JsonConvert.SerializeObject(urban);
|
string jsonObjeto = Newtonsoft.Json.JsonConvert.SerializeObject(urban);
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(idSimulador))
|
if (string.IsNullOrEmpty(idSimulador))
|
||||||
|
|||||||
@@ -27,7 +27,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<label class="tituloLbl">Documentación Mínima:</label>
|
<label class="tituloLbl">
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 55).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 55).Descripcion)
|
||||||
|
}
|
||||||
|
|
||||||
|
Documentación Mínima:</label>
|
||||||
<Grid TItem="URBAN.DocumentacionURBAN"
|
<Grid TItem="URBAN.DocumentacionURBAN"
|
||||||
Class="tablaCACOA table"
|
Class="tablaCACOA table"
|
||||||
Data="objetoLicitacionUrban.TrabajoProfesional.DocumentacionMinima"
|
Data="objetoLicitacionUrban.TrabajoProfesional.DocumentacionMinima"
|
||||||
@@ -46,7 +52,12 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<label class="tituloLbl">Documentación Opcional:</label>
|
<label class="tituloLbl">
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 56).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 56).Descripcion)
|
||||||
|
}
|
||||||
|
Documentación Opcional:</label>
|
||||||
<Grid TItem="URBAN.DocumentacionURBAN"
|
<Grid TItem="URBAN.DocumentacionURBAN"
|
||||||
Class="tablaCACOA table"
|
Class="tablaCACOA table"
|
||||||
Data="objetoLicitacionUrban.TrabajoProfesional.DocumentacionOpcional"
|
Data="objetoLicitacionUrban.TrabajoProfesional.DocumentacionOpcional"
|
||||||
@@ -71,7 +82,12 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
<label class="tituloLbl">Datos Necesarios:</label>
|
<label class="tituloLbl">
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 57).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 57).Descripcion)
|
||||||
|
}
|
||||||
|
Datos Necesarios:</label>
|
||||||
<Grid TItem="URBAN.DocumentacionURBAN"
|
<Grid TItem="URBAN.DocumentacionURBAN"
|
||||||
Class="tablaCACOA table"
|
Class="tablaCACOA table"
|
||||||
Data="objetoLicitacionUrban.TrabajoProfesional.DatosNecesarios"
|
Data="objetoLicitacionUrban.TrabajoProfesional.DatosNecesarios"
|
||||||
|
|||||||
@@ -6,7 +6,12 @@
|
|||||||
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||||
|
|
||||||
<div class="d-flex justify-content-between mt-3" style="padding-bottom:6px;">
|
<div class="d-flex justify-content-between mt-3" style="padding-bottom:6px;">
|
||||||
<div><b>Fases</b></div>
|
<div class="puntoInfo">
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 59).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 59).Descripcion)
|
||||||
|
}
|
||||||
|
<b>Fases</b></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position:relative;margin-bottom: 35px;">
|
<div style="position:relative;margin-bottom: 35px;">
|
||||||
|
|||||||
@@ -10,7 +10,14 @@
|
|||||||
|
|
||||||
<div style="height:100%">
|
<div style="height:100%">
|
||||||
<div>
|
<div>
|
||||||
<div class="mt-3 mb-3"><b>Innovacion de los instrumentos</b></div>
|
<div class="mt-3 mb-3 puntoInfo">
|
||||||
|
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 58).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 58).Descripcion)
|
||||||
|
}
|
||||||
|
<b>Innovacion de los instrumentos</b>
|
||||||
|
</div>
|
||||||
<p class="col-6">
|
<p class="col-6">
|
||||||
@* @if (!nuevaRedaccion)
|
@* @if (!nuevaRedaccion)
|
||||||
{ *@
|
{ *@
|
||||||
|
|||||||
@@ -65,7 +65,12 @@
|
|||||||
<div>
|
<div>
|
||||||
<div style="position:relative;margin-bottom: 45px;">
|
<div style="position:relative;margin-bottom: 45px;">
|
||||||
<div class="d-flex justify-content-between mt-3" style="padding-bottom:6px;">
|
<div class="d-flex justify-content-between mt-3" style="padding-bottom:6px;">
|
||||||
<div><b>Solvencia técnica</b></div>
|
<div class="puntoInfo">
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 60).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 60).Descripcion)
|
||||||
|
}
|
||||||
|
<b>Solvencia técnica</b></div>
|
||||||
</div>
|
</div>
|
||||||
<Grid TItem="LicitacionesURBAN.SolvenciaTecnica"
|
<Grid TItem="LicitacionesURBAN.SolvenciaTecnica"
|
||||||
Class="tablaCACOA table"
|
Class="tablaCACOA table"
|
||||||
|
|||||||
@@ -111,7 +111,12 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="colorFilasIntro w4">Plazo de presentación de la documentación:</td>
|
<td class="colorFilasIntro w4">
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 61).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 61).Descripcion)
|
||||||
|
}
|
||||||
|
Plazo de presentación de la documentación:</td>
|
||||||
<td class="text-end columna40Ancho">
|
<td class="text-end columna40Ancho">
|
||||||
<div class="d-flex" style="gap:3px;">
|
<div class="d-flex" style="gap:3px;">
|
||||||
@* <InputNumber TValue="int" Locale="es-ES" Min="0" class="inputForm formatoMoneda inputTabla" Value="@objetoLicitacionUrban.PlazoPresentacionDocumentos" ValueExpression="() => objetoLicitacionUrban.PlazoPresentacionDocumentos" ValueChanged="(value) => PlazoPresentacionDocumentosCambiado(value)"></InputNumber> meses *@
|
@* <InputNumber TValue="int" Locale="es-ES" Min="0" class="inputForm formatoMoneda inputTabla" Value="@objetoLicitacionUrban.PlazoPresentacionDocumentos" ValueExpression="() => objetoLicitacionUrban.PlazoPresentacionDocumentos" ValueChanged="(value) => PlazoPresentacionDocumentosCambiado(value)"></InputNumber> meses *@
|
||||||
@@ -150,6 +155,10 @@
|
|||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="colorB fw-bold w4 TotalesTabla">
|
<td class="colorB fw-bold w4 TotalesTabla">
|
||||||
|
@if (!string.IsNullOrEmpty(objetoLicitacionUrban.Enumerados.PuntosInformacion.FirstOrDefault(x => x.idPuntosInformacion == 62).Descripcion))
|
||||||
|
{
|
||||||
|
@UtilidadesCASA.CreateTooltip(objetoLicitacionUrban.Enumerados.PuntosInformacion.First(x => x.idPuntosInformacion == 62).Descripcion)
|
||||||
|
}
|
||||||
G.G. + B.I. <br />
|
G.G. + B.I. <br />
|
||||||
<span class="fw-normal" style="font-size:10px;">(40/19 Junta Consultiva de Contratación Pública del Estado)</span>
|
<span class="fw-normal" style="font-size:10px;">(40/19 Junta Consultiva de Contratación Pública del Estado)</span>
|
||||||
</td>
|
</td>
|
||||||
@@ -314,6 +323,7 @@
|
|||||||
{
|
{
|
||||||
//HACER
|
//HACER
|
||||||
// para evitar loops
|
// para evitar loops
|
||||||
|
|
||||||
|
|
||||||
string jsonObjeto = Newtonsoft.Json.JsonConvert.SerializeObject(objetoLicitacionUrban);
|
string jsonObjeto = Newtonsoft.Json.JsonConvert.SerializeObject(objetoLicitacionUrban);
|
||||||
int idtipoSimulacion = bd.enumeraciones.First(x => x.Codigo == HerramientaCASA.UtilidadesCASA.obtenerTipoSimulacion(HerramientaCASA.UtilidadesCASA.TiposSimulaciones.URBANDSIMP)).idEnumeracion;
|
int idtipoSimulacion = bd.enumeraciones.First(x => x.Codigo == HerramientaCASA.UtilidadesCASA.obtenerTipoSimulacion(HerramientaCASA.UtilidadesCASA.TiposSimulaciones.URBANDSIMP)).idEnumeracion;
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ namespace HerramientaCASA
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void crearFactorCorrecion(tsHerramientasCACOA bd, factorescorreccion factorCorrecc)
|
public static void crearFactorCorrecion(tsHerramientasCACOA bd, factorescorreccion factorCorrecc)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -198,6 +199,24 @@ namespace HerramientaCASA
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
public static void actualizarPuntoInformacion(tsHerramientasCACOA bd, puntosinformacion puntoOrig, puntosinformacion puntoEdit)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
puntoOrig.Descripcion = puntoEdit.Descripcion;
|
||||||
|
puntoOrig.Titulo = puntoEdit.Titulo;
|
||||||
|
|
||||||
|
bd.puntosinformacion.Update(puntoOrig);
|
||||||
|
|
||||||
|
var cambiarFecha = bd.enumeraciones.First(x => x.Codigo == "CW.FECHAULTMOD");
|
||||||
|
cambiarFecha.Fecha1 = DateTime.Now;
|
||||||
|
bd.enumeraciones.Update(cambiarFecha);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//public static void actualizarCosteDespachoProfesional(tsHerramientasCACOA bd, costedespachoprofesional coste, costedespachoprofesional costeEdit)
|
//public static void actualizarCosteDespachoProfesional(tsHerramientasCACOA bd, costedespachoprofesional coste, costedespachoprofesional costeEdit)
|
||||||
//{
|
//{
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ namespace bdHerramientaCACOA
|
|||||||
|
|
||||||
public class EnumeradosLicitacionesURBAN
|
public class EnumeradosLicitacionesURBAN
|
||||||
{
|
{
|
||||||
|
public List<puntosinformacion> PuntosInformacion { get; set; } = new List<puntosinformacion>();
|
||||||
|
|
||||||
public List<ConvenioColectivoConcurso> ListaConvenioColectivo { get; set; } = new List<ConvenioColectivoConcurso>();
|
public List<ConvenioColectivoConcurso> ListaConvenioColectivo { get; set; } = new List<ConvenioColectivoConcurso>();
|
||||||
public List<CosteDirectoIndirecto> ListaCDCI { get; set; } = new List<CosteDirectoIndirecto>();
|
public List<CosteDirectoIndirecto> ListaCDCI { get; set; } = new List<CosteDirectoIndirecto>();
|
||||||
|
|
||||||
@@ -159,6 +161,8 @@ namespace bdHerramientaCACOA
|
|||||||
|
|
||||||
checkListFasesURBAN(listaFases);
|
checkListFasesURBAN(listaFases);
|
||||||
|
|
||||||
|
Enumerados.PuntosInformacion = bd.puntosinformacion.Where(x => x.idTipoHerramienta == 35).ToList();
|
||||||
|
|
||||||
|
|
||||||
Enumerados.FasesTrabajo = JsonSerializer.Deserialize<List<FasesURBAN>>(JsonSerializer.Serialize(TrabajoProfesional.FasesTrabajoProfesional));
|
Enumerados.FasesTrabajo = JsonSerializer.Deserialize<List<FasesURBAN>>(JsonSerializer.Serialize(TrabajoProfesional.FasesTrabajoProfesional));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,8 +43,6 @@ public partial class enumeraciones
|
|||||||
|
|
||||||
public virtual gruposenumeraciones? idGrupoEnumeracionNavigation { get; set; }
|
public virtual gruposenumeraciones? idGrupoEnumeracionNavigation { get; set; }
|
||||||
|
|
||||||
public virtual ICollection<puntosinformacion> puntosinformacion { get; set; } = new List<puntosinformacion>();
|
|
||||||
|
|
||||||
public virtual ICollection<simulaciones> simulaciones { get; set; } = new List<simulaciones>();
|
public virtual ICollection<simulaciones> simulaciones { get; set; } = new List<simulaciones>();
|
||||||
|
|
||||||
public virtual ICollection<tipologias> tipologias { get; set; } = new List<tipologias>();
|
public virtual ICollection<tipologias> tipologias { get; set; } = new List<tipologias>();
|
||||||
|
|||||||
41
bdHerramientaCACOA/db/estadisticas.cs
Normal file
41
bdHerramientaCACOA/db/estadisticas.cs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace bdHerramientaCACOA.db;
|
||||||
|
|
||||||
|
public partial class estadisticas
|
||||||
|
{
|
||||||
|
public int idEstadistica { get; set; }
|
||||||
|
|
||||||
|
public int? idSimulacion { get; set; }
|
||||||
|
|
||||||
|
public double? costeDirecto { get; set; }
|
||||||
|
|
||||||
|
public double? costeIndirecto { get; set; }
|
||||||
|
|
||||||
|
public double? costeVariable { get; set; }
|
||||||
|
|
||||||
|
public double? costeHoraDespachoProf { get; set; }
|
||||||
|
|
||||||
|
public int? totalFases { get; set; }
|
||||||
|
|
||||||
|
public double? horasTPEDocumentacion { get; set; }
|
||||||
|
|
||||||
|
public double? horasTPEDireccionObra { get; set; }
|
||||||
|
|
||||||
|
public double? horasTPE { get; set; }
|
||||||
|
|
||||||
|
public int? porcentajeExternalizacion { get; set; }
|
||||||
|
|
||||||
|
public double? plazoPresentacion { get; set; }
|
||||||
|
|
||||||
|
public double? costeProduccion { get; set; }
|
||||||
|
|
||||||
|
public double? totalOtrosTrabajos { get; set; }
|
||||||
|
|
||||||
|
public int? porcentajeBeneficio { get; set; }
|
||||||
|
|
||||||
|
public int? numeroTrabajadores { get; set; }
|
||||||
|
|
||||||
|
public virtual simulaciones? idSimulacionNavigation { get; set; }
|
||||||
|
}
|
||||||
@@ -12,6 +12,4 @@ public partial class puntosinformacion
|
|||||||
public string? Descripcion { get; set; }
|
public string? Descripcion { get; set; }
|
||||||
|
|
||||||
public int? idTipoHerramienta { get; set; }
|
public int? idTipoHerramienta { get; set; }
|
||||||
|
|
||||||
public virtual enumeraciones? idTipoHerramientaNavigation { get; set; }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ public partial class simulaciones
|
|||||||
|
|
||||||
public double? CostesVariables { get; set; }
|
public double? CostesVariables { get; set; }
|
||||||
|
|
||||||
|
public virtual ICollection<estadisticas> estadisticas { get; set; } = new List<estadisticas>();
|
||||||
|
|
||||||
public virtual usuarios idCodigoNavigation { get; set; } = null!;
|
public virtual usuarios idCodigoNavigation { get; set; } = null!;
|
||||||
|
|
||||||
public virtual ficheros idFicheroJSONNavigation { get; set; } = null!;
|
public virtual ficheros idFicheroJSONNavigation { get; set; } = null!;
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ public partial class herramientascacoaContext : DbContext
|
|||||||
|
|
||||||
public virtual DbSet<enumeraciones> enumeraciones { get; set; }
|
public virtual DbSet<enumeraciones> enumeraciones { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<estadisticas> estadisticas { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<factorescorreccion> factorescorreccion { get; set; }
|
public virtual DbSet<factorescorreccion> factorescorreccion { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<ficheros> ficheros { get; set; }
|
public virtual DbSet<ficheros> ficheros { get; set; }
|
||||||
@@ -156,6 +158,24 @@ public partial class herramientascacoaContext : DbContext
|
|||||||
.HasConstraintName("FK_enumeraciones_gruposenumeracion");
|
.HasConstraintName("FK_enumeraciones_gruposenumeracion");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity<estadisticas>(entity =>
|
||||||
|
{
|
||||||
|
entity.HasKey(e => e.idEstadistica).HasName("PRIMARY");
|
||||||
|
|
||||||
|
entity.HasIndex(e => e.idSimulacion, "FK_estadisticas_simulaciones_idx");
|
||||||
|
|
||||||
|
entity.Property(e => e.idEstadistica).HasColumnType("int(11)");
|
||||||
|
entity.Property(e => e.idSimulacion).HasColumnType("int(11)");
|
||||||
|
entity.Property(e => e.numeroTrabajadores).HasColumnType("int(11)");
|
||||||
|
entity.Property(e => e.porcentajeBeneficio).HasColumnType("int(11)");
|
||||||
|
entity.Property(e => e.porcentajeExternalizacion).HasColumnType("int(11)");
|
||||||
|
entity.Property(e => e.totalFases).HasColumnType("int(11)");
|
||||||
|
|
||||||
|
entity.HasOne(d => d.idSimulacionNavigation).WithMany(p => p.estadisticas)
|
||||||
|
.HasForeignKey(d => d.idSimulacion)
|
||||||
|
.HasConstraintName("FK_estadisticas_simulaciones");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<factorescorreccion>(entity =>
|
modelBuilder.Entity<factorescorreccion>(entity =>
|
||||||
{
|
{
|
||||||
entity.HasKey(e => e.idFactorCorreccion).HasName("PRIMARY");
|
entity.HasKey(e => e.idFactorCorreccion).HasName("PRIMARY");
|
||||||
@@ -238,16 +258,10 @@ public partial class herramientascacoaContext : DbContext
|
|||||||
{
|
{
|
||||||
entity.HasKey(e => e.idPuntosInformacion).HasName("PRIMARY");
|
entity.HasKey(e => e.idPuntosInformacion).HasName("PRIMARY");
|
||||||
|
|
||||||
entity.HasIndex(e => e.idTipoHerramienta, "FK_enumeraciones_idEnumeracion_idx");
|
|
||||||
|
|
||||||
entity.Property(e => e.idPuntosInformacion).HasColumnType("int(11)");
|
entity.Property(e => e.idPuntosInformacion).HasColumnType("int(11)");
|
||||||
entity.Property(e => e.Descripcion).HasMaxLength(400);
|
entity.Property(e => e.Descripcion).HasMaxLength(400);
|
||||||
entity.Property(e => e.Titulo).HasMaxLength(60);
|
entity.Property(e => e.Titulo).HasMaxLength(60);
|
||||||
entity.Property(e => e.idTipoHerramienta).HasColumnType("int(11)");
|
entity.Property(e => e.idTipoHerramienta).HasColumnType("int(11)");
|
||||||
|
|
||||||
entity.HasOne(d => d.idTipoHerramientaNavigation).WithMany(p => p.puntosinformacion)
|
|
||||||
.HasForeignKey(d => d.idTipoHerramienta)
|
|
||||||
.HasConstraintName("FK_enumeraciones_idEnumeracion");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity<simulaciones>(entity =>
|
modelBuilder.Entity<simulaciones>(entity =>
|
||||||
|
|||||||
@@ -43,6 +43,10 @@
|
|||||||
"Name": "enumeraciones",
|
"Name": "enumeraciones",
|
||||||
"ObjectType": 0
|
"ObjectType": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Name": "estadisticas",
|
||||||
|
"ObjectType": 0
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Name": "factorescorreccion",
|
"Name": "factorescorreccion",
|
||||||
"ObjectType": 0
|
"ObjectType": 0
|
||||||
|
|||||||
Reference in New Issue
Block a user