public void CargarDdlEstadosBach(string pais) { if (ddlPaisBach.SelectedValue != string.Empty) { BD_Estados libEstados = new BD_Estados(); libEstados.StrConexion = axVarSes.Lee <string>("strConexion"); ddlEstadoBach.DataSource = libEstados.ListaEstados(pais); ddlEstadoBach.DataTextField = "nombre"; ddlEstadoBach.DataValueField = "num_sec"; ddlEstadoBach.DataBind(); } else { ddlEstadoBach.Items.Clear(); } }
protected void evaluarLlenado() { long aux = 0; Match me = Regex.Match(axVarSes.Lee <string>("strPersonaRegistrar"), "(\\d+)"); if (me.Success) { aux += Convert.ToInt64(me.Value); } if ((!string.IsNullOrEmpty(axVarSes.Lee <string>("strPersonaRegistrar"))) && (aux > 0) && (axVarSes.Lee <string>("strOperacion").Equals("1"))) { BD_ADMIS_DatosPersonales libDatosPer = new BD_ADMIS_DatosPersonales(); libDatosPer.StrConexion = axVarSes.Lee <string>("strConexion"); libDatosPer.NumSecDatosPer = Convert.ToInt64(axVarSes.Lee <string>("strPersonaRegistrar")); libDatosPer.Ver(); tbPrimerApellido.Text = libDatosPer.PrimerApellido; tbSegundoApellido.Text = libDatosPer.SegundoApellido; ddlLocalidadZona.SelectedValue = libDatosPer.NumSecLocalidadDomicilio.ToString(); ddlLugarInscripcion.SelectedValue = libDatosPer.NumSecUbicacionInscripcion.ToString(); tbNombres.Text = libDatosPer.Nombres; tbDocIdentidad.Text = libDatosPer.DocIdentidad; ddlTipoDocIdentidad.SelectedValue = libDatosPer.TipoDocIdentidad.ToString(); ddlGenero.SelectedValue = libDatosPer.Genero.ToString(); ddlGrupoSangre.SelectedValue = libDatosPer.GrupoSangre.ToString(); ddlEstadoCivil.SelectedValue = libDatosPer.EstadoCivil.ToString(); ddlDiscapacidad.SelectedValue = libDatosPer.TipoDiscapacidad.ToString(); tbCalleAvenida.Text = libDatosPer.AvenidaCalle; tbNumeroDom.Text = libDatosPer.Numero; tbZona.Text = libDatosPer.Zona; tbNombreEdificio.Text = libDatosPer.Edificio; tbPiso.Text = libDatosPer.Piso; tbNumeroDepto.Text = libDatosPer.Depto; tbTelefonoDomicilio.Text = libDatosPer.Telefono.ToString(); tbCelular.Text = libDatosPer.Celular.ToString(); libDatosPer.Celular = tbCelular.Text; tbEmail.Text = libDatosPer.Email; ddlViveCon.SelectedValue = libDatosPer.ViveCon.ToString(); tbFechaNac.Text = libDatosPer.FechaNacimiento; ddlAreaNacimiento.SelectedValue = libDatosPer.AreaNacimiento.ToString(); BD_Localidades liblocalidades = new BD_Localidades(); liblocalidades.StrConexion = axVarSes.Lee <string>("strConexion"); liblocalidades.NumSec = libDatosPer.NumSecLocalidadNac; string auxestado = liblocalidades.EstadoLocalidad(); BD_Estados libestados = new BD_Estados(); libestados.StrConexion = axVarSes.Lee <string>("strConexion"); libestados.NumSec = Convert.ToInt64(auxestado); ddlPaisNac.SelectedValue = libestados.PaisEstado(); CargarDdlEstadosNac(ddlPaisNac.SelectedValue); if (ddlEstadoNac.Items.Count > 0) { ddlEstadoNac.SelectedValue = auxestado; } CargarDdlLocalidadesNac(ddlEstadoNac.SelectedValue); if (ddlCiudadNac.Items.Count > 0) { ddlCiudadNac.SelectedValue = libDatosPer.NumSecLocalidadNac.ToString(); } ddlNacionalidad.SelectedValue = libDatosPer.NumSecNacionalidad.ToString(); tbObservaciones.Text = libDatosPer.Observaciones; liblocalidades.NumSec = libDatosPer.NumSecLocalidadBachillerato; auxestado = liblocalidades.EstadoLocalidad(); libestados.NumSec = Convert.ToInt64(auxestado); ddlPaisBach.SelectedValue = libestados.PaisEstado(); CargarDdlEstadosBach(ddlPaisBach.SelectedValue); if (ddlEstadoBach.Items.Count > 0) { ddlEstadoBach.SelectedValue = auxestado; } CargarDdlLocalidadesBach(ddlEstadoBach.SelectedValue); if (ddlCiudadBach.Items.Count > 0) { ddlCiudadBach.SelectedValue = libDatosPer.NumSecLocalidadBachillerato.ToString(); } CargarDdlColegios(); if (ddlColegio.Items.Count > 0) { ddlColegio.SelectedValue = libDatosPer.NumSecColegio.ToString(); } ddlAnio.SelectedValue = libDatosPer.AnioBachillerato.ToString(); ddlTipoColegio.SelectedValue = libDatosPer.TipoColegio.ToString(); ddlAreaColegio.SelectedValue = libDatosPer.AreaColegio.ToString(); ddlTurno.SelectedValue = libDatosPer.Turno.ToString(); ddlCarreras.SelectedValue = libDatosPer.NumSecSubdepartamento.ToString(); BD_ADMIS_DatosTutor libtutor = new BD_ADMIS_DatosTutor(); libtutor.StrConexion = axVarSes.Lee <string>("strConexion"); libtutor.NumSecDatosPer = libDatosPer.NumSecDatosPer; libtutor.Ver(); ddlParentesco.SelectedValue = libtutor.TipoTutor.ToString(); tbPrimerApTutor.Text = libtutor.PrimerApellido; tbSegundoApTutor.Text = libtutor.SegundoApellido; tbNombreTutor.Text = libtutor.Nombres; tbDocIdentidadTutor.Text = libtutor.DocIdentidad; ddlTipoDocIdentidadTutor.SelectedValue = libtutor.TipoDocIdentidad.ToString(); ddlGeneroTutor.SelectedValue = libtutor.Genero.ToString(); tbCalleAvenidaTutor.Text = libtutor.AvenidaCalle; tbNumeroDomTutor.Text = libtutor.Numero; tbZonaTutor.Text = libtutor.Zona; tbTelefonoTutor.Text = libtutor.Telefono.ToString(); tbCelularTutor.Text = libtutor.Celular; tbEmailTutor.Text = libtutor.Email; tbInstitucionLaboralTutor.Text = libtutor.InstitucionTrabajo; tbCargoTutor.Text = libtutor.Cargo; tbTelefonoOficina.Text = libtutor.TelefonoTrabajo; tbEdificioTutor.Text = libtutor.Edificio; tbDeptoTutor.Text = libtutor.Depto; if (libtutor.AutSeguimiento == 1) { rbSi.Checked = true; } if (libtutor.AutSeguimiento == 0) { rbNo.Checked = true; } BD_ADMIS_ContactoEmergencia libContacto = new BD_ADMIS_ContactoEmergencia(); libContacto.StrConexion = axVarSes.Lee <string>("strConexion"); libContacto.NumSecDatosPer = libDatosPer.NumSecDatosPer; libContacto.Ver(); tbNombreCompleto.Text = libContacto.NombreCompleto; tbTelefonoContacto1.Text = libContacto.TelefonoContacto1; tbTelefonoContacto2.Text = libContacto.TelefonoContacto2; CargarDdlPensums(); } else { CargarDdlEstadosBach(ddlPaisBach.SelectedValue); ddlEstadoBach.SelectedValue = "1"; // por defecto carga la paz CargarDdlLocalidadesBach(ddlEstadoBach.SelectedValue); ddlCiudadBach.SelectedValue = "1"; // por defecto carga la paz CargarDdlColegios(); CargarDdlEstadosNac(ddlPaisNac.SelectedValue); ddlEstadoNac.SelectedValue = "1"; // por defecto carga la paz CargarDdlLocalidadesNac(ddlEstadoNac.SelectedValue); ddlCiudadNac.SelectedValue = "1"; // por defecto carga la paz } }