Пример #1
0
 private void BtnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (DGMain.SelectedItem == null)
     {
         MessageBox.Show("请先选中一条数据");
     }
     else
     {
         Dict             temp = (Dict)DGMain.SelectedItem;
         WinDictAddOrEdit win  = new WinDictAddOrEdit(temp.Id);
         win.ShowDialog();
     }
 }
Пример #2
0
        private void BtnAdd_Click(object sender, RoutedEventArgs e)
        {
            WinDictAddOrEdit win = new WinDictAddOrEdit(null);

            win.ShowDialog();
        }