void btnEdit_Click(object sender, RoutedEventArgs e) { this.cmbSolution.IsEnabled = true;//修改时启用选择方案cmbox if (DtGridArea.SelectedItems.Count > 0) { var item=DtGridArea.SelectedItems[0] as T_OA_AREADIFFERENCE; if ( Common.CurrentLoginUserInfo.UserPosts[0].CompanyID != item.CREATECOMPANYID) { Utility.ShowCustomMessage(MessageTypes.Caution, Utility.GetResourceStr("PROMPT"), "不能删除修改其他公司创建的的城市分类"); return; } AreaSortForm form = new AreaSortForm(FormTypes.Edit, (DtGridArea.SelectedItems[0] as T_OA_AREADIFFERENCE).AREADIFFERENCEID, solutionsObj); EntityBrowser browser = new EntityBrowser(form); browser.MinHeight = 200; browser.MinWidth = 600; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTERROR", "EDIT")); return; } }
void btnNew_Click(object sender, RoutedEventArgs e) { AreaSortForm form = new AreaSortForm(FormTypes.New, "", solutionsObj); EntityBrowser browser = new EntityBrowser(form); browser.MinHeight = 200; browser.MinWidth = 600; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { }); }