private void BtnNew_Click(object sender, RoutedEventArgs e) { WinJobAddOrEdit win = new WinJobAddOrEdit(null); win.ShowDialog(); Query(); }
private void BtnEdit_Click(object sender, RoutedEventArgs e) { if (DGMain.SelectedItem == null || DGMain.SelectedItems.Count > 1) { MessageBox.Show("请选中一条数据"); } else { WinJobAddOrEdit win = new WinJobAddOrEdit(((JobEntity)DGMain.SelectedItem).Id); win.ShowDialog(); Query(); } }