中小型酒店客房管理平台
目录
模块名称:find.aspx
1.前台主界面
2.后台代码
string strsql = string.Format("select * from Base where Rname like %{0}%", txtSearch.Text);
SqlDataSource1.SelectCommand = strsql;
GridView1.DataBind();
(四)向数据库中插入数据模块设计
说明:此界面为添加用户预定的房间信息完成预定操作。
模块名称:insert.aspx
1.主界面
2.添加引用
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using house.App_code;
using System.Data.SqlClient;
3输入名称查找数据后台代码
string strsql = string.Format("select * from pur where cusname={0}", txtId.Text);
4. 获取用户数的信息
string typeId = txtId.Te *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
xt;
string typename = txtName.Text;
string xid = txtRid.Text;
string typeprice = txtPrice.Text;
string typeadd = txtAdd.Text;
string typeamount = txtAmount.Text;
string Money = txtmoney.Text;
strsql = string.Format("insert into pur values({0},{1},{2},{3},{4},{5},{6})", typeId, typename,xid, typeprice, typeadd, typeamount, Money);
if (DbManager.ExecSQL(strsql) == true)
{
Response.Write("alert(添加成功)");
GridView1.DataBind();
}
GridView1.DataBind();
(五)数据库信息修改模块设计
说明:此界面为修改顾客预订房间的相关信息,根据顾客的需求修改相关的客房信息
1.主界面
2.信息修改后台代码
String strsql = string.Format("update book set cusname={0} ,tel={1},Idcard={2},Roomid={3},livedate={4},leavedate={5},Money={6} where bookId={7}", txtcusname.Text, txtTel.Text, txtIdcard.Text, txtRomeid.Text, txtlivedate.Text, txtleaxedate.Text, txtMoney.Text,txtid.Text);
if (DbManager.ExecSQL(strsql))
{
GridView1.DataBind();
Response.Write("alert(修改成功)");
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string strID = GridView1.DataKeys[e.RowIndex].Value.ToString();
txtcusname.Text = GridView1.Rows[e.RowIndex].Cells[1].Text;
}
(六)退房管理模块设计
模块名称:returnroom.aspx
说明:此界面为顾客离开旅馆时退房的操作界面
1.前台主界面
2.获取用户信息后台代码
string Stuname = txtName.Text;
string ID = txtid.Text;
string Rid = txtReason.Text;
string Date = txtAddress.Text;
string LDate = txtleave.Text;
string strsql = string.Format("delete from ReturnRoom where Idcard={0}", txtName.Text);
if (DbManager.ExecSQL(strsql) == true)
{
Response.Write("alert(退订成功)");
模块名称:find.aspx
1.前台主界面
2.后台代码
string strsql = string.Format("select * from Base where Rname like %{0}%", txtSearch.Text);
SqlDataSource1.SelectCommand = strsql;
GridView1.DataBind();
(四)向数据库中插入数据模块设计
说明:此界面为添加用户预定的房间信息完成预定操作。
模块名称:insert.aspx
1.主界面
2.添加引用
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using house.App_code;
using System.Data.SqlClient;
3输入名称查找数据后台代码
string strsql = string.Format("select * from pur where cusname={0}", txtId.Text);
4. 获取用户数的信息
string typeId = txtId.Te *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
xt;
string typename = txtName.Text;
string xid = txtRid.Text;
string typeprice = txtPrice.Text;
string typeadd = txtAdd.Text;
string typeamount = txtAmount.Text;
string Money = txtmoney.Text;
strsql = string.Format("insert into pur values({0},{1},{2},{3},{4},{5},{6})", typeId, typename,xid, typeprice, typeadd, typeamount, Money);
if (DbManager.ExecSQL(strsql) == true)
{
Response.Write("alert(添加成功)");
GridView1.DataBind();
}
GridView1.DataBind();
(五)数据库信息修改模块设计
说明:此界面为修改顾客预订房间的相关信息,根据顾客的需求修改相关的客房信息
1.主界面
2.信息修改后台代码
String strsql = string.Format("update book set cusname={0} ,tel={1},Idcard={2},Roomid={3},livedate={4},leavedate={5},Money={6} where bookId={7}", txtcusname.Text, txtTel.Text, txtIdcard.Text, txtRomeid.Text, txtlivedate.Text, txtleaxedate.Text, txtMoney.Text,txtid.Text);
if (DbManager.ExecSQL(strsql))
{
GridView1.DataBind();
Response.Write("alert(修改成功)");
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string strID = GridView1.DataKeys[e.RowIndex].Value.ToString();
txtcusname.Text = GridView1.Rows[e.RowIndex].Cells[1].Text;
}
(六)退房管理模块设计
模块名称:returnroom.aspx
说明:此界面为顾客离开旅馆时退房的操作界面
1.前台主界面
2.获取用户信息后台代码
string Stuname = txtName.Text;
string ID = txtid.Text;
string Rid = txtReason.Text;
string Date = txtAddress.Text;
string LDate = txtleave.Text;
string strsql = string.Format("delete from ReturnRoom where Idcard={0}", txtName.Text);
if (DbManager.ExecSQL(strsql) == true)
{
Response.Write("alert(退订成功)");
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/jsj/rjgc/1745.html