Commit inicial Ventas Productivo
This commit is contained in:
59
RH/ReporteViaticos.aspx.cs
Normal file
59
RH/ReporteViaticos.aspx.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
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_ReporteViaticos : ClsPaginas
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaFiltros();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
#region "CARGA DATOS"
|
||||
protected void CargaFiltros()
|
||||
{
|
||||
DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa);
|
||||
DdlPersonal.DataBind();
|
||||
DdlPersonal.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
|
||||
DdlDepartamento.DataSource = GlobalDTDepartamentos.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa));
|
||||
DdlDepartamento.DataBind();
|
||||
DdlDepartamento.Items.Insert(0, new ListItem("Todos ", "-1"));
|
||||
}
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
ClsBancos ObjBancos = new ClsBancos();
|
||||
|
||||
String FechaInicio = TxtFechaInicioSolicitud.Text == "" ? "-1" : TxtFechaInicioSolicitud.Text;
|
||||
String FechaFin = TxtFechaFinSolicitud.Text == "" ? "-1" : TxtFechaFinSolicitud.Text;
|
||||
|
||||
if (ObjBancos.GetSolicitudesViaticos(-1, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero(), DdlPersonal.SelectedValue.ToEntero(), "-1", "-1", "-1", FechaInicio, FechaFin, -1, (TxtFolio.Text == "" ? "-1" : TxtFolio.Text), DdlDepartamento.SelectedValue.ToEntero()))
|
||||
{
|
||||
GVDatos.DataSource = ObjBancos.DtResultados;
|
||||
GVDatos.DataBind();
|
||||
}
|
||||
ObjBancos.Dispose();
|
||||
UPDatos.Update();
|
||||
}
|
||||
|
||||
protected void LnkAgregarSolicitudViatico_Click(object sender, EventArgs e)
|
||||
{
|
||||
RegistraScript("document.location.href='/RH/SolicitudViaticos.aspx'");
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user