当前位置:首页 > C#数据库课程设计酒店管理系统
C#数据库课程设计
{
this.Close(); }
private void client_pay_Load(object sender, EventArgs e) {
if (roomnum.Text.Trim() == \ && username.Text.Trim() == \ && userid.Text.Trim() == \) {
this.roomnum.Text = pay_roomnum; this.userid.Text = pay_userid; this.username.Text = pay_username; }
}
private void btn_clear_Click(object sender, EventArgs e) {
this.roomnum.Text = \; this.userid.Text = \; this.username.Text = \;
}
private void btn_find_Click(object sender, EventArgs e) {
if (roomnum.Text!= \ && userid.Text != \) {
string str = livepay.find(roomnum.Text.Trim(), userid.Text.Trim()); if (str == \) {
m.message_box(\用??户??不?存??在¨2!ê? \);
} else {
username.Text = str; }
}
else { m.message_box(\请?输o?入¨?房¤?间?号?和¨a身|¨a份¤Y证?è号?!ê? \); } }
C#数据库课程设计
private void sum_Click(object sender, EventArgs e) {
if (userid.Text != \ && username.Text != \ && roomnum.Text != \) {
mny.Text = livepay.sum(roomnum.Text.Trim(), userid.Text.Trim()); factmny.Text = mny.Text; }
else { m.message_box(\请?确¨?¤认¨?用??户??是o?否¤?存??在¨2!ê? \); } }
private void btn_pay_Click(object sender, EventArgs e) {
if (userid.Text != \ && username.Text != \ && factmny.Text != \) {
string over = livepay.pay(userid.Text.Trim(), roomnum.Text.Trim(), factmny.Text.Trim());
if (over.Trim() == \) {
m.message_box(\结¨¢账?已??成¨|功| !ê? \); this.roomnum.Text = \; this.userid.Text = \; this.username.Text = \; this.mny.Text = \; this.factmny.Text = \; this.discount.Text = \;
} else {
m.message_box(\无T法¤?§结¨¢账?!ê? \); } }
else { m.message_box(\请?结¨¢算?后¨?结¨¢账?!ê? \); } }
private void discount_TextChanged(object sender, EventArgs e) {
factmny.Text = (Convert.ToInt32(mny.Text) * Convert.ToInt32(discount.Text) / 10).ToString(); } }
C#数据库课程设计
}
4.客户查询
namespace _2010_HotelManage {
public partial class client_search : Form {
Del_child Del_child = new Del_child(); authcode m = new authcode();
clientsearch clientsearch = new clientsearch();
public client_search() {
InitializeComponent(); }
private void client_search_Load(object sender, EventArgs e) {
string sql = \
RoomID,ClientBookIn.ClientID,ClientName,Sex,BookInDate,CheckDate,TotalMoney,NativePlace,Remark from ClientBookIn,Client where ClientBookIn.ClientID=Client.ClientID \;
clientsearch.BindData(sql,dataGridView1); }
private void btn_clear_Click(object sender, EventArgs e) {
this.username.Text = \; this.userid.Text = \;
}
private void btn_find_Click(object sender, EventArgs e) {
clientsearch.find(userid.Text.Trim(),username.Text.Trim(),dataGridView1); }
private void btn_living_Click(object sender, EventArgs e)
C#数据库课程设计
{
string sql = \
RoomID,ClientBookIn.ClientID,ClientName,Sex,BookInDate,CheckDate,TotalMoney,NativePlace,Remark from ClientBookIn,Client where ClientBookIn.ClientID=Client.ClientID and CheckDate is null\;
clientsearch.BindData(sql, dataGridView1); }
private void btn_pay_Click(object sender, EventArgs e) {
client_pay pay = new client_pay();
//string ms = dataGridView1.SelectedRows[0].Cells[5].Value.ToString();
if (dataGridView1.SelectedRows[0].Cells[5].Value.ToString() == \) {
m.message_box(\要?a结¨¢账?啦¤2!ê? \); pay.pay_roomnum =
dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); pay.pay_userid =
dataGridView1.SelectedRows[0].Cells[1].Value.ToString(); pay.pay_username =
dataGridView1.SelectedRows[0].Cells[2].Value.ToString(); Del_child.del_child(pay); } else {
m.message_box(\顾?客¨a已??经-结¨¢账?啦¤2!ê? \); }
}
private void btn_exit_Click(object sender, EventArgs e) {
this.Close(); } } }
5.系统帮助
namespace _2010_HotelManage
共分享92篇相关文档