Exemple #1
0
 public void Buscar(string matricula)
 {
     ConexionDB cdb = new ConexionDB();
     string sql = "SELECT Matricula, Nombres, Apellidos, Direccion, Genero, FechaNacimiento, Email, Telefono, Celular  From Estudiantes Where Matricula = " + matricula;
     DataTable dt = new DataTable();
     dt = cdb.getReader(sql);
     if (dt.Rows.Count > 0)
     {
         Matricula = (string)dt.Rows[0]["Matricula"];
         Nombres = (string)dt.Rows[0]["Nombres"];
         Apellidos = (string)dt.Rows[0]["Apellidos"];
         Direccion = (string)dt.Rows[0]["Direccion"];
         Genero = (byte)dt.Rows[0]["Genero"];
         FechaNacimiento = (DateTime)dt.Rows[0]["FechaNacimiento"];
         Email = (string)dt.Rows[0]["Email"];
         Telefono = (string)dt.Rows[0]["Telefono"];
         Celular = (string)dt.Rows[0]["Celular"];
     }
 }