Exemplo n.º 1
0
        private void txt_NroDoc_TextChanged(object sender, EventArgs e)
        {
            string NroDoc = txt_NroDoc.Text;

            if (NroDoc.Length > 6)
            {
                cDocente  doc  = new Clases.cDocente();
                DataTable trdo = doc.GetDocentexDni(NroDoc);
                if (trdo.Rows.Count > 0)
                {
                    txt_Apellido.Text  = trdo.Rows[0]["Apellido"].ToString();
                    txt_Nombre.Text    = trdo.Rows[0]["Nombre"].ToString();
                    txt_Email.Text     = trdo.Rows[0]["Email"].ToString();
                    txtCodDocente.Text = trdo.Rows[0]["IdDocente"].ToString();
                    txt_Celular.Text   = trdo.Rows[0]["Celular"].ToString();
                }
                else
                {
                    txtCodDocente.Text = "";
                    txt_Apellido.Text  = "";
                    txt_Nombre.Text    = "";
                    txt_Email.Text     = "";
                }
            }
        }
Exemplo n.º 2
0
        private void txtNroDocSuplente_TextChanged(object sender, EventArgs e)
        {
            string NroDoc = txtNroDocSuplente.Text;

            if (NroDoc.Length > 4)
            {
                cDocente  doc  = new Clases.cDocente();
                DataTable trdo = doc.GetDocentexDni(NroDoc);
                if (trdo.Rows.Count > 0)
                {
                    txtApellidoSuplente.Text = trdo.Rows[0]["Apellido"].ToString();
                    txtNombreSuplente.Text   = trdo.Rows[0]["Nombre"].ToString();
                    txtTelefonoSuplente.Text = trdo.Rows[0]["Celular"].ToString();
                    txtMailSuplente.Text     = trdo.Rows[0]["Email"].ToString();
                }
                else
                {
                    txtTelefonoSuplente.Text = "";
                    txtMailSuplente.Text     = "";
                    txtApellidoSuplente.Text = "";
                    txtApellidoSuplente.Text = "";
                }
            }
        }