Пример #1
0
 private void btnAddStudent_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         wpfStudent student = new wpfStudent();
         student.ShowDialog();
     }
     catch (System.Exception ex)
     {
         //handle error method
         HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name,
                     MethodInfo.GetCurrentMethod().Name, ex.Message);
     }
 }
Пример #2
0
        private void btnAddStudent_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                wpfStudent student = new wpfStudent();
                student.ShowDialog();

                dgStudentList.ItemsSource = dataTracker.makeStudentList();


                dgStudentList.Items.Refresh();

                this.Show();
            }
            catch (Exception ex)
            {
                //handle error method
                HandleError(MethodInfo.GetCurrentMethod().DeclaringType.Name,
                            MethodInfo.GetCurrentMethod().Name, ex.Message);
            }
        }