protected void btnEmitir_Click(object sender, EventArgs e) { try { if (Page.IsValid) { DateTime desde = ISConvert.ToDateTime(txtDesde.Text); DateTime hasta = ISConvert.ToDateTime(txtHasta.Text); int? IdCliente = null; if (!string.IsNullOrEmpty(ddlClientes.SelectedValue)) { IdCliente = int.Parse(ddlClientes.SelectedValue); } int tipo = int.Parse(ddlNotaCobro.SelectedValue); TrxFACTURACION _TrxFACTURACION = new TrxFACTURACION(); _TrxFACTURACION.EmitirNotasCobros(desde, hasta, tipo, IdCliente); Response.Redirect("MensajeExito.aspx?t=Emisión de Notas de Cobros&m=Se han emitidos los documentos correspondientes", false); } } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void getFacturas() { DateTime FechaDesde = ISConvert.ToDateTime(txtFechaEmisionDesde.Text); DateTime FechaHasta = ISConvert.ToDateTime(txtFechaEmisionHasta.Text); var facturacion = new TrxFACTURACION(); grdFacturas.DataSource = facturacion.GetResumenFacturacion(FechaDesde, FechaHasta); grdFacturas.DataBind(); }