protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { //string idCaja = ""; //idCaja = Request.QueryString["id"]; //hdIdCaja.Value = idCaja; //pnlEncabezado.Visible = true; int idCliente = int.Parse(Request.QueryString["idCliente"]); string FechaDesde = Request.QueryString["fechaDesde"]; string FechaHasta = Request.QueryString["fechaHasta"]; int vEstado = 1; //FechaDesde = txtFechaInicio.Text; ClienteDal vCargar = new ClienteDal(); vCargar.Cargar(idCliente); lblCliente.Text = vCargar.NombreFantasia; lblFechaInicio.Text = FechaDesde; lblFechaFinal.Text = FechaHasta; GestorPreciosApp documentos = new GestorPreciosApp(); dgPendientesCobrosClienteDetalle.DataSource = documentos.ListaDocumentosPendientesCobrar(idCliente, FechaDesde, FechaHasta, vEstado); //GVlistaCobrar.DataSource = NorthwindData.GetAllProduct(); dgPendientesCobrosClienteDetalle.DataBind(); } }
private void ListadoDocumentosPendientesCobroClientes() { int vEstado = 1; if (chBorrador.Checked) { vEstado = 3; } int idCliente = int.Parse(hIdCliente.Value); if (txtFechaInicio.Text == "") { txtFechaInicio.Text = DateTime.Today.AddYears(-1).ToShortDateString(); } FechaDesde = txtFechaInicio.Text; if (txtFechaFinal.Text == "") { txtFechaFinal.Text = DateTime.Today.ToShortDateString(); } FechaHasta = txtFechaFinal.Text; GestorPreciosApp documentos = new GestorPreciosApp(); documentos.ActualizarMontosDocumentos(idCliente, FechaDesde, FechaHasta); GVlistaCobrar.DataSource = documentos.ListaDocumentosPendientesCobrar(idCliente, FechaDesde, FechaHasta, vEstado); //GVlistaCobrar.DataSource = NorthwindData.GetAllProduct(); GVlistaCobrar.DataBind(); }