public virtual string MostrarPersona() { StringBuilder mensaje = new StringBuilder(); mensaje.Append(" " + Apellido.ToString()); mensaje.AppendLine(", " + Nombre.ToString()); mensaje.AppendLine(", " + Dni.ToString()); return(mensaje.ToString()); }
public virtual string Listar() { StringBuilder sb = new StringBuilder(); sb.Append(" " + Apellido.ToString()); sb.AppendLine(", " + Nombre.ToString()); // sb.AppendLine(Responsable.ToString()); return(sb.ToString()); }
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); }
// 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"); } }
public override string ToString() { return(Apellido.ToString() + ", " + Nombre.ToString()); }