Beispiel #1
0
 private void ToolBar1_ButtonClick(System.Object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     switch (ToolBar1.Buttons.IndexOf(e.Button))
     {
         case 0: //时间段
             //选择营业时段
             SelTimeBlock selecttimeblock = new SelTimeBlock();
             selecttimeblock.ShowDialog();
             StatusBar1.Panels[0].Text = "当前营业时段:" + rms_var.TimeBlock;
             break;
         case 2: //新建预订
             MenuItem34_Click(sender, e);
             break;
         case 3: //订单管理
             ShowAppoint();
             break;
         case 5: //桌台状态
             ShowTableSatus();
             break;
         case 6: //输入单据
             ShowInputBillForm();
             break;
         case 8: //结帐查询
             ShowBalanceQry();
             break;
         case 9: //收款查询
             ShowBalanceTypeQry();
             break;
         case 11: //添加客户
             MenuItem39_Click(sender, e);
             break;
         case 12: //客户管理
             ShowCustForm();
             break;
         case 14:
             ShowDevForm();
             break;
         case 16:
             MenuItem20_Click(sender, e);
             break;
         case 18: //关闭
             this.Close();
             break;
     }
 }
Beispiel #2
0
        private void mainform_Load(System.Object sender, System.EventArgs e)
        {
            //if (!Authorize.GetValidityUUID(rms_var.ReadStrfromReg("Key", "")))
            //{
            //    MessageBox.Show("授权无效");
            //    Application.Exit();
            //    return;
            //}
            rms_var.mainfrm = this;
            //创建类库对象的实例,只创建这一次
            rms_var.TheAppExt = new AppExt.CAppExt();
            //显示OEM Apptitle
            this.Text = rms_var.TheAppExt.GetAppTitle + this.Text;
            rms_var.TheAppExt.LogModule = 3; //报告登录的是->前台管理模块
            MnuAbout.Text ="关于 " + rms_var.TheAppExt.GetAppTitle;

            string rtn = rms_var.TheAppExt.ShowLogForm("前台管理");
            if (rtn.Trim() == "-1")
            {
                Application.Exit();
                return;
            }
            else
            {
                rms_var.ConnStr = rms_var.TheAppExt.GetConnStr; //复制远程连接字符串
                if (rms_var.GetCurrentTableNoBillsCount("") >= 200)
                {
                    return;
                }
                rms_var.ReceiveOperatorInfo(rtn);
                //选择营业时段
                SelTimeBlock selecttimeblock = new SelTimeBlock();
                selecttimeblock.ShowDialog();
                StatusBar1.Panels[0].Text = "当前营业时段:" + rms_var.TimeBlock;
                StatusBar1.Panels[1].Text = "登录用户ID:" + rms_var.opinfo.OpID;
                StatusBar1.Panels[2].Text = "姓名:" + rms_var.opinfo.EmployeeName;
                StatusBar1.Panels[3].Text = "所属部门:" + rms_var.opinfo.Department;
                StatusBar1.Panels[5].Text = "登录时间:" + DateTime.Now.ToString();
                this.WindowState = FormWindowState.Maximized;
            }
        }
Beispiel #3
0
        private void MenuItem26_Click(System.Object sender, System.EventArgs e)
        {
            if (MessageBox.Show("确定要注销当前登录的用户,并且重新登录系统吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
            {
                //关闭所有mdi子窗口
                Form childform;
                for (int i = 0; i <= this.MdiChildren.Length - 1; i++)
                {
                    childform = this.MdiChildren[0];
                    if (childform != null)
                    {
                        childform.Close();
                    }
                }

                rms_var.mainfrm = this;
                rms_var.TheAppExt.LogModule = 3; //报告登录的是->前台管理模块
                string rtn = rms_var.TheAppExt.ShowLogForm("前台管理");
                if (rtn.Trim() == "-1")
                {
                    Application.Exit();
                }
                else
                {
                    rms_var.ReceiveOperatorInfo(rtn);

                    //选择营业时段
                    SelTimeBlock selecttimeblock = new SelTimeBlock();
                    selecttimeblock.ShowDialog();

                    StatusBar1.Panels[0].Text = "当前营业时段:" + rms_var.TimeBlock;
                    StatusBar1.Panels[1].Text = "登录用户ID:" + rms_var.opinfo.OpID;
                    StatusBar1.Panels[2].Text = "姓名:" + rms_var.opinfo.EmployeeName;
                    StatusBar1.Panels[3].Text = "所属部门:" + rms_var.opinfo.Department;
                    StatusBar1.Panels[5].Text = "登录时间:" + DateTime.Now.ToString();

                    this.WindowState = FormWindowState.Maximized;
                }
            }
        }