餐饮管理系统/Frm_YuDing.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
//问题:检查验证!
//测试能不能添加数据到表!
namespace 餐饮管理系统
{
public partial class Frm_YuDing : Form
{
public Frm_YuDing()
{
InitializeComponent();
}
//点击取消
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
//添加预订信息到表
private void button1_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(txtydname.Text.Trim()))
{
MessageBox.Show("必须填写顾客姓名!", "预订失败", MessageBoxButtons.OK, MessageBoxIcon.Information);
txtydname.Focus();
txtydname.SelectAll();
return;
}
if (string.IsNullOrEmpty(txtxxydlxdh.Text.Trim()))
{
MessageBox.Show("必须填写顾客的联系电话!", "预订失败", MessageBoxButtons.OK, MessageBoxIcon.Information);
txtydname.Focus();
txtydname.SelectAll();
return;
}
//检查输入的是否为数字!
//if (txtxxydlxdh.Text)
//{
//}
//到不了这里!
//检查预订的时间如果和当前的系统时间就记录预订的时间了没有!
if (ti.Equals(xttime))
{
DialogResult result = MessageBox.Show("请确定为顾客记录预订的时间了吗?", "操作", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
string sql = string.Format("insert 预订表 values ('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}' )", txtctno.Text, txtctwz.Text, txtydname.Text, txtydmoney.Text, dtpxxtime.Text, txtxxydlxdh.Text, txtygno.Text, txtydbz.Text);
int i = Public_Frm.dataUpdate(sql);
string sqla = string.Format("update 大厅表 set dtState='{0}' where czNo='{1}'", "预订中", Public_Frm.czno);
int a = Public_Frm.dataUpdate(sqla);
string sqlb = string.Format("update 餐厅总表 set ctState='{0}' where ctNo='{1}'", "预订中", Public_Frm.czno);
int b = Public_Frm.dataUpdate(sqlb);
if (i > 0 && a > 0 && b > 0)
{
MessageBox.Show("预订成功!", "预订", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
后面还有 44 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
