using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI.WebControls; using Extensiones; using System.Data; using static Extensiones.ModExtensiones; using Microsoft.Reporting.WebForms; public partial class Ventas_RepUsados : ClsPaginas { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { InicializaValores(); } } private void InicializaValores() { CargaCliente(); txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); txtFechaF.Text = DateTime.Now.LastDayOfMonth().ToShortDateString(); UpFiltros.Update(); } private void CargaCliente() { if (UsuarioActual.CveEmpresa == 119) { DdlClientes.setEsWebService(true); }else { DdlClientes.setEsWebService(false); DdlClientes.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1); DdlClientes.DataBind(); DdlClientes.ddl.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.RepUsadosGet(DdlClientes.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa)) { 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"; } } } }