IngrEgrFamiliaresDTO llenar()
        {
            IngrEgrFamiliaresDTO ingrEgrFamiliares = new IngrEgrFamiliaresDTO();

            ingrEgrFamiliares.ief_Padre    = Convert.ToDouble(ief_Padre.Text);
            ingrEgrFamiliares.ief_Madre    = Convert.ToDouble(ief_Madre.Text);
            ingrEgrFamiliares.ief_Usted    = Convert.ToDouble(ief_Usted.Text);
            ingrEgrFamiliares.ief_Hermanos = Convert.ToDouble(ief_Hermanos.Text);
            ingrEgrFamiliares.ief_Conyugue = Convert.ToDouble(ief_Conyuge.Text);
            ingrEgrFamiliares.ief_Otros    = Convert.ToDouble(ief_Otros.Text);
            ingrEgrFamiliares.ief_Total    = Convert.ToDouble(ief_Total.Text);
            //egresos
            ingrEgrFamiliares.ief_Renta          = Convert.ToDouble(ief_Renta.Text);
            ingrEgrFamiliares.ief_Alimentacion   = Convert.ToDouble(ief_Alimentacion.Text);
            ingrEgrFamiliares.ief_Vestido        = Convert.ToDouble(ief_Vestido.Text);
            ingrEgrFamiliares.ief_Transporte     = Convert.ToDouble(ief_Transporte.Text);
            ingrEgrFamiliares.ief_Colegiaura     = Convert.ToDouble(ief_Colegiatura.Text);
            ingrEgrFamiliares.ief_Agua           = Convert.ToDouble(ief_Agua.Text);
            ingrEgrFamiliares.ief_Electricidad   = Convert.ToDouble(ief_Electricidad.Text);
            ingrEgrFamiliares.ief_GasCombustible = Convert.ToDouble(ief_GasCombustible.Text);
            ingrEgrFamiliares.ief_Telefono       = Convert.ToDouble(ief_Telefono.Text);
            ingrEgrFamiliares.ief_OtrosE         = Convert.ToDouble(ief_OtrosE.Text);
            ingrEgrFamiliares.ief_TotalEgresos   = Convert.ToDouble(ief_TotalEgresos.Text);
            ingrEgrFamiliares.alu_ID             = (int)Session["alu_ID"];
            //observaciones
            ingrEgrFamiliares.ief_ParentezcoPersona = ief_ParentezcoPersona.SelectedItem.Text;
            ingrEgrFamiliares.ief_CantidadPersona   = Convert.ToDouble(ief_CantidadPersona.Text);
            ingrEgrFamiliares.ief_FrecuenciaAporte  = ief_FrecuenciaAporte.SelectedItem.Text;
            ingrEgrFamiliares.ief_GastoDiario       = Convert.ToDouble(ief_GastoDiario.Text);
            ingrEgrFamiliares.ief_Conceptos         = ief_Conceptos.Text;
            return(ingrEgrFamiliares);
        }
예제 #2
0
        public IngrEgrFamiliaresDTO ObtenerFamiliares()
        {
            IngrEgrFamiliaresDTO fam = new IngrEgrFamiliaresDTO();

            try
            {
                fam.alu_ID = alu_ID;

                float total        = 0;
                int   totalEgresos = 0;

                if (ief_Padre.Text != null)
                {
                    fam.ief_Padre = Convert.ToInt32(ief_Padre.Text);
                    total        += Convert.ToInt32(ief_Padre.Text);
                }
                else
                {
                    fam.ief_Padre = 0;
                }

                if (ief_Madre.Text != null)
                {
                    fam.ief_Madre = Convert.ToInt32(ief_Madre.Text);
                    total        += Convert.ToInt32(ief_Madre.Text);
                }
                else
                {
                    fam.ief_Madre = 0;
                }

                if (ief_Usted != null)
                {
                    fam.ief_Usted = Convert.ToInt32(ief_Usted.Text);
                    total        += Convert.ToInt32(ief_Usted.Text);
                }
                else
                {
                    fam.ief_Usted = 0;
                }

                if (ief_Conyuge.Text != null)
                {
                    fam.ief_Conyugue = Convert.ToInt32(ief_Conyuge.Text);
                    total           += Convert.ToInt32(ief_Conyuge.Text);
                }
                else
                {
                    fam.ief_Conyugue = 0;
                }

                if (ief_Otros.Text != null)
                {
                    fam.ief_Otros = Convert.ToInt32(ief_Otros.Text);
                    total        += Convert.ToInt32(ief_Otros.Text);
                }
                else
                {
                    fam.ief_Otros = 0;
                }

                if (ief_Hermanos.Text != null)
                {
                    fam.ief_Hermanos = Convert.ToInt32(ief_Hermanos.Text);
                    total           += Convert.ToInt32(ief_Hermanos.Text);
                }
                else
                {
                    fam.ief_Hermanos = 0;
                }

                ief_Total.Text = total.ToString();
                fam.ief_Total  = total;
                //----------------------------------------------------------------------

                if (ief_Renta != null)
                {
                    fam.ief_Renta = Convert.ToInt32(ief_Renta.Text);
                    totalEgresos += Convert.ToInt32(ief_Renta.Text);
                }
                else
                {
                    fam.ief_Renta = 0;
                }

                if (ief_Alimentacion != null)
                {
                    fam.ief_Alimentacion = Convert.ToInt32(ief_Alimentacion.Text);
                    totalEgresos        += Convert.ToInt32(ief_Alimentacion.Text);
                }
                else
                {
                    fam.ief_Alimentacion = 0;
                }

                if (ief_Vestido != null)
                {
                    fam.ief_Vestido = Convert.ToInt32(ief_Vestido.Text);
                    totalEgresos   += Convert.ToInt32(ief_Vestido.Text);
                }
                else
                {
                    fam.ief_Vestido = 0;
                }

                if (ief_Transporte != null)
                {
                    fam.ief_Transporte = Convert.ToInt32(ief_Transporte.Text);
                    totalEgresos      += Convert.ToInt32(ief_Transporte.Text);
                }
                else
                {
                    fam.ief_Transporte = 0;
                }

                if (ief_Colegiatura != null)
                {
                    fam.ief_Colegiaura = Convert.ToInt32(ief_Colegiatura.Text);
                    totalEgresos      += Convert.ToInt32(ief_Colegiatura.Text);
                }
                else
                {
                    fam.ief_Colegiaura = 0;
                }

                if (ief_Agua != null)
                {
                    fam.ief_Agua  = Convert.ToInt32(ief_Agua.Text);
                    totalEgresos += Convert.ToInt32(ief_Agua.Text);
                }
                else
                {
                    fam.ief_Agua = 0;
                }

                if (ief_Electricidad != null)
                {
                    fam.ief_Electricidad = Convert.ToInt32(ief_Electricidad.Text);
                    totalEgresos        += Convert.ToInt32(ief_Electricidad.Text);
                }
                else
                {
                    fam.ief_Electricidad = 0;
                }

                if (ief_GasCombustible != null)
                {
                    fam.ief_GasCombustible = Convert.ToInt32(ief_GasCombustible.Text);
                    totalEgresos          += Convert.ToInt32(ief_GasCombustible.Text);
                }
                else
                {
                    fam.ief_GasCombustible = 0;
                }

                if (ief_Telefono != null)
                {
                    fam.ief_Telefono = Convert.ToInt32(ief_Telefono.Text);
                    totalEgresos    += Convert.ToInt32(ief_Telefono.Text);
                }
                else
                {
                    fam.ief_Telefono = 0;
                }

                if (ief_OtrosE != null)
                {
                    fam.ief_OtrosE = Convert.ToInt32(ief_OtrosE.Text);
                    totalEgresos  += Convert.ToInt32(ief_OtrosE.Text);
                }
                else
                {
                    fam.ief_OtrosE = 0;
                }

                ief_TotalEgresos.Text = totalEgresos.ToString();
                fam.ief_TotalEgresos  = totalEgresos;
                ingrPer          = (total / miemFamilia);
                fam.ief_IngrPerc = ingrPer.ToString();
            }
            catch (Exception) { }
            return(fam);
        }