private void btnNew_Click(object sender, RoutedEventArgs e) { T_OA_PRIORITIES priority = new T_OA_PRIORITIES(); PriorityForm AddWin = new PriorityForm(Action.Add, priority); EntityBrowser browser = new EntityBrowser(AddWin); browser.MinHeight = 220; browser.MinWidth = 300; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }); }
void BtnView_Click(object sender, RoutedEventArgs e) { T_OA_PRIORITIES PriorityInfoT = new T_OA_PRIORITIES(); if (DaGr.ItemsSource != null) { foreach (object obj in DaGr.ItemsSource) { if (DaGr.Columns[0].GetCellContent(obj) != null) { CheckBox cb1 = DaGr.Columns[0].GetCellContent(obj).FindName("myChkBox") as CheckBox; //cb为 if (cb1.IsChecked == true) { PriorityInfoT = cb1.Tag as T_OA_PRIORITIES; break; } } } } if (!string.IsNullOrEmpty(PriorityInfoT.PRIORITIESID)) { PriorityForm AddWin = new PriorityForm(Action.Read, PriorityInfoT); EntityBrowser browser = new EntityBrowser(AddWin); browser.MinHeight = 220; browser.MinWidth = 300; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }); } else { //MessageBox.Show("请选择需要修改的公文类型"); ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "VIEW"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } }
private void btnEdit_Click(object sender, RoutedEventArgs e) { if (Priorities !=null) { PriorityForm AddWin = new PriorityForm(Action.Edit, Priorities); EntityBrowser browser = new EntityBrowser(AddWin); browser.MinHeight = 220; browser.MinWidth = 300; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }); } else { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } }