Пример #1
0
 private void BtnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DatagridMain.SelectedItem == null)
     {
         MessageBox.Show("请先选中数据");
     }
     else
     {
         Role             role          = (Role)DatagridMain.SelectedItem;
         WinRoleAddOrEdit roleAddOrEdit = new WinRoleAddOrEdit(role.Id);
         roleAddOrEdit.ShowDialog();
     }
 }
Пример #2
0
        private void BtnNew_Click(object sender, RoutedEventArgs e)
        {
            WinRoleAddOrEdit roleAddOrEdit = new WinRoleAddOrEdit(null);

            roleAddOrEdit.ShowDialog();
        }