Example #1
0
        public virtual string MostrarPersona()
        {
            StringBuilder mensaje = new StringBuilder();

            mensaje.Append(" " + Apellido.ToString());
            mensaje.AppendLine(", " + Nombre.ToString());
            mensaje.AppendLine(", " + Dni.ToString());

            return(mensaje.ToString());
        }
Example #2
0
        public virtual string Listar()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(" " + Apellido.ToString());
            sb.AppendLine(", " + Nombre.ToString());

            //  sb.AppendLine(Responsable.ToString());
            return(sb.ToString());
        }
Example #3
0
        public void ListarEstudiantes(int line)
        {
            int posX = 0;

            Console.SetCursorPosition(posX, line);
            Console.Write(ID);
            int idL = (12 - ID.ToString().Length);

            posX += (idL + ID.ToString().Length);
            Console.SetCursorPosition(posX, line);
            Console.Write("|" + Nombre + " " + Apellido);
            int nL = (35 - (Nombre.ToString().Length + Apellido.ToString().Length));

            posX += (nL + Nombre.Length + Apellido.Length);
            Console.SetCursorPosition(posX, line);
            Console.Write("|" + Estatus);
            int esL = (22 - Estatus.Length);

            posX += esL + Estatus.Length;
            Console.SetCursorPosition(posX, line);
            Console.Write("|" + Carrera);
            int cLL = 30 - Carrera.Length;

            posX += cLL + Carrera.Length;
            Console.SetCursorPosition(posX, line);
            Console.Write("|" + Cedula);
            int cL = 36 - Cedula.Length;

            posX += cL + Cedula.Length;
            Console.SetCursorPosition(posX, line);
            Console.Write("|" + Nacionalidad);
            int naL = 25 - Nacionalidad.Length;

            posX += naL + Nacionalidad.Length - 1;

            Console.SetCursorPosition(posX, line);
            Console.Write("|{0}/{1}/{2}", Nacimiento.Day, Nacimiento.Month, Nacimiento.Year);
        }
Example #4
0
 // public string DocumentoInstructor,Nombre1,Apellido1,Direccion1,Telefono1,Celular1,Profesion1,Estado1;
 public void  MetodoInstructor(string DocumentoInstructor)
 {
     try
     {
         ConnectionBD  Puente;
         SqlCommand    Comando;
         SqlDataReader Lector;
         Puente  = new ConnectionBD();
         Comando = new SqlCommand("select * from Instructor where DocumentoInstructor='" + DocumentoInstructor + "'", Puente.RetornarConnexion());
         Lector  = Comando.ExecuteReader();
         while (Lector.Read())
         {
             Nombre    = Lector.GetString(1);
             Apellido  = Lector.GetString(2);
             Direccion = Lector.GetString(3);
             Telefono  = Lector.GetString(4);
             Celular   = Lector.GetString(5);
             Profesion = Lector.GetString(6);
             Estado    = Lector.GetString(7);
         }
         Nombre.ToString();
         Apellido.ToString();
         Direccion.ToString();
         Telefono.ToString();
         Celular.ToString();
         Profesion.ToString();
         Estado.ToString();
         Lector.Close();
         Comando.Dispose();
         Puente.CerrarConnexion();
     }
     catch (Exception ex)
     {
         MessageBox.Show("El Instructor no existe");
     }
 }
Example #5
0
 public override string ToString()
 {
     return(Apellido.ToString() + ", " + Nombre.ToString());
 }