@@ -1,74 +0,0 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user