This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2021-05-19 10:28:31 -07:00
parent 671d7e201f
commit 6609a96e2e
32 changed files with 5049 additions and 2638 deletions

74
RH/DiasFestivos.aspx.cs Normal file
View File

@@ -0,0 +1,74 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Extensiones;
public partial class RH_DiasFestivos : ClsPaginas
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
CargaDiasFestivos();
}
}
protected void CargaDiasFestivos()
{
ClsRH ObjDias = new ClsRH();
ObjDias.DiasFestivosGet(UsuarioActual.CveEmpresa );
GVDiasFestivos.DataSource = ObjDias.DtResultados;
ObjDias.Dispose();
GVDiasFestivos.DataBind();
upDatosDias.Update();
}
protected void LimpiaDiasFestivos()
{
TxtDiasfecha.Text = "";
UPModalDias.Update();
}
protected void LnkAgregarDias_Click(object sender, EventArgs e)
{
this.RegistraScript("$('#DModalDiasFestivos').modal();");
LimpiaDiasFestivos();
BtnDiasADD.Visible = true;
UPModalDias.Update();
}
protected void BtnDiasADD_Click(object sender, EventArgs e)
{
DateTime fecha = TxtDiasfecha.Text.ToDate();
ClsRH ObjDias = new ClsRH();
bool Continuar = ObjDias.DiasFestivosAdd(fecha, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario);
ObjDias.Dispose();
if (Continuar)
{
this.RegistraScript("$('#DModalDiasFestivos').modal('hide');");
LimpiaDiasFestivos();
CargaDiasFestivos();
UPModalDias.Update();
this.Alert("El dìa festivos se ha agregado");
}
}
protected void LnkEliminarDias_Click(object sender, EventArgs e)
{
GridViewRow gvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
DateTime fecha = gvRow.DataKey("CveDiainabil").ToDateTime();
ClsRH ObjDias = new ClsRH();
bool Continuar = ObjDias.DiasFestivosRemove(fecha, UsuarioActual.CveEmpresa);
ObjDias.Dispose();
if (Continuar)
{
CargaDiasFestivos();
this.Alert("El dìa festivos se ha Eliminado");
}
}
}