public void estudiantes() { if (estudiante_array.Count == 0) { Estudiantes_Clase nuevo_estudiante = new Estudiantes_Clase(); nuevo_estudiante.Nombre_estudiante = TextBoxEstudiante.Text; nuevo_estudiante.Vector_curso = curso_array.ToList(); estudiante_array.Add(nuevo_estudiante); } for (int i = 0; i < estudiante_array.Count(); i++) { if (estudiante_array[i].Nombre_estudiante == TextBoxEstudiante.Text) { Estudiantes_Clase busqueda_estudiante = estudiante_array.Find(x => x.Nombre_estudiante == TextBoxEstudiante.Text); busqueda_estudiante.Vector_curso = curso_array.ToList(); break; } else { Estudiantes_Clase nuevo_estudiante = new Estudiantes_Clase(); nuevo_estudiante.Nombre_estudiante = TextBoxEstudiante.Text; nuevo_estudiante.Vector_curso = curso_array.ToList(); estudiante_array.Add(nuevo_estudiante); } } Json(); curso_array.Clear(); }
public void notas() { for (int i = 0; i < estudiante_array.Count(); i++) { if (estudiante_array[i].Nombre_estudiante == TextBoxEstudiante.Text) { Estudiantes_Clase busqueda_estudiante = estudiante_array.Find(x => x.Nombre_estudiante == TextBoxEstudiante.Text); curso_array = busqueda_estudiante.Vector_curso; } } //agregar notas Curso_Clase nuevo_curso = new Curso_Clase(); nuevo_curso.Nombre_curso = TextBoxCurso.Text; curso_array.Add(nuevo_curso); }