public Form1() { InitializeComponent(); try { alumnos = new List <Alumno>(); alumnos.Add(new AlumnoLocal(Legajo.Of("123"), "Lisandro", "Martinez", new DateTime(2016, 11, 21))); alumnos.Add(new AlumnoLocal(Legajo.Of("456"), "Pedro", "Alfonso", new DateTime(2017, 9, 15))); alumnos.Add(new AlumnoLocal(Legajo.Of("789"), "Indio", "Solari", new DateTime(2018, 2, 18))); alumnos.Add(new AlumnoExtranjero(Dni.Of("89"), "Juan", "Perez", new DateTime(2011, 12, 8), "UNAM", 4)); alumnos.Add(new AlumnoExtranjero(Dni.Of("9123"), "Jose", "Alonso", new DateTime(2012, 5, 16), "UAM", 14)); alumnos.Add(new AlumnoExtranjero(Dni.Of("013123"), "Daniel", "Ferrari", new DateTime(2015, 7, 15), "CPM", 13)); alumnos[0].AgregarTelefono(Telefono.Of("011", "12314")); alumnos[1].AgregarTelefono(Telefono.Of("011", "454545")); alumnos[5].AgregarTelefono(Telefono.Of("011", "676767")); alumnos[5].AgregarTelefono(Telefono.Of("0232", "24234")); alumnos[4].AgregarTelefono(Telefono.Of("0333", "62728")); alumnos.Sort(new Alumno.Asc()); } catch (Exception e) { MostrarExcepcion(e); } }
private Dni SolicitarDni(bool modificar = false) { var dni_str = Interaction.InputBox("Ingrese Número de Legajo"); if (modificar && string.IsNullOrWhiteSpace(dni_str)) { return(Dni.Vacio); } var dni = Dni.Of(dni_str); VerificarDuplicados(dni); return(dni); }