傻大方


首页 > 学习 >

酒店|酒店管理系统的设计( 三 )



按关键词阅读: 设计 酒店 系统 管理


private void button4_Click(object sender, EventArgs e) this.Visible = false;
CC欢迎来到度假酒店 f = new CC欢迎来到度假酒店();
f.ShowDialog();
private void butto 。

18、n2_Click(object sender, EventArgs e) this.Visible = false;
Form财务 f= new Form财务();
f.ShowDialog();
namespace Hotel public partial class Form3 : Form public Form3() 沈阳航空航天大学课程设计报告 -15- InitializeComponent();
private void button4_Click(object sender, EventArgs e) this.Visible = false;
Form2 f = new Fo 。

19、rm2();
f.ShowDialog();
private void button1_Click(object sender, EventArgs e) this.Visible = false;
Consumer办理入住cs f = new Consumer办理入住cs();
f.ShowDialog();
private void button2_Click(object sender, EventArgs e) this.Visible = false;
Consumer预定 f = new Consumer预定();
f.ShowDialog();
private void butt 。

20、on3_Click(object sender, EventArgs e) this.Visible = false;
沈阳航空航天大学课程设计报告 -16- Consumer退房 f = new Consumer退房();
f.ShowDialog();
入住酒店模块源代码: namespace Hotel public partial class Consumer办理入住cs : Form public Consumer办理入住cs () InitializeComponent();
private void button1_Click(object sender, EventArgs e 。

21、) string cnStr = server=localhost;
user id=root;
password=mysql;
database=hotel;
MySqlConnection cn = new MySqlConnection(cnStr);
cn.Open();
MySqlCommand cmd = new MySqlCommand(INSERT INTO consumer_room values( + textBox1.Text + , + textBox2.Text + , + textBox3.Text + , + textBox4.Text + , + textBox5.T 。

22、ext + , + textBox6.Text + ), cn);
int k = cmd.ExecuteNonQuery();
if (k 0) 沈阳航空航天大学课程设计报告 -17- MessageBox.Show(添加成功!);
foreach (Control c in this.Controls) if (c is TextBox) c.Text = ;
cn.Close();
private void button2_Click_1(object sender, EventArgs e) string cnStr = server=localhost;
user id=root;
pa 。

23、ssword=mysql;
database=hotel;
MySqlConnection cn = new MySqlConnection(cnStr);
cn.Open();
MySqlCommand cmd = new MySqlCommand(update consumer_room set name= + textBox2.Text + ,tel= + textBox3.Text + ,papers= + textBox4.Text + ,price= + textBox5.Text + ,deposit= + textBox6.Text + where room_id= + text 。

24、Box1.Text + , cn);
try int k = cmd.ExecuteNonQuery();
沈阳航空航天大学课程设计报告 -18- if (k 0) MessageBox.Show(修改成功!);
foreach (Control c in this.Controls) if (c is TextBox) c.Text = ;
catch (SqlException) MessageBox.Show(修改失败!);
foreach (Control c in this.Controls) if (c is TextBox) c.Text = ;
cn.Close();
priv 。

25、ate void button3_Click_1(object sender, EventArgs e) 沈阳航空航天大学课程设计报告 -19- string cnStr = server=localhost;
user id=root;
password=mysql;
database=hotel;
MySqlConnection cn = new MySqlConnection(cnStr);
cn.Open();
MySqlCommand cmd = new MySqlCommand(select * from consumer_room where( room_id= + textBox1. 。

26、Text + ), cn);
MySqlDataReader dr = cmd.ExecuteReader();
if (dr.Read() textBox1.Text = drroom_id.ToString();
textBox2.Text = drname.ToString();
textBox3.Text = drtel.ToString();
textBox4.Text = drpapers.ToString();
textBox5.Text = drprice.ToString();
else textBox1.Text = null;
textBox2.Text = null;


27、textBox3.Text = null;
textBox4.Text = null;
textBox5.Text = null;
label6.Text = 查找的信息不存在!;
沈阳航空航天大学课程设计报告 -20- dr.Close();
cn.Close();
private void button5_Click_1(object sender, EventArgs e) this.Visible = false;
Form3 f = new Form3();
f.ShowDialog();
private void button4_Click(object sender, Event 。

28、Args 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 u , room_book r where u.room_id=r.room_id and u.room_id = + textBox1.Text + , cn);
MyS 。

29、qlDataReader dr = cmd.ExecuteReader();
if (dr.Read() if (drdeposit.Equals(0) MessageBox.Show(该房间可以使用!);
沈阳航空航天大学课程设计报告 -21- else MessageBox.Show(该房间已被使用 , 请换房间号!);
cn.Close();
预定房间源代码: namespace Hotel public partial class Consumer预定: Form public Consumer预定() InitializeComponent();
private void button1 。

30、_Click(object sender, EventArgs e) string cnStr = server=localhost;
user id=root;
password=mysql;
database=hotel;
MySqlConnection cn = new MySqlConnection(cnStr);
cn.Open();


稿源:(未知)

【傻大方】网址:/a/2021/0711/0022845504.html

标题:酒店|酒店管理系统的设计( 三 )


上一篇:英语|高三英语模拟题3

下一篇:845368056|845368056不定时劳动合同范本