56 lines
1.6 KiB
C#
56 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 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 = NowADS().FirstDayOfMonth().ToShortDateString();
|
|
txtFechaF.Text = NowADS().LastDayOfMonth().ToShortDateString();
|
|
UpFiltros.Update();
|
|
}
|
|
|
|
private void CargaCliente()
|
|
{
|
|
DdlClientes.setEsWebService(true);
|
|
}
|
|
|
|
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";
|
|
}
|
|
}
|
|
}
|
|
} |