public virtual void ToolButtonClick(string name) { switch (name) { case "导出": Export(); break; case "打印": Print(); break; case "过滤": Filter(); break; case "刷新": RefreshData(); break; case "退出": BasicForm f = this.ParentForm as BasicForm; if (f != null) { this.Close(); f.DisplayOut((int)this.MenuId); } else { this.Close(); } break; } }
private void InitToolBar() { this.gToolBar1.AddButton("新增"); this.gToolBar1.AddButton("修改"); this.gToolBar1.AddButton("退出"); this.gToolBar1.ButtonClick = new Controls.GToolBar.GToolBar.FunButtonClick(name => { switch (name) { case "新增": NewWHB(); break; case "修改": ModifyWHB(); break; case "退出": BasicForm f = this.ParentForm as BasicForm; if (f != null) { this.Close(); f.DisplayOut((int)this.MenuId); } else { this.Close(); } break; } }); }
public virtual void ToolButtonClick(string name) { switch (name) { case "新增": SetReadOnly(false); this.New(); break; case "保存": if (this.CurEditStatus != EditorStatus.Look) { this.Save(); } break; case "退出": BasicForm f = this.ParentForm as BasicForm; if (f != null) { this.Close(); f.DisplayOut((int)this.MenuId); } else { this.Close(); } break; default: break; } }
public override void ToolButtonClick(string name) { switch (name) { case "增行": if (this.CurEditStatus != EditorStatus.Look) { AddRow(); } break; case "删行": if (this.CurEditStatus != EditorStatus.Look) { DeleteRow(); } break; case "退出": BasicForm f = this.ParentForm as BasicForm; if (f != null) { this.Close(); f.DisplayOut((int)this.MenuId); } else { this.Close(); } break; } base.ToolButtonClick(name); }
public override void InitToolBar() { this.gToolBar1.ClearButton(); foreach (string s in listTool) { this.gToolBar1.AddButton(s); } this.gToolBar1.ButtonClick = new Controls.GToolBar.GToolBar.FunButtonClick(name => { switch (name) { case "新增": this.New(); break; case "保存": this.Save(); break; case "增行": AddRow(); break; case "删行": DeleteRow(); break; case "打印": PrintSale(true); break; case "预览": PrintSale(false); break; case "退出": BasicForm f = this.ParentForm as BasicForm; if (f != null) { this.Close(); f.DisplayOut((int)this.MenuId); } else { this.Close(); } break; default: break; } }); }
private void Exit() { BasicForm f = this.ParentForm as BasicForm; if (f != null) { this.Close(); f.DisplayOut((int)this.MenuId); } else { this.Close(); } }
private void InitToolBar() { this.gToolBar1.AddButton("新增"); this.gToolBar1.AddButton("修改"); this.gToolBar1.AddButton("删除"); this.gToolBar1.AddButton("刷新"); this.gToolBar1.AddButton("-"); this.gToolBar1.AddButton("过滤"); this.gToolBar1.AddButton("|"); this.gToolBar1.AddButton("退出"); this.gToolBar1.ButtonClick = new Controls.GToolBar.GToolBar.FunButtonClick(name => { switch (name) { case "新增": AddNew(); break; case "修改": Modify(); break; case "刷新": RefreshData(); break; case "删除": this.Delete(); break; case "过滤": Filter(); break; case "退出": BasicForm f = this.ParentForm as BasicForm; if (f != null) { this.Close(); f.DisplayOut((int)this.MenuId); } else { this.Close(); } break; } }); }