public PriorityForm(Action actionenum, T_OA_PRIORITIES typeObj) { InitializeComponent(); action = actionenum; this.typeObj = typeObj; this.Loaded += new RoutedEventHandler(PriorityForm_Loaded); }
void DaGr_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { Priorities = (T_OA_PRIORITIES)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
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 GetDocTypeDetailInfo(T_OA_PRIORITIES TypeObj) { this.txtcontent.Text = TypeObj.PRIORITIES; this.txtcontent.IsEnabled = false; tmpProritityT = TypeObj; }
//改 public void DocPriorityInfoUpdate(T_OA_PRIORITIES obj) { BumfPrioritiesManagementBll PriorityBll = new BumfPrioritiesManagementBll(); PriorityBll.UpdatePrioritiesInfo(obj); }
//增 public string DocPriorityAdd(T_OA_PRIORITIES obj) { BumfPrioritiesManagementBll PriorityBll = new BumfPrioritiesManagementBll(); return(PriorityBll.AddPrioritiesInfo(obj)); }
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 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) => { }); }
//增 public string DocPriorityAdd(T_OA_PRIORITIES obj) { BumfPrioritiesManagementBll PriorityBll = new BumfPrioritiesManagementBll(); return PriorityBll.AddPrioritiesInfo(obj); }