//管理员登陆 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(); } }
//取消订单按钮 private void button7_Click(object sender, EventArgs e) { if (FMHelper.OpenYesNo("要取消订单吗")) { DeZhnagDan(); FMHelper.OpenOk("取消订单成功"); FMHelper.OpenDeskMenu(); this.Close(); } }
//结账按钮 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(); } } }
//店内按钮 private void button3_Click(object sender, EventArgs e) { FMHelper.OpenDeskMenu(); this.Close(); }