private void Inicializar()
        {
            FacturasImplement oFacturasImplement = new FacturasImplement();
            facturas          oFacturas          = new facturas();

            oFacturas               = oFacturasImplement.Get(_idFactura);
            txtFactura.Text         = oFacturas.id_factura.ToString();
            txtPeriodo.Text         = oFacturas.id_periodo.ToString().Substring(4, 2) + "/" + oFacturas.id_periodo.ToString().Substring(0, 4);
            txtFehaFacturacion.Text = "";

            txtFechaVencimiento.Text = "";
            EstadosPagoImplement oEstadosPagoImplement = new EstadosPagoImplement();
            cod_estados_pago     oCod_Estados_Pago     = new cod_estados_pago();
            int idEstado = (int)oFacturas.id_estadoPago;

            oCod_Estados_Pago = oEstadosPagoImplement.Get(idEstado);
            txtEstado.Text    = oCod_Estados_Pago.estado_pago;
            txtFechaPago.Text = oFacturas.fechaPago.ToString();
            socios_mediciones      oSociosMediciones       = new socios_mediciones();
            SocioMedicionImplement oSocioMedicionImplement = new SocioMedicionImplement();

            oSociosMediciones    = oSocioMedicionImplement.Get((int)oFacturas.id_medicion);
            txtM3Consumidos.Text = oSociosMediciones.consumo.ToString();

            cargarGrillaConceptos();

            txtImporteTotal.Text = oFacturas.importeTotal.ToString();
            txtCobrado.Text      = oFacturas.cobrado.ToString();
        }
Beispiel #2
0
        public cod_estados_pago Get(int id)
        {
            cod_estados_pago oEstado = new cod_estados_pago();

            using (cooperativaEntities bd = new cooperativaEntities())
            {
                var regis = (from p in bd.cod_estados_pago
                             where p.id_estado_pago == id
                             select p).Single();
                oEstado.id_estado_pago = regis.id_estado_pago;
                oEstado.estado_pago    = regis.estado_pago;
                return(oEstado);
            }
        }