Пример #1
0
 private void btnAdd_Click(object sender, RoutedEventArgs e)
 {
     DeptEditWindow win = new DeptEditWindow();
     win.IsAddNew = true;
     if (win.ShowDialog() == true)
     {
         ReloadData();
     }
 }
Пример #2
0
 private void datagrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     Department dept = datagrid.SelectedItem as Department;
     if (dept != null)
     {
         DeptEditWindow win = new DeptEditWindow();
         win.IsAddNew = false;
         win.EditingId = dept.Id;
         if (win.ShowDialog() == true)
         {
             ReloadData();
         }
     }
 }