示例#1
0
 private void EditMenuItemClick(object sender, RoutedEventArgs e)
 {
     if (MainTable.SelectedItems != null && MainTable.SelectedItems.Count == 1)
     {
         var item = MainTable.SelectedItem as UserStaff;
         if (item != null)
         {
             var dialog = new StaffEdit(item.Id);
             dialog.Closed += (s, j) => Refresh();
             dialog.Show();
         }
     }
 }
示例#2
0
 private void HardGridMouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     var element = e.MouseDevice.DirectlyOver as FrameworkElement;
     if (element != null && element.Parent is DataGridCell)
     {
         var tempGrid = sender as DataGrid;
         if (tempGrid != null)
         {
             if (tempGrid.SelectedItems != null && tempGrid.SelectedItems.Count == 1)
             {
                 var item = tempGrid.SelectedItem as UserStaff;
                 if (item != null)
                 {
                     var dialog = new StaffEdit(item.Id);
                     dialog.Closed += (s, j) => Refresh();
                     dialog.Show();
                 }
             }
         }
     }
 }
示例#3
0
 private void AddMenuItemClick(object sender, RoutedEventArgs e)
 {
     var dialog = new StaffEdit();
     dialog.Closed += (s, j) => Refresh();
     dialog.Show();
 }