agregado manuales y cambios en el JS
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
<script src="Scripts/Util.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -72,6 +72,9 @@
|
||||
<li id="liMS" class="nav-item">
|
||||
<NavLink class="nav-link" href="CalculoCDCI">Calculo CD+CI</NavLink>
|
||||
</li>
|
||||
<li id="liMS" class="nav-item">
|
||||
<NavLink class="nav-link" href="Manuales">Manuales</NavLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="ml-auto">
|
||||
|
||||
@@ -6,12 +6,38 @@
|
||||
@using bdHerramientaCACOA.db
|
||||
|
||||
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||
|
||||
<Modal @ref="popupConfirmarBorrado" title="" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||
<BodyTemplate>
|
||||
<div class="col-12 formatoCampos">
|
||||
¿Estás seguro que desea eliminarlo?
|
||||
</div>
|
||||
</BodyTemplate>
|
||||
<FooterTemplate>
|
||||
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupConfirmarBorrado">Cerrar</Button>
|
||||
<Button @onclick="@(() => BorrarItem())" Color="ButtonColor.Danger">Eliminar</Button>
|
||||
</FooterTemplate>
|
||||
</Modal>
|
||||
<EditForm EditContext="@editContext" OnValidSubmit="guardarFormulario" OnInvalidSubmit="@MostrarErrores" FormName="factoCompleForm">
|
||||
<DataAnnotationsValidator></DataAnnotationsValidator>
|
||||
<Modal @ref="popupGestionDatos" title="@tituloPopup" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||
<BodyTemplate>
|
||||
<div class="row">
|
||||
|
||||
@if (nuevoElemento)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12 formatoCampos pt-2">
|
||||
<label class="tituloLbl">Rendimiento:</label>
|
||||
<InputSelect @bind-Value="@idProviItem" class="inputForm">
|
||||
@foreach (var provi in listadoProvincias)
|
||||
{
|
||||
<option value="@provi.CodigoProvincia">@provi.Nombre</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="col-12 formatoCampos pt-2">
|
||||
<label class="tituloLbl">Titulado Superior:</label>
|
||||
<NumberInput Min="0" TValue="double" @bind-Value="itemSeleccionado.valorGradoSup" @oninput="e => ValidarYActualizar(e, nameof(itemSeleccionado.valorGradoSup))" class="inputForm"></NumberInput>
|
||||
@@ -39,9 +65,15 @@
|
||||
</EditForm>
|
||||
|
||||
<div class="container-fluid mt-3">
|
||||
<div class="form-group mt-4">
|
||||
<input class="form-control" type="text" style="width: 400px;" placeholder="Filtrar..."
|
||||
@bind-value="Filter" @bind-value:after="AplicarFiltros" />
|
||||
<div class="row" style="justify-content:space-between">
|
||||
<div class="form-group mt-4 col-6">
|
||||
<input class="form-control" type="text" style="width: 400px;" placeholder="Filtrar..."
|
||||
@bind-value="Filter" @bind-value:after="AplicarFiltros" />
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-end mt-3 col-2">
|
||||
<button @onclick="@(() => abrirPopupGestionDatos(new ConvenioProvincia(), true))" class="btnBlue d-flex align-items-center"> <i class="fas fa-plus-square pe-1"></i> Nuevo convenio colectivo</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Grid TItem="ConvenioProvincia"
|
||||
@@ -79,11 +111,11 @@
|
||||
<span @onclick="@(() => abrirPopupGestionDatos(@context,false))" class="btnBorrarGuardar">
|
||||
<Icon CustomIconName="fas fa-edit"></Icon>
|
||||
</span>
|
||||
</div>
|
||||
@*
|
||||
|
||||
<span @onclick="@(() => abrirPopupConfirmarBorrado(@context))" style="cursor: pointer;">
|
||||
<Icon CustomIconName="fas fa-trash"></Icon>
|
||||
</span> *@
|
||||
</span>
|
||||
</div>
|
||||
</GridColumn>
|
||||
</GridColumns>
|
||||
</Grid>
|
||||
@@ -94,6 +126,8 @@
|
||||
public List<ConvenioProvincia> listadoConProv = new List<ConvenioProvincia>();
|
||||
public List<ConvenioProvincia> listadoCCAux = new List<ConvenioProvincia>();
|
||||
|
||||
public List<bdHerramientaCACOA.db.provincias> listadoProvincias = new List<bdHerramientaCACOA.db.provincias>();
|
||||
|
||||
[SupplyParameterFromForm]
|
||||
private ConvenioProvincia itemSeleccionado { get; set; } = new ConvenioProvincia();
|
||||
|
||||
@@ -102,6 +136,8 @@
|
||||
private Modal popupGestionDatos = default!;
|
||||
private Modal popupConfirmarBorrado = default!;
|
||||
|
||||
private string idProviItem = "";
|
||||
|
||||
private bool nuevoElemento;
|
||||
|
||||
List<ToastMessage> mensajes = new List<ToastMessage>();
|
||||
@@ -129,6 +165,8 @@
|
||||
}
|
||||
private void obtenerListaConvenioProvincia()
|
||||
{
|
||||
listadoConProv = new List<ConvenioProvincia>();
|
||||
|
||||
var listadoCC = bd.conveniocolectivo.OrderBy(x => x.idProvincia).ToList();
|
||||
var listadoCP = listadoCC.GroupBy(x => x.idProvincia).ToList();
|
||||
for (int i = 0; i < listadoCP.Count; i++)
|
||||
@@ -159,10 +197,7 @@
|
||||
listadoConProv.Add(cp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
listadoCCAux = listadoConProv;
|
||||
|
||||
listadoCCAux = listadoConProv.ToList();
|
||||
}
|
||||
private void AplicarFiltros()
|
||||
{
|
||||
@@ -198,6 +233,13 @@
|
||||
|
||||
if (esNuevo)
|
||||
{
|
||||
var idsProvi = listadoConProv.Select(y => y.idProvincia).ToList();
|
||||
|
||||
listadoProvincias = bd.provincias
|
||||
.Where(x => !idsProvi.Contains(x.CodigoProvincia))
|
||||
.ToList();
|
||||
|
||||
idProviItem = listadoProvincias.First().CodigoProvincia;
|
||||
nuevoElemento = true;
|
||||
}
|
||||
else
|
||||
@@ -207,11 +249,11 @@
|
||||
|
||||
if (!nuevoElemento)
|
||||
{
|
||||
tituloPopup = "Modificar CD+CI: " + itemSeleccionado.NombreProvincia;
|
||||
tituloPopup = "Modificar Convenio Colectivo: " + itemSeleccionado.NombreProvincia;
|
||||
}
|
||||
else
|
||||
{
|
||||
tituloPopup = "Nuevo CD+CI";
|
||||
tituloPopup = "Nuevo Convenio Colectivo";
|
||||
}
|
||||
|
||||
await popupGestionDatos.ShowAsync();
|
||||
@@ -294,7 +336,7 @@
|
||||
|
||||
private void ValidarTodo()
|
||||
{
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = itemSeleccionado.valorGradoSup }, nameof(itemSeleccionado.valorGradoSup));
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = itemSeleccionado.valorGradoSup }, nameof(itemSeleccionado.valorGradoSup));
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = itemSeleccionado.valorGradoMed }, nameof(itemSeleccionado.valorGradoMed));
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = itemSeleccionado.valorDelinPro }, nameof(itemSeleccionado.valorDelinPro));
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = itemSeleccionado.valorAdmin }, nameof(itemSeleccionado.valorAdmin));
|
||||
@@ -326,30 +368,33 @@
|
||||
|
||||
break;
|
||||
|
||||
// case "create":
|
||||
// UtilidadesCASA.crearConvenioColectivo(bd, itemSeleccionado);
|
||||
case "create":
|
||||
itemSeleccionado.idProvincia = idProviItem;
|
||||
|
||||
// await cerrarPopupGestionDatos();
|
||||
// mensajes.Add(new ToastMessage
|
||||
// {
|
||||
// Type = ToastType.Primary,
|
||||
// Message = $"Guardado correctamente.",
|
||||
// });
|
||||
// break;
|
||||
UtilidadesCASA.crearConvenioColectivo(bd, itemSeleccionado);
|
||||
|
||||
// case "delete":
|
||||
// UtilidadesCASA.eliminarCosteDespachoProfesional(bd, costeObtenido);
|
||||
await cerrarPopupGestionDatos();
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Guardado correctamente.",
|
||||
});
|
||||
break;
|
||||
|
||||
// await cerrarPopupConfirmarBorrado();
|
||||
// mensajes.Add(new ToastMessage
|
||||
// {
|
||||
// Type = ToastType.Primary,
|
||||
// Message = $"Eliminado correctamente.",
|
||||
// });
|
||||
// break;
|
||||
case "delete":
|
||||
UtilidadesCASA.eliminarConvenioColectivo(bd, itemSeleccionado);
|
||||
|
||||
await cerrarPopupConfirmarBorrado();
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Eliminado correctamente.",
|
||||
});
|
||||
break;
|
||||
}
|
||||
bd.SaveChanges();
|
||||
obtenerListaConvenioProvincia();
|
||||
|
||||
await InvokeAsync(StateHasChanged);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,353 @@
|
||||
@inject NavigationManager Navigation
|
||||
@layout ConfiguracionLayout
|
||||
@using BlazorBootstrap
|
||||
@using System.Globalization
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using bdHerramientaCACOA.db
|
||||
@page "/Manuales"
|
||||
|
||||
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||
|
||||
<Modal @ref="popupConfirmarBorrado" title="" IsVerticallyCentered="true" UseStaticBackdrop="true" CloseOnEscape="false">
|
||||
<BodyTemplate>
|
||||
<div class="col-12 formatoCampos">
|
||||
¿Estás seguro que desea eliminarlo?
|
||||
</div>
|
||||
</BodyTemplate>
|
||||
<FooterTemplate>
|
||||
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupConfirmarBorrado">Cerrar</Button>
|
||||
<Button @onclick="@(() => BorrarItem())" Color="ButtonColor.Danger">Eliminar</Button>
|
||||
</FooterTemplate>
|
||||
</Modal>
|
||||
|
||||
<EditForm EditContext="@editContext" OnValidSubmit="guardarFormulario" OnInvalidSubmit="@MostrarErrores" FormName="PeriodosForm">
|
||||
<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">Descripción:</label>
|
||||
<InputText MaxLength="40" @bind-Value="descripcionItem" @oninput="e => ValidarYActualizar(e, nameof(descripcionItem))" class="inputForm"></InputText>
|
||||
</div>
|
||||
<div class="validation-message">@GetExternalValidationMessage(nameof(descripcionItem))</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 formatoCampos pt-2">
|
||||
<label class="tituloLbl">URL:</label>
|
||||
<InputText MaxLength="255" @bind-Value="urlItem" @oninput="e => ValidarYActualizar(e, nameof(urlItem))" class="inputForm"></InputText>
|
||||
</div>
|
||||
<div class="validation-message">@GetExternalValidationMessage(nameof(urlItem))</div>
|
||||
</div>
|
||||
|
||||
@* <div class="row">
|
||||
<div class="col-12 formatoCampos pt-2">
|
||||
<label class="tituloLbl">Orden:</label>
|
||||
<InputNumber TValue="int?" @bind-Value="ordenItem"
|
||||
step="any"
|
||||
class="inputForm" />
|
||||
</div>
|
||||
</div> *@
|
||||
</BodyTemplate>
|
||||
<FooterTemplate>
|
||||
<Button Color="ButtonColor.Secondary" @onclick="cerrarPopupGestionDatos">Cerrar</Button>
|
||||
<Button Type="ButtonType.Submit" Color="ButtonColor.Primary">@(nuevoElemento ? "Añadir" : "Modificar")</Button>
|
||||
</FooterTemplate>
|
||||
</Modal>
|
||||
</EditForm>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
@* <div class="d-flex justify-content-between mt-3">
|
||||
<p><b class="Fuente2"></b> </p>
|
||||
<button @onclick="@(() => abrirPopupGestionDatos(new enumeraciones(), true))" class="btnBlue d-flex align-items-center"> <i class="fas fa-plus-square pe-1"></i> Nuevo manual</button>
|
||||
</div> *@
|
||||
|
||||
<Grid TItem="enumeraciones"
|
||||
Class="tablaCACOA table"
|
||||
Data="listadoManuales"
|
||||
AllowFiltering="false"
|
||||
PageSize="10"
|
||||
FixedHeader="true"
|
||||
Height="750"
|
||||
Unit="Unit.Px"
|
||||
EmptyText="No hay registros."
|
||||
PageSizeSelectorVisible="false"
|
||||
Responsive="true">
|
||||
<GridColumns>
|
||||
<GridColumn TItem="enumeraciones" HeaderTextAlignment="Alignment.Center" HeaderText="Descripción">
|
||||
<span>@context.ValorAlfabetico1</span>
|
||||
</GridColumn>
|
||||
|
||||
<GridColumn TItem="enumeraciones" HeaderTextAlignment="Alignment.Center" HeaderText="URL">
|
||||
<span>@context.ValorAlfabeticoLargo</span>
|
||||
</GridColumn>
|
||||
|
||||
@* <GridColumn TItem="enumeraciones" Class="columna10Ancho text-end" HeaderTextAlignment="Alignment.Center" HeaderText="Orden">
|
||||
<span>@context.Orden</span>
|
||||
</GridColumn> *@
|
||||
<GridColumn TItem="enumeraciones" Class="botonesTabla" HeaderText="">
|
||||
<div class="btnTablasEspaciado">
|
||||
<span @onclick="@(() => abrirPopupGestionDatos(@context, false))" class="btnBorrarGuardar">
|
||||
<Icon CustomIconName="fas fa-edit"></Icon>
|
||||
</span>
|
||||
@* <span @onclick="@(() => abrirPopupConfirmarBorrado(@context))" class="btnBorrarGuardar">
|
||||
<Icon CustomIconName="fas fa-trash"></Icon>
|
||||
</span> *@
|
||||
</div>
|
||||
</GridColumn>
|
||||
</GridColumns>
|
||||
</Grid>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
public List<enumeraciones> listadoManuales { get; set; } = new List<enumeraciones>();
|
||||
|
||||
[SupplyParameterFromForm]
|
||||
private enumeraciones itemSeleccionado { get; set; } = new enumeraciones();
|
||||
|
||||
private string tituloPopup = "";
|
||||
private Modal popupGestionDatos = default!;
|
||||
private Modal popupConfirmarBorrado = default!;
|
||||
|
||||
private bool nuevoElemento;
|
||||
|
||||
private string descripcionItem = "";
|
||||
private string urlItem = "";
|
||||
private int? ordenItem = 0;
|
||||
|
||||
List<ToastMessage> mensajes = new List<ToastMessage>();
|
||||
|
||||
private EditContext? editContext;
|
||||
private ValidationMessageStore? messageStore;
|
||||
public tsHerramientasCACOA bd;
|
||||
private string codigoEnumeracion = "MANUAL";
|
||||
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
bd = tsHerramientasCACOA.NuevoContexto(SoloLectura: false);
|
||||
|
||||
editContext = new EditContext(itemSeleccionado);
|
||||
messageStore = new ValidationMessageStore(editContext);
|
||||
|
||||
listadoManuales = UtilidadesCASA.devolverListadoOrdenadoEnumeracion(bd, codigoEnumeracion);
|
||||
}
|
||||
|
||||
|
||||
private async Task abrirPopupGestionDatos(enumeraciones objeto, bool esNuevo)
|
||||
{
|
||||
itemSeleccionado = objeto;
|
||||
|
||||
if (esNuevo)
|
||||
{
|
||||
nuevoElemento = true;
|
||||
descripcionItem = "";
|
||||
urlItem = "";
|
||||
ordenItem = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
nuevoElemento = false;
|
||||
descripcionItem = objeto.ValorAlfabetico1;
|
||||
urlItem = objeto.ValorAlfabeticoLargo;
|
||||
ordenItem = objeto.Orden;
|
||||
}
|
||||
|
||||
if (!nuevoElemento)
|
||||
{
|
||||
tituloPopup = "Modificar manual";
|
||||
}
|
||||
else
|
||||
{
|
||||
tituloPopup = "Nuevo manual";
|
||||
}
|
||||
|
||||
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(descripcionItem):
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
|
||||
descripcionItem = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
descripcionItem = "";
|
||||
}
|
||||
break;
|
||||
|
||||
case nameof(urlItem):
|
||||
if (!string.IsNullOrEmpty(value))
|
||||
{
|
||||
|
||||
urlItem = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
urlItem = "";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
messageStore?.Clear(field);
|
||||
if (fieldName == nameof(descripcionItem) && descripcionItem == "")
|
||||
{
|
||||
messageStore?.Add(field, "La descripción no puede estar vacía.");
|
||||
}
|
||||
|
||||
|
||||
if (fieldName == nameof(urlItem) && urlItem == "")
|
||||
{
|
||||
messageStore?.Add(field, "La url no puede estar vacía.");
|
||||
}
|
||||
|
||||
editContext?.NotifyValidationStateChanged();
|
||||
}
|
||||
|
||||
|
||||
private void ValidarTodo()
|
||||
{
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = descripcionItem }, nameof(descripcionItem));
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = urlItem }, nameof(urlItem));
|
||||
}
|
||||
|
||||
private string GetExternalValidationMessage(string fieldName)
|
||||
{
|
||||
var field = new FieldIdentifier(itemSeleccionado, fieldName);
|
||||
return messageStore?[field].FirstOrDefault() ?? string.Empty;
|
||||
}
|
||||
|
||||
private async Task GestionarDatos(string accion)
|
||||
{
|
||||
try
|
||||
{
|
||||
var enumObtenido = bd.enumeraciones.Where(x => x.idEnumeracion == itemSeleccionado.idEnumeracion).FirstOrDefault();
|
||||
|
||||
itemSeleccionado.ValorAlfabetico1 = descripcionItem;
|
||||
itemSeleccionado.ValorAlfabeticoLargo = urlItem;
|
||||
itemSeleccionado.Orden = ordenItem;
|
||||
|
||||
switch (accion)
|
||||
{
|
||||
case "update":
|
||||
UtilidadesCASA.guardarEnumeracion(bd, itemSeleccionado, codigoEnumeracion, nuevoElemento, enumObtenido);
|
||||
|
||||
await cerrarPopupGestionDatos();
|
||||
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Actualizado correctamente.",
|
||||
});
|
||||
|
||||
break;
|
||||
|
||||
case "create":
|
||||
UtilidadesCASA.guardarEnumeracion(bd, itemSeleccionado, codigoEnumeracion, nuevoElemento);
|
||||
|
||||
await cerrarPopupGestionDatos();
|
||||
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Guardado correctamente.",
|
||||
});
|
||||
break;
|
||||
|
||||
case "delete":
|
||||
UtilidadesCASA.eliminarEnumeracion(bd, enumObtenido);
|
||||
|
||||
await cerrarPopupConfirmarBorrado();
|
||||
mensajes.Add(new ToastMessage
|
||||
{
|
||||
Type = ToastType.Primary,
|
||||
Message = $"Eliminado correctamente.",
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
bd.SaveChanges();
|
||||
listadoManuales = UtilidadesCASA.devolverListadoOrdenadoEnumeracion(bd, codigoEnumeracion);
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string error = ex.Message;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async Task BorrarItem()
|
||||
{
|
||||
await GestionarDatos("delete");
|
||||
}
|
||||
//////// PopUp eliminar registro
|
||||
private async Task abrirPopupConfirmarBorrado(enumeraciones objeto)
|
||||
{
|
||||
itemSeleccionado = objeto;
|
||||
await popupConfirmarBorrado.ShowAsync();
|
||||
}
|
||||
private async Task cerrarPopupConfirmarBorrado()
|
||||
{
|
||||
await popupConfirmarBorrado.HideAsync();
|
||||
}
|
||||
|
||||
// GUARDAR
|
||||
private async Task guardarFormulario()
|
||||
{
|
||||
try
|
||||
{
|
||||
ValidarTodo();
|
||||
|
||||
if (!editContext!.GetValidationMessages().Any())
|
||||
{
|
||||
string accion = nuevoElemento ? "create" : "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(descripcionItem) })
|
||||
{
|
||||
ValidarYActualizar(new ChangeEventArgs { Value = typeof(enumeraciones).GetProperty(field)?.GetValue(itemSeleccionado) }, field);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,6 +34,15 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-6 d-flex align-items-center justify-content-center colorAMenu dive">
|
||||
<a href="ConvenioColectivo">
|
||||
<div>
|
||||
<h4 class="text-center">Convenio Colectivo</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-6 d-flex align-items-center justify-content-center colorEMenu dive">
|
||||
<a href="DocumentosUrban">
|
||||
<div>
|
||||
@@ -41,13 +50,23 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-6 d-flex align-items-center justify-content-center colorAMenu dive">
|
||||
|
||||
|
||||
<div class="col-6 d-flex align-items-center justify-content-center colorBMenu dive">
|
||||
<a href="CalculoCDCI">
|
||||
<div>
|
||||
<h4 class="text-center">CD+CI</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-6 d-flex align-items-center justify-content-center colorCMenu dive">
|
||||
<a href="Manuales">
|
||||
<div>
|
||||
<h4 class="text-center">Manuales</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
@rendermode InteractiveServer
|
||||
@inject NavigationManager Navigation
|
||||
|
||||
|
||||
<Toasts class="p-3 font-weight-bold" Style="color:white;" AutoHide="true" Delay="4000" Messages="mensajes" Placement="ToastsPlacement.BottomCenter" />
|
||||
<p class="TituloVentana">
|
||||
@TextoSuperior
|
||||
@@ -49,7 +50,7 @@
|
||||
<b class="Fuente2 ps-2 pe-2 nomSim">Nombre de la simulación: </b>
|
||||
<InputText @bind-Value="casa.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
<button @onclick="VerManual" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
|
||||
@* <Button @onclick="imprimir">Imprimir</Button> *@
|
||||
@@ -279,15 +280,18 @@
|
||||
await popupGuardar.HideAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
private async Task VerManual()
|
||||
{
|
||||
string urlManual = bd.enumeraciones.FirstOrDefault(x => x.Codigo.Contains("MANUAL.HERRAMIENTACASA")).ValorAlfabeticoLargo;
|
||||
await JSA.InvokeVoidAsync("abrirManual", urlManual);
|
||||
}
|
||||
|
||||
private async Task imprimir()
|
||||
{
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JSA.InvokeAsync<string>("obtenerContenidoHtmlDespacho");
|
||||
var contenidoHtml = await JSA.InvokeAsync<string>("obtenerPDFImprimir", "DespachoImprimir");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -295,7 +299,7 @@
|
||||
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css' rel='stylesheet' integrity='sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN' crossorigin='anonymous'>
|
||||
</head>
|
||||
<body>
|
||||
{contenidoHtml}
|
||||
{contenidoHtml}
|
||||
</body>
|
||||
</html>";
|
||||
|
||||
@@ -322,11 +326,17 @@
|
||||
MarginOptions = new PuppeteerSharp.Media.MarginOptions
|
||||
{
|
||||
Top = "20mm",
|
||||
Bottom = "20mm"
|
||||
Bottom = "20mm",
|
||||
},
|
||||
DisplayHeaderFooter=true,
|
||||
HeaderTemplate = @"
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;' >
|
||||
<style>
|
||||
html {
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
#header, #footer { padding: 0 !important; }
|
||||
</style>
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;background-color: #D7ECEF;'>
|
||||
<table style='width:100%; border:0; border-collapse:collapse;'>
|
||||
<tr>
|
||||
<td style='text-align:left; width:50%;'>
|
||||
@@ -348,40 +358,3 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtmlDespacho() {
|
||||
let DespachoImprimir = document.getElementById('DespachoImprimir');
|
||||
// const contenido2 = document.getElementById('CosteExterna');
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
let byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
let blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
let url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
|
||||
|
||||
// async function obtenerTablasDeOtraPagina(url) {
|
||||
// const response = await fetch(url);
|
||||
// const texto = await response.text();
|
||||
|
||||
// const parser = new DOMParser();
|
||||
// const doc = parser.parseFromString(texto, 'text/html');
|
||||
|
||||
// // Selecciona las dos primeras tablas
|
||||
// const tablas = doc.querySelectorAll('table');
|
||||
// const tabla1 = tablas[0]?.outerHTML || '';
|
||||
// const tabla2 = tablas[1]?.outerHTML || '';
|
||||
|
||||
// return tabla1 + '<br><br>' + tabla2;
|
||||
// }
|
||||
|
||||
</script>
|
||||
@@ -51,7 +51,7 @@
|
||||
<b class="Fuente2 ps-2 pe-2 nomSim">Nombre de la simulación: </b>
|
||||
<InputText @bind-Value="urban.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
<button @onclick="VerManual" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
<Tabs>
|
||||
<Tab Title="Despacho Profesional" Name="tabDespachoProf" Active>
|
||||
@@ -256,12 +256,19 @@
|
||||
{
|
||||
await popupGuardar.HideAsync();
|
||||
}
|
||||
|
||||
private async Task VerManual()
|
||||
{
|
||||
string urlManual = bd.enumeraciones.FirstOrDefault(x => x.Codigo.Contains("MANUAL.HERRAMIENTAURBAN")).ValorAlfabeticoLargo;
|
||||
await JS.InvokeVoidAsync("abrirManual", urlManual);
|
||||
}
|
||||
|
||||
private async Task imprimir()
|
||||
{
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtmlURBAN");
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerPDFImprimir", "DespachoURBANImprimir");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -302,7 +309,13 @@
|
||||
},
|
||||
DisplayHeaderFooter = true,
|
||||
HeaderTemplate = @"
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;' >
|
||||
<style>
|
||||
html {
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
#header, #footer { padding: 0 !important; }
|
||||
</style>
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;background-color: #D7ECEF;'>
|
||||
<table style='width:100%; border:0; border-collapse:collapse;'>
|
||||
<tr>
|
||||
<td style='text-align:left; width:50%;'>
|
||||
@@ -324,22 +337,3 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtmlURBAN() {
|
||||
const DespachoImprimir = document.getElementById('DespachoURBANImprimir');
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
const byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
const blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
const url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
</script>
|
||||
@@ -66,7 +66,7 @@ else
|
||||
private FasesURBAN fasesRef;
|
||||
|
||||
|
||||
List<URBAN.DocumentacionURBAN> listadoAuxiliarDocusOpci = new List<URBAN.DocumentacionURBAN>();
|
||||
// List<URBAN.DocumentacionURBAN> listadoAuxiliarDocusOpci = new List<URBAN.DocumentacionURBAN>();
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -88,9 +88,10 @@ else
|
||||
// objetoCASA.CalcularHorasTPE();
|
||||
// }
|
||||
|
||||
objetoURBAN.TrabajoProfesional.DocumentacionOpcional = listadoAuxiliarDocusOpci.ToList();
|
||||
/////// Se puso para cuando se cambie a esto que no cuente lo de la otra parte.
|
||||
// objetoURBAN.TrabajoProfesional.DocumentacionOpcional = listadoAuxiliarDocusOpci.ToList();
|
||||
|
||||
fasesRef.restablecerValores();
|
||||
// fasesRef.restablecerValores();
|
||||
|
||||
modificarTabla = res;
|
||||
modificarHoras = !res;
|
||||
@@ -104,16 +105,17 @@ else
|
||||
// ultimaHoraDocumentacion = objetoCASA.TrabajoProfesional.HorasTPEDocumentacion;
|
||||
// ultimaHoraObra = objetoCASA.TrabajoProfesional.HorasTPEDireccion;
|
||||
|
||||
listadoAuxiliarDocusOpci = new List<URBAN.DocumentacionURBAN>(objetoURBAN.TrabajoProfesional.DocumentacionOpcional);
|
||||
/////// Se puso para cuando se cambie a esto que no cuente lo de la otra parte.
|
||||
// listadoAuxiliarDocusOpci = new List<URBAN.DocumentacionURBAN>(objetoURBAN.TrabajoProfesional.DocumentacionOpcional);
|
||||
|
||||
objetoURBAN.TrabajoProfesional.DocumentacionOpcional.Clear();
|
||||
// objetoURBAN.TrabajoProfesional.DocumentacionOpcional.Clear();
|
||||
|
||||
await InvokeAsync(StateHasChanged);
|
||||
// await InvokeAsync(StateHasChanged);
|
||||
|
||||
if (fasesRef != null)
|
||||
{
|
||||
fasesRef.restablecerValores();
|
||||
}
|
||||
// if (fasesRef != null)
|
||||
// {
|
||||
// fasesRef.restablecerValores();
|
||||
// }
|
||||
|
||||
modificarHoras = res;
|
||||
modificarTabla = !res;
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<b class="Fuente2 ps-2 pe-2 nomSim">Nombre de la simulación: </b>
|
||||
<InputText @bind-Value="objetoLicitaciones.Descripcion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
<button @onclick="VerManual" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
|
||||
@* <Button @onclick="imprimir">Imprimir</Button> *@
|
||||
@@ -400,7 +400,7 @@
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtmlLicitaciones");
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerPDFImprimir", "LicitacionesCASAImprimir");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -439,7 +439,13 @@
|
||||
},
|
||||
DisplayHeaderFooter = true,
|
||||
HeaderTemplate = @"
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;' >
|
||||
<style>
|
||||
html {
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
#header, #footer { padding: 0 !important; }
|
||||
</style>
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;background-color: #D7ECEF;'>
|
||||
<table style='width:100%; border:0; border-collapse:collapse;'>
|
||||
<tr>
|
||||
<td style='text-align:left; width:50%;'>
|
||||
@@ -495,23 +501,9 @@
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtmlLicitaciones() {
|
||||
let LicitacionImprimir = document.getElementById('LicitacionesCASAImprimir');
|
||||
|
||||
let html = LicitacionImprimir.outerHTML;
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
let byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
let blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
let url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
private async Task VerManual()
|
||||
{
|
||||
string urlManual = bd.enumeraciones.FirstOrDefault(x => x.Codigo.Contains("MANUAL.LICITACIONCASA")).ValorAlfabeticoLargo;
|
||||
await JS.InvokeVoidAsync("abrirManual", urlManual);
|
||||
}
|
||||
</script>
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<b class="Fuente2 ps-2 pe-2 nomSim">Nombre de la simulación: </b>
|
||||
<InputText @bind-Value="objetoLicitacionUrban.NombreSimulacion" class="form-control inputForm formatoMoneda inputTabla " style="text-align:left;font-weight:bold;"></InputText>
|
||||
<button @onclick="imprimir" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-print pe-2"></i>Imprimir</button>
|
||||
<button class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
<button @onclick="VerManual" class="btnBlue d-flex align-items-center ms-1" style="background-color: #65b7c3 !important;"> <i class="fas fa-book pe-2"></i>Manual</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6 mt-3 mb-2">
|
||||
@@ -465,12 +465,19 @@
|
||||
// objetoLicitacionUrban.CalcularHorasSuperficie();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private async Task VerManual()
|
||||
{
|
||||
string urlManual = bd.enumeraciones.FirstOrDefault(x => x.Codigo.Contains("MANUAL.LICITACIONURBAN")).ValorAlfabeticoLargo;
|
||||
await JS.InvokeVoidAsync("abrirManual", urlManual);
|
||||
}
|
||||
|
||||
private async Task imprimir()
|
||||
{
|
||||
var cssPath = Path.Combine(Environment.CurrentDirectory, "wwwroot", "Content", "Site.css");
|
||||
var cssContent = await File.ReadAllTextAsync(cssPath);
|
||||
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerContenidoHtmlLiciUrban");
|
||||
var contenidoHtml = await JS.InvokeAsync<string>("obtenerPDFImprimir", "LiciURBANImprimir");
|
||||
var fullHtml = $@"
|
||||
<html>
|
||||
<head>
|
||||
@@ -511,7 +518,13 @@
|
||||
},
|
||||
DisplayHeaderFooter = true,
|
||||
HeaderTemplate = @"
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;' >
|
||||
<style>
|
||||
html {
|
||||
-webkit-print-color-adjust: exact;
|
||||
}
|
||||
#header, #footer { padding: 0 !important; }
|
||||
</style>
|
||||
<div style='width:100%; font-size:12px; color:#078b98; font-weight:bold; padding:5px 10px;background-color: #D7ECEF;'>
|
||||
<table style='width:100%; border:0; border-collapse:collapse;'>
|
||||
<tr>
|
||||
<td style='text-align:left; width:50%;'>
|
||||
@@ -533,22 +546,3 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
function obtenerContenidoHtmlLiciUrban() {
|
||||
const DespachoImprimir = document.getElementById('LiciURBANImprimir');
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
|
||||
function mostrarPdf(base64Data) {
|
||||
const byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
const blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
const url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
}
|
||||
</script>
|
||||
@@ -101,6 +101,7 @@ namespace HerramientaCASA
|
||||
enumeracionObtenida.ValorAlfabetico1 = nuevaEnumeracion.ValorAlfabetico1;
|
||||
enumeracionObtenida.ValorNumerico1 = nuevaEnumeracion.ValorNumerico1;
|
||||
enumeracionObtenida.ValorNumerico2 = nuevaEnumeracion.ValorNumerico2;
|
||||
enumeracionObtenida.ValorAlfabeticoLargo = nuevaEnumeracion.ValorAlfabeticoLargo;
|
||||
enumeracionObtenida.Descripcion = nuevaEnumeracion.ValorAlfabetico1.ToUpper();
|
||||
//enumeracionObtenida.Codigo = codigo + "." + nuevaEnumeracion.ValorAlfabetico1.ToUpper();
|
||||
//enumeracionObtenida.Codigo = nuevaEnumeracion.Codigo.Trim().Replace(" ", "");
|
||||
@@ -333,6 +334,64 @@ namespace HerramientaCASA
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void crearConvenioColectivo(tsHerramientasCACOA bd, ConvenioProvincia concolEdit)
|
||||
{
|
||||
try
|
||||
{
|
||||
bdHerramientaCACOA.db.conveniocolectivo nuevoConvenio;
|
||||
|
||||
var gradoSup = bd.enumeraciones.First(x => x.Codigo == "PUESTOTRABAJO.TECGRADSUP");
|
||||
var gradoMed = bd.enumeraciones.First(x => x.Codigo == "PUESTOTRABAJO.GESTPROY");
|
||||
var delin = bd.enumeraciones.First(x => x.Codigo == "PUESTOTRABAJO.DELINPROY");
|
||||
var admin = bd.enumeraciones.First(x => x.Codigo == "PUESTOTRABAJO.ADMIN");
|
||||
|
||||
|
||||
agregarConvenio(bd, concolEdit.valorGradoSup, concolEdit.idProvincia, gradoSup.idEnumeracion);
|
||||
agregarConvenio(bd, concolEdit.valorGradoMed, concolEdit.idProvincia, gradoMed.idEnumeracion);
|
||||
agregarConvenio(bd, concolEdit.valorDelinPro, concolEdit.idProvincia, delin.idEnumeracion);
|
||||
agregarConvenio(bd, concolEdit.valorAdmin, concolEdit.idProvincia, admin.idEnumeracion);
|
||||
|
||||
|
||||
var cambiarFecha = bd.enumeraciones.First(x => x.Codigo == "CW.FECHAULTMOD");
|
||||
cambiarFecha.Fecha1 = DateTime.Now;
|
||||
bd.enumeraciones.Update(cambiarFecha);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void eliminarConvenioColectivo(tsHerramientasCACOA bd, ConvenioProvincia convenioColectivo)
|
||||
{
|
||||
try
|
||||
{
|
||||
var listaConveniosBorrar = bd.conveniocolectivo.Where(x => x.idProvincia == convenioColectivo.idProvincia).ToList();
|
||||
|
||||
bd.conveniocolectivo.RemoveRange(listaConveniosBorrar);
|
||||
|
||||
var cambiarFecha = bd.enumeraciones.First(x => x.Codigo == "CW.FECHAULTMOD");
|
||||
cambiarFecha.Fecha1 = DateTime.Now;
|
||||
bd.enumeraciones.Update(cambiarFecha);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void agregarConvenio(tsHerramientasCACOA bd, double valor, string idProvincia, int idGrupo)
|
||||
{
|
||||
bd.conveniocolectivo.Add(new conveniocolectivo
|
||||
{
|
||||
idEnumeracion = idGrupo,
|
||||
idProvincia = idProvincia,
|
||||
CosteAnualTrabajador = valor
|
||||
});
|
||||
}
|
||||
|
||||
public static void eliminarTipologia(tsHerramientasCACOA bd, tipologias tipologiaObtenida)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1,34 +1,20 @@
|
||||
function pestanaActiva(pestana) {
|
||||
var links = document.getElementsByClassName("navBarLink")
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
if (links[i].classList.contains("linkNavActivo") == true)
|
||||
links[i].classList.remove("linkNavActivo")
|
||||
}
|
||||
window.abrirManual = function (url) {
|
||||
window.open(url, '_blank');
|
||||
};
|
||||
|
||||
if (document.getElementById(pestana).classList.contains("linkNavActivo") == false) {
|
||||
document.getElementById(pestana).classList.add("linkNavActivo")
|
||||
}
|
||||
}
|
||||
|
||||
function eliminarCookies(id, cut) {
|
||||
var theCookies = document.cookie.split(';');
|
||||
for (var i = 0; i < theCookies.length; i++) {
|
||||
if (theCookies[i].trim().indexOf(id) >= 0 && theCookies[i].trim().indexOf(cut) == -1) {
|
||||
ASPxClientUtils.DeleteCookie(theCookies[i].trim().split("=")[0])
|
||||
}
|
||||
}
|
||||
}
|
||||
function getUrlParameter(sParam) {
|
||||
var sPageURL = window.location.search.substring(1),
|
||||
sURLVariables = sPageURL.split('&'),
|
||||
sParameterName,
|
||||
i;
|
||||
|
||||
for (i = 0; i < sURLVariables.length; i++) {
|
||||
sParameterName = sURLVariables[i].split('=');
|
||||
window.mostrarPdf = function (base64Data) {
|
||||
let byteArray = Uint8Array.from(atob(base64Data), c => c.charCodeAt(0));
|
||||
let blob = new Blob([byteArray], { type: "application/pdf" });
|
||||
let url = URL.createObjectURL(blob);
|
||||
window.open(url, "_blank");
|
||||
};
|
||||
|
||||
if (sParameterName[0] === sParam) {
|
||||
return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
|
||||
}
|
||||
}
|
||||
|
||||
window.obtenerPDFImprimir = function (paginaImprimir) {
|
||||
let DespachoImprimir = document.getElementById(paginaImprimir);
|
||||
|
||||
let html = DespachoImprimir.outerHTML + "<br>";
|
||||
|
||||
return html;
|
||||
};
|
||||
Reference in New Issue
Block a user