private void Facturas() { try { IFormatProvider culture = new CultureInfo("es-CL", true); DTOFindFactura dto = new DTOFindFactura(); dto.PageIndex = grdFacturas.PageIndex; dto.PageSize = grdFacturas.PageSize; dto.ID_FACTURACION = int.Parse(hdnID_FACTURACION.Value); dto.ID_TIPO_FACTURA = int.Parse(hdnID_TIPO_FACTURA.Value); TrxFACTURACION _trx = new TrxFACTURACION(); int Total = _trx.GetResumenFacturasByFilterCount(dto.ID_FACTURACION, dto.ID_TIPO_FACTURA, "", "", null, null, null); grdFacturas.DataSource = _trx.GetResumenFacturasByFilter(dto.ID_FACTURACION, dto.ID_TIPO_FACTURA, "", "", null, null, null, dto.PageIndex, dto.PageSize); grdFacturas.DataBind(); Paginador1.TotalPages = Total % grdFacturas.PageSize == 0 ? Total / grdFacturas.PageSize : Total / grdFacturas.PageSize + 1; Paginador1.Visible = (Total > 0); Paginador1.Inicializar(dto); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void Facturas() { try { panelMensaje.CssClass = "OcultarMensaje"; if (!string.IsNullOrEmpty(txtRutCliente.Text)) { if (!ValidaRut(txtRutCliente.Text)) { throw new Exception("Rut no es valido"); } } pnFacturas.Visible = true; IFormatProvider culture = new CultureInfo("es-CL", true); DTOFindFactura dto = new DTOFindFactura(); dto.PageIndex = grdFacturas.PageIndex; dto.PageSize = grdFacturas.PageSize; if (!string.IsNullOrEmpty(txtRutCliente.Text)) { dto.RUT_CLIENTE = txtRutCliente.Text; } if (!string.IsNullOrEmpty(txtNombreCliente.Text)) { dto.NOMBRE_CLIENTE = txtNombreCliente.Text; } if (!string.IsNullOrEmpty(txtFechaEmision.Text)) { dto.FECHA_FACTURACION = DateTime.Parse(txtFechaEmision.Text, culture); } if (!string.IsNullOrEmpty(txtNroFactura.Text)) { dto.NUMERO_FACTURA = int.Parse(txtNroFactura.Text); } if (!string.IsNullOrEmpty(ddlEstadoPago.SelectedValue)) { dto.ESTADO_FACTURA = ddlEstadoPago.SelectedValue == "1" ? true : false; } TrxFACTURACION _trx = new TrxFACTURACION(); int Total = _trx.GetResumenFacturasByFilterCount(null, null, dto.RUT_CLIENTE, dto.NOMBRE_CLIENTE, dto.FECHA_FACTURACION, dto.NUMERO_FACTURA, dto.ESTADO_FACTURA); grdFacturas.DataSource = _trx.GetResumenFacturasByFilter(null, null, dto.RUT_CLIENTE, dto.NOMBRE_CLIENTE, dto.FECHA_FACTURACION, dto.NUMERO_FACTURA, dto.ESTADO_FACTURA, dto.PageIndex, dto.PageSize); grdFacturas.DataBind(); Paginador1.TotalPages = Total % grdFacturas.PageSize == 0 ? Total / grdFacturas.PageSize : Total / grdFacturas.PageSize + 1; Paginador1.Visible = (Total > 0); Paginador1.Inicializar(dto); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void BuscarCliente() { try { if (!string.IsNullOrEmpty(txtRutCliente.Text)) { if (!ValidaRut(txtRutCliente.Text)) { throw new Exception("Rut no es valido"); } } panelMensaje.CssClass = "OcultarMensaje"; DTOFindCliente dto = new DTOFindCliente(); dto.PageIndex = grdClientes.PageIndex; dto.PageSize = grdClientes.PageSize; dto.RUT = txtRutCliente.Text; dto.NOMBRE = txtNombreCliente.Text; if (!string.IsNullOrEmpty(ddlRegion.SelectedValue)) { dto.ID_REGION = int.Parse(ddlRegion.SelectedValue); } if (!string.IsNullOrEmpty(ddlComuna.SelectedValue)) { dto.ID_COMUNA = int.Parse(ddlComuna.SelectedValue); } if (!string.IsNullOrEmpty(ddlTipoPrestacion.SelectedValue)) { dto.ID_TIPO_PRESTACION = int.Parse(ddlTipoPrestacion.SelectedValue); } if (!string.IsNullOrEmpty(ddlConvenio.SelectedValue)) { dto.ID_CONVENIO = int.Parse(ddlConvenio.SelectedValue); } pnClientes.Visible = true; var trx = new TrxCLIENTE(); //grdClientes.DataSource = trx.GetByFilterWithReferences(Comuna, Convenio, null, null, Rut, Nombre, null, "", "", ""); //grdClientes.DataBind(); int Total = trx.GetByFilterWithFullReferencesCount(dto.RUT, dto.NOMBRE, dto.ID_REGION, dto.ID_COMUNA, dto.ID_TIPO_PRESTACION, dto.ID_CONVENIO); grdClientes.DataSource = trx.GetByFilterWithFullReferences(dto.RUT, dto.NOMBRE, dto.ID_REGION, dto.ID_COMUNA, dto.ID_TIPO_PRESTACION, dto.ID_CONVENIO, dto.PageIndex, dto.PageSize); grdClientes.DataBind(); Paginador1.TotalPages = Total % grdClientes.PageSize == 0 ? Total / grdClientes.PageSize : Total / grdClientes.PageSize + 1; Paginador1.Visible = (Total > 0); Paginador1.Inicializar(dto); } catch (Exception ex) { ISException.RegisterExcepcion(ex); panelMensaje.CssClass = "MostrarMensaje"; lblMensaje.Text = ex.Message; return; } }
private void BuscarPrestaciones() { grdPrestaciones.Visible = true; if (Request.QueryString["Id"] == null) { throw new Exception("No se ha indicado identificador de la cuenta registrada"); } string Id = Request.QueryString["Id"].ToString(); DTOFindPrestaciones dto = new DTOFindPrestaciones(); dto.PageIndex = grdPrestaciones.PageIndex; dto.PageSize = grdPrestaciones.PageSize; if (!string.IsNullOrEmpty(txtNroFicha.Text)) { dto.numero = txtNroFicha.Text; } if (!string.IsNullOrEmpty(txtNombre.Text)) { dto.nombre = txtNombre.Text; } if (!string.IsNullOrEmpty(ddlEstadoPrestacion.SelectedValue)) { dto.estado = int.Parse(ddlEstadoPrestacion.SelectedValue); } if (!string.IsNullOrEmpty(txtProcedencia.Text)) { dto.prodedencia = txtProcedencia.Text; } dto.id = int.Parse(Id); TrxCARGA_PRESTACIONES_ENCABEZADO carga = new TrxCARGA_PRESTACIONES_ENCABEZADO(); int Total = carga.GetDetalleCargaPrestacionesCount(dto); grdPrestaciones.DataSource = carga.GetDetalleCargaPrestaciones(dto); grdPrestaciones.DataBind(); Paginador1.TotalPages = Total % grdPrestaciones.PageSize == 0 ? Total / grdPrestaciones.PageSize : Total / grdPrestaciones.PageSize + 1; Paginador1.Visible = (Total > 0); Paginador1.Inicializar(dto); }