private void backButton_Click(object sender, EventArgs e) { mainPanel.Controls.Clear(); StudentMenu backStudentMenu = new StudentMenu(mainPanel); mainPanel.Controls.Add(backStudentMenu); }
private void button2_Click(object sender, EventArgs e) { mainPanel.Controls.Clear(); StudentMenu theStudentMenu = new StudentMenu(mainPanel); mainPanel.Controls.Add(theStudentMenu); }
public ConsultStudents(Panel mainPanel) { InitializeComponent(); try { LoadStudents(); this.mainPanel = mainPanel; } catch (Exception ex) { MessageBox.Show(ex.Message); UserControl backMenu = new StudentMenu(mainPanel); mainPanel.Controls.Add(backMenu); } }
public ModifyStudentSelectList(Panel mainPanel) { InitializeComponent(); try { LoadStudents(); this.mainPanel = mainPanel; } catch (Exception ex) { MessageBox.Show(ex.Message); UserControl theStudentMenu = new StudentMenu(mainPanel); mainPanel.Controls.Add(theStudentMenu); } }
private void confirmRemoveButton_Click(object sender, EventArgs e) { if (listStudentsSelected.Items.Count != 0) { foreach (Object item in listStudentsSelected.Items) { StudentModule module = new StudentModule(); module.RemoveStudent(item); } MessageBox.Show("Alumno(s) Eliminado(s) con Exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); mainPanel.Controls.Clear(); StudentMenu backMenu = new StudentMenu(mainPanel); mainPanel.Controls.Add(backMenu); } else { MessageBox.Show("No se han seleccionado Alumnos para borrar", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void saveButton_Click(object sender, EventArgs e) { StudentModule module = new StudentModule(); List <Object> subjects = new List <Object>(); foreach (Object item in listSubjectsSelected.Items) { subjects.Add(item); } try { module.ModifyStudent(selectedObject, textNameStudent.Text, textLastNameStudent.Text, (int)numericCi.Value, (int)numericX.Value, (int)numericY.Value, subjects); MessageBox.Show("Alumno modificado con exito", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information); mainPanel.Controls.Clear(); StudentMenu backStudentMenu = new StudentMenu(mainPanel); mainPanel.Controls.Add(backStudentMenu); } catch (Exception ex) { MessageBox.Show(ex.Message); } }