예제 #1
0
파일: Login.cs 프로젝트: YunoGit/eat
 //管理员登陆
 public void AdminLogin()
 {
     try
     {
         dbh.DBOpen();
         string     sql  = "select count(*) from [user] where id='" + this.textId.Text.Trim() + "' and pwd='" + this.textPwd.Text.Trim() + "'";
         SqlCommand comm = new SqlCommand(sql, dbh.Conn);
         if ((int)comm.ExecuteScalar() == 1)
         {
             FMHelper.OpenDeskMenu();
             this.Hide();
         }
         else
         {
             FMHelper.OpenOk("账号或密码错误");
         }
     }
     catch (Exception ex)
     {
         text = ex.Message;
         ShowMessage();
     }
     finally
     {
         dbh.DBClose();
     }
 }
예제 #2
0
파일: AddFood.cs 프로젝트: YunoGit/eat
 //取消订单按钮
 private void button7_Click(object sender, EventArgs e)
 {
     if (FMHelper.OpenYesNo("要取消订单吗"))
     {
         DeZhnagDan();
         FMHelper.OpenOk("取消订单成功");
         FMHelper.OpenDeskMenu();
         this.Close();
     }
 }
예제 #3
0
 //结账按钮
 private void button7_Click(object sender, EventArgs e)
 {
     if (PayCheck())
     {
         if (FMHelper.OpenYesNo("要确认结账吗"))
         {
             PayYes();
             PayOk frm = new PayOk();
             frm.zhangDanId = ZhangDanId;
             frm.money      = realMoney.ToString();
             if (this.textName.Text != string.Empty)
             {
                 frm.vip = this.textSelect.Text;
             }
             frm.jiFen = jiFen.ToString();
             frm.ShowDialog();
             FMHelper.OpenDeskMenu();
             this.Close();
         }
     }
 }
예제 #4
0
 //店内按钮
 private void button3_Click(object sender, EventArgs e)
 {
     FMHelper.OpenDeskMenu();
     this.Close();
 }