示例#1
0
        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;
            }
        }
示例#2
0
        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;
                }
            });
        }
示例#3
0
        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;
            }
        }
示例#4
0
        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);
        }
示例#5
0
        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;
                }
            });
        }
示例#6
0
        private void Exit()
        {
            BasicForm f = this.ParentForm as BasicForm;

            if (f != null)
            {
                this.Close();
                f.DisplayOut((int)this.MenuId);
            }
            else
            {
                this.Close();
            }
        }
示例#7
0
        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;
                }
            });
        }