//初始化窗体 protected override void InitializeForm() { _DetailGroupControl = pnlDetail; _SummaryView = new DevGridView(gvMenus); _BLL = new bllMenuMgr(); _BLL.GetSummaryData(true); gcMenus.DataSource = _BLL.SummaryTable; tpSummary.PageVisible = true; tpDetail.PageVisible = false; tcBusiness.ShowTabHeader = DefaultBoolean.False; tcBusiness.SelectedTabPage = tpSummary; base.InitializeForm(); }
void btButtonSave_ItemClick(object sender, ItemClickEventArgs e) { IList<BarItem> Bitem = new List<BarItem>(); //(BarItem bt in barManager1.Items) foreach (BarItemLink btn in barToolButtons.ItemLinks) { BarItem bt = btn.Item as BarItem; if (bt.Visibility == DevExpress.XtraBars.BarItemVisibility.OnlyInCustomizing) continue; if (bt.Tag != null) { if (bt.Tag.ToString().ToUpper() == bt.Name.ToString().ToUpper()) //Msg.ShowInformation(bt.Name + "--" + bt.Caption); Bitem.Add(bt); } } Form currentForm = xtraTabbedMdiManager1.SelectedPage.MdiChild; if (currentForm.Tag != null && currentForm.Tag.ToString() != "0") { bllMenuMgr _bll = new bllMenuMgr(); bool success = _bll.ImportButton(Bitem, currentForm.Tag.ToString(), false); if (success) { string msg = string.Format("导入按钮数据成功!共更新{0}个,导入新按钮{1}个!", _bll.ButtonUpdated, _bll.ButtonInserted); bllComDataBaseTool.WriteLogOp("0", "0", msg); Msg.ShowInformation(msg); } } else Msg.ShowError(currentForm.Text + "没有查到功能ID,不能将Button保存"); }