Example #1
0
        private void btnAddGuardian_Click(object sender, RoutedEventArgs e)
        {
            SupervisorControl s = new SupervisorControl();

            if (s.ShowDialog() == true)
            {
                dgSupervisor.ItemsSource = Supervisor.GetAllSupervisors;
            }
        }
        private void btnAddNewSupervisor_Click(object sender, RoutedEventArgs e)
        {
            SupervisorControl w = new SupervisorControl();

            if (w.ShowDialog() == true)
            {
                dgSupervisor.ItemsSource = Supervisor.GetAllSupervisorTable;
            }
        }
Example #3
0
 private void btnUpdateGuardian_Click(object sender, RoutedEventArgs e)
 {
     if (dgSupervisor.SelectedIndex != -1)
     {
         SupervisorControl w = new SupervisorControl(dgSupervisor.SelectedItem as Supervisor);
         if (w.ShowDialog() == true)
         {
             dgSupervisor.ItemsSource = Supervisor.GetAllSupervisors;
         }
     }
 }
 private void btnUpdateSupervisor_Click(object sender, RoutedEventArgs e)
 {
     if (dgSupervisor.SelectedIndex >= 0)
     {
         SupervisorControl w = new SupervisorControl(Supervisor.GetSupervisorByID((int)(dgSupervisor.Items[dgSupervisor.SelectedIndex] as DataRowView)[0]));
         if (w.ShowDialog() == true)
         {
             dgSupervisor.ItemsSource = Supervisor.GetAllSupervisorTable;
         }
     }
 }