Example #1
0
        private void Login()
        {
            string operid = tbUserID.Text.Trim();
            string operPwd = tbPwd.Text.Trim();
            OpersService service = new OpersService();
            Opers op = service.GetOpersByOperID(operid);
            if (op != null)
            {
                App.userName = op.operName;
                App.userGights = op.openGrantRigts;

                this.DialogResult = System.Windows.Forms.DialogResult.OK;
            }
            else
            {
                FormMessage fm = new FormMessage("错误的用户名或密码", "提示");
                fm.ShowDialog();
            }
        }
Example #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     string envName = tbEnvName.Text.Trim();
     if (envName == "")
     {
         FormMessage fm = new FormMessage("请输入就餐环境名称", "提示");
         fm.ShowDialog();
     }
     else
     {
         try
         {
             TabEnvService.AddTabEnv(envName);
             this.DialogResult = System.Windows.Forms.DialogResult.OK;
         }
         catch (Exception ex)
         {
             FormMessage fm = new FormMessage(ex.Message, "错误提示");
             fm.ShowDialog();
         }
     }
 }
Example #3
0
        private void lbCount_Click(object sender, EventArgs e)
        {
            Label lb = (Label)sender;
            string custCount = nuCustCount.Value.ToString();
            string str = lb.Text;
            if (custCount == "0")
            {
                nuCustCount.Value = Convert.ToInt32(str);
            }
            else
            {

                string cc = custCount + str;
                try
                {
                    nuCustCount.Value = Convert.ToInt32(cc);
                }
                catch
                {
                    FormMessage fm = new FormMessage("开台人数超出范围,请重新输入", "开台错误");
                    fm.ShowDialog();
                }
            }
        }