傻大方摘要:【酒店|酒店管理系统的设计( 四 )|管理|系统|设计】MySqlCommand cmd = new MySqlCommand(INSERT INTO room_book values( + textBox1.Text + , + 沈阳航空航天大学课程设计报告 -22- textBox2.Text + , + t 。 31、extBox3.Text + ), cn); int k = cm...
按关键词阅读: 设计 酒店 系统 管理
MySqlCommand cmd = new MySqlCommand(INSERT INTO room_book values( + textBox1.Text + , + 沈阳航空航天大学课程设计报告 -22- textBox2.Text + , + t 。
31、extBox3.Text + ), cn);
int k = cmd.ExecuteNonQuery();
if (k 0) MessageBox.Show(预订成功!);
foreach (Control c in this.Controls) if (c is TextBox) c.Text = ;
cn.Close();
private void button4_Click(object sender, EventArgs e) string cnStr = server=localhost;
user id=root;
password=mysql;
database=hotel;
MySq 。
32、lConnection cn = new MySqlConnection(cnStr);
cn.Open();
MySqlCommand cmd = new MySqlCommand(select room_id from consumer_room where consumer_room.deposit=0 , cn);
MySqlDataReader dr = cmd.ExecuteReader();
沈阳航空航天大学课程设计报告 -23- if (dr.Read() textBox3.Text = drroom_id.ToString();
cn.Close();
private voi 。
33、d button2_Click(object sender, EventArgs e) private void button3_Click(object sender, EventArgs e) this.Visible = false;
Form3 f = new Form3();
f.ShowDialog();
退房模块源代码: namespace Hotel public partial class Consumer退房 : Form public Consumer退房() InitializeComponent();
沈阳航空航天大学课程设计报告 -24- private void。
34、button2_Click(object sender, EventArgs e) this.Visible = false;
Form3 f = new Form3();
f.ShowDialog();
private void button1_Click(object sender, EventArgs e) string cnStr = server=localhost;
user id=root;
password=mysql;
database=hotel;
MySqlConnection cn = new MySqlConnection(cnStr);
cn.Open();
MySqlC 。
35、ommand cmd = new MySqlCommand(update consumer_room set name=null,tel=null,papers=null,p rice=0 , where room_id= + textBox1.Text + , cn);
int k = cmd.ExecuteNonQuery();
if (k 0) MessageBox.Show(退房成功!);
foreach (Control c in this.Controls) if (c is TextBox) 沈阳航空航天大学课程设计报告 -25- c.Text = ;
cn.Close();
p 。
【酒店|酒店管理系统的设计】36、rivate void button3_Click(object sender, EventArgs e) string cnStr = server=localhost;
user id=root;
password=mysql;
database=hotel;
MySqlConnection cn = new MySqlConnection(cnStr);
cn.Open();
MySqlCommand cmd = new MySqlCommand(select deposit from consumer_room where room_id= + textBox1.Text + , cn);
MySqlDataReader dr = cmd.ExecuteReader();
if (dr.Read() textBox2.Text = drdeposit.ToString();
。

稿源:(未知)
【傻大方】网址:/a/2021/0711/0022845504.html
标题:酒店|酒店管理系统的设计( 四 )