private void Buscar_PERSONA(string ci) { Persona p = new Persona(); DB_Persona np = new DB_Persona(); p = np.DB_Buscar_PERSONA(ci); string idus = ""; string aux = ""; if (p.ci == ci) { TxtCedula.Text = p.ci; //DDLExt.Items.Insert(0, new ListItem(p.ext, p.ext, true)); //lrojas:03102016 DDLExt.SelectedValue = p.ext; //DDLExt.DataBind(); TxtNombre.Text = p.Nombres; TxtApPat.Text = p.Primer_ap; TxtApMat.Text = p.Segundo_ap; TxtFechNac.Text = p.Fecha_nacimiento.ToShortDateString(); TxtFonoFijo.Text = p.Telef_fijo; TxtFonoMovil.Text = p.Telef_cel; if (p.Sexo == true) { //aux = "MUJER"; aux = "1"; } else { //aux = "VARON"; aux = "0"; } //DDLSexo.Items.Insert(0, new ListItem(aux, p.Sexo.ToString(), true)); //lrojas:03102016 DDLSexo.SelectedValue = aux; //DDLSexo.DataBind(); if (TxtApMat.Text != "") { idus = TxtApPat.Text[0].ToString() + TxtApMat.Text[0].ToString() + TxtNombre.Text[0].ToString() + "-" + TxtCedula.Text; } else { idus = TxtApPat.Text[0].ToString() + TxtNombre.Text[0].ToString() + "-" + TxtCedula.Text; } Id_Usuario_Aux = idus; Buscar_USUARIO(idus); } else { //limparCampos_PERSONA(); this.LimpiarControles(); } }
private void Buscar_PERSONA(string ci) { Persona p = new Persona(); DB_Persona np = new DB_Persona(); p = np.DB_Buscar_PERSONA(ci); if (p.ci == ci) { TxtCedula.Text = p.ci; DDLExt.Items.Insert(0, new ListItem(p.ext, p.ext, true)); DDLExt.DataBind(); TxtNombre.Text = p.Nombres; TxtPaterno.Text = p.Primer_ap; TxtMaterno.Text = p.Segundo_ap; TxtFijo.Text = p.Telef_fijo; TxtMovil.Text = p.Telef_cel; } else { limparCampos_PERSONA(); } }
private void Buscar_PERSONA(string ci) { Persona p = new Persona(); DB_Persona np = new DB_Persona(); p = np.DB_Buscar_PERSONA(ci); if (p.ci == ci) { TextBoxCI.Text = p.ci; TextBoxNOM.Text = p.Nombres; TextBoxPAT.Text = p.Primer_ap; TextBoxMAT.Text = p.Segundo_ap; TextF1TextBoxFE_NAC.Text = (p.Fecha_nacimiento).ToString(); TextBoxTEL_FIJO.Text = p.Telef_fijo; TextBoxTEL_MOVIL.Text = p.Telef_cel; } else { limparCampos_PERSONA(); } }
protected void DDLSup_SelectedIndexChanged(object sender, EventArgs e) { DB_Usuario r = new DB_Usuario(); DataTable dt = new DataTable(); dt = r.DB_Seleccionar_ESTRUCTURA_ORG(Convert.ToInt32(DDLSup.SelectedValue)); if (dt.Rows.Count == 0)//lrojas: 28/10/2016 validacion inmediato sup { throw new Exception("No cuenta con Inmediato Superior, Seleccione su Dependencia"); } TxtCiResp.Text = dt.Rows[0][3].ToString(); //**luis.rojas if (TxtCiResp.Text != string.Empty) { DB_Persona np = new DB_Persona(); Persona presp = new Persona(); presp = np.DB_Buscar_PERSONA(TxtCiResp.Text); lblNom_Resp.Text = presp.Nombres + " " + presp.Primer_ap + " " + presp.Segundo_ap; } //** }