//Obtencion de los datos del formulario public AntecedentesAluPDTO ObtenerDatos() { AntecedentesAluPDTO anteced = new AntecedentesAluPDTO(); try { if (alp_EstatusJefeHogarSi.Selected == true) { anteced.alp_EstatusJefeHogar = true; } else { anteced.alp_EstatusJefeHogar = false; } anteced.alu_ID = alu_ID; anteced.alp_NoPersonasDepeIngr = Convert.ToInt32(num_Personas_DependenJH.Text); miemFamilia = Convert.ToInt32(num_Personas_DependenJH.Text); anteced.alp_NoDiasTrabajaJefeH = Convert.ToInt32(alp_NoDiasTrabajaJefeH.SelectedValue); anteced.alp_DineroMensualPorTrabajar = Convert.ToInt32(alp_DineroMensualPorTrabajar.Text); if (apl_EmpleoSi.Selected == true) { anteced.alp_Empleo = alp_Empleo.Text; } else { alp_Empleo.Visible = false; anteced.alp_Empleo = ""; } } catch (Exception) { } return(anteced); }
AntecedentesAluPDTO Llenar() { AntecedentesAluPDTO obj = new AntecedentesAluPDTO(); string empleo = ""; double ingrAlu = 0; if (alp_EmpleoSi.Selected == true) { empleo = alp_Empleo.Text; if ((alp_IngresoAlumno.Text).Equals("")) { alp_IngresoAlumno.Text = "0"; } ingrAlu = Convert.ToDouble(alp_IngresoAlumno.Text); } else { empleo = "No"; ingrAlu = 0; } obj.alp_Empleo = empleo; obj.alp_IngresoAlumno = ingrAlu; obj.alp_EstatusJefeHogar = Convert.ToBoolean(alp_EstatusJefeHogarSi.Selected); int hijos = 0; if (alp_HijoSi.Selected == true) { if ((alp_NoHijosDepeEcon.Text).Equals("")) { alp_NoHijosDepeEcon.Text = "0"; } hijos = Convert.ToInt32(alp_NoHijosDepeEcon.Text); } obj.alp_NoHijosDepeEcon = hijos; obj.alp_NoPersonasDepeIngr = Convert.ToInt32(alp_NoPersonasDepeIngr.SelectedValue); obj.alu_ID = (int)Session["alu_ID"]; obj.alp_NoDiasTrabajaJefeH = Convert.ToInt32(alp_NoDiasTrabajaJefeH.SelectedValue); if ((alp_DineroMensualPorTrabajar.Text).Equals("")) { alp_DineroMensualPorTrabajar.Text = "0"; } obj.alp_DineroMensualPorTrabajar = Convert.ToDouble(alp_DineroMensualPorTrabajar.Text); obj.alp_PersonaVives = alp_PersonaVives.SelectedItem.Text; return(obj); }