65 lines
2.1 KiB
C#
65 lines
2.1 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;
|
|
using System.Web.UI.HtmlControls;
|
|
using System.Text;
|
|
|
|
public partial class Ventas_RepVentasAutorizaciones : ClsPaginas
|
|
{
|
|
#region PROPIEDADES
|
|
|
|
private DataTable DtDatos
|
|
{
|
|
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
|
set { ViewState["DtDatos"] = value; }
|
|
}
|
|
|
|
#endregion
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
InicializaValores();
|
|
}
|
|
}
|
|
|
|
private void InicializaValores()
|
|
{
|
|
|
|
//Carga SubProyectos
|
|
DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
|
DdlSubProyecto.DataBind();
|
|
|
|
//Carga Usuarios
|
|
DdlUsuario.DataSource = get_GlobalDTUsuarios().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}");
|
|
DdlUsuario.DataBind();
|
|
|
|
//Carga Estatus Factura
|
|
//DdlEstatusFactura
|
|
DdlClientes.setEsWebService(true);
|
|
|
|
|
|
txtFechaI.Text = DateTime.Now.ToShortDateString();
|
|
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
|
|
|
}
|
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
|
{
|
|
Consulta();
|
|
}
|
|
|
|
private void Consulta()
|
|
{
|
|
ClsVentas ObjVentas = new ClsVentas();
|
|
int CveCliente = (DdlClientes.SelectedValue.ToEntero() > 0) ? DdlClientes.SelectedValue.ToEntero() : -1;
|
|
|
|
if (ObjVentas.GetReporteVentasAutorizaciones(DdlUsuario.SelectedValue.ToEntero(), DdlEstatusFactura.SelectedValue.ToEntero(), DdlSubProyecto.SelectedValue.ToEntero(),
|
|
txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), CveCliente, UsuarioActual.CveEmpresa ))
|
|
{
|
|
GvDatos.DataSource = ObjVentas.DtResultados;
|
|
DtDatos = ObjVentas.DtResultados;
|
|
}
|
|
ObjVentas.Dispose();
|
|
GvDatos.DataBind();
|
|
UpDatos.Update();
|
|
}
|
|
} |