private void UpdateStudentDetail(object sender, ExecutedRoutedEventArgs e)
 {
     if (listboxStudent.SelectedItem != null)
     {
         StudentDetailForm studentdetail = new StudentDetailForm(Mode.Update, st);
         studentdetail.ShowDialog();
     }
     else
     {
         MessageBox.Show("Please select a student");
     }
 }
 private void OpenStudentDetail(object sender, ExecutedRoutedEventArgs e)
 {
     Student st = new Student();
     StudentDetailForm studentdetail = new StudentDetailForm(Mode.Add,st);
     studentdetail.ShowDialog();
 }