Files
SIG/Acumuladores/RepAcumuladoresVigencia.aspx.cs
2023-02-15 20:44:44 -07:00

66 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;
using Extensiones;
using System.Data;
using Microsoft.Reporting.WebForms;
using System.Activities.Expressions;
public partial class Acumuladores_RepAcumuladoresVigencia : ClsPaginas
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
InicializaValores();
}
}
private void InicializaValores()
{
CargaCombos();
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-9).ToShortDateString();
txtFechaF.Text = DateTime.Now.LastDayOfMonth().AddMonths(-6).ToShortDateString();
UpFiltros.Update();
}
private void CargaCombos()
{
CargarCentrosDeCosto(null, DdlSubProyecto, null, LblSubProyecto);
DdlClasificaciones.DataSource = get_GlobalDTClasificaciones(UsuarioActual.CveEmpresa);
DdlClasificaciones.DataBind();
DdlClasificaciones.Items.Insert(0, new ListItem("Todos", "-1"));
}
protected void BtnConsultar_Click(object sender, EventArgs e)
{
Consulta();
}
private void Consulta()
{
ClsAcumuladores ObjAcum = new ClsAcumuladores();
if (ObjAcum.GetVigencias(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlClasificaciones.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero()))
{
GvAcum.DataSource = ObjAcum.DtResultados;
}
ObjAcum.Dispose();
GvAcum.DataBind();
UpDatos.Update();
}
/*protected void GvAcum_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowIndex == 0)
{
e.Row.Cells[0].Text = "Total";
e.Row.CssClass = "Totales";
}
}
}*/
}