using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ChangeForm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Maticsoft.BLL.RoomSales bll1 = new Maticsoft.BLL.RoomSales();
drpRoom.DataSource = bll1.GetListNoChk();
drpRoom.DataTextField = "RoomName";
drpRoom.DataValueField = "id";
drpRoom.DataBind();
Maticsoft.BLL.Room bll = new Maticsoft.BLL.Room();
DropDownList1.DataSource = bll.GetNoRoom();
DropDownList1.DataTextField = "RoomName";
DropDownList1.DataValueField = "id";
DropDownList1.DataBind();
}
}
//更改入住变成空房
private void UpdateroomStateNO()
{ string id = Hidden1.Value;
Maticsoft.Model.Room model = new Maticsoft.Model.Room();
model.RoosIs = "空房";
model.id = int.Parse(id);
Maticsoft.BLL.Room bll = new Maticsoft.BLL.Room();
bll.Update(model);
}
// 更改空房变成入住
private void UpdateroomStateIn()
{ string id = DropDownList1.SelectedValue;
Maticsoft.Model.Room model = new Maticsoft.Model.Room();
model.RoosIs = "已入住";
model.id = int.Parse(id);
Maticsoft.BLL.Room bll = new Maticsoft.BLL.Room();
bll.Update(model);
}
// 更改销售表中换过之后的房间编号和房间信息
private void UpdateRoomUserId()
{
string RoomName = this.DropDownList1.SelectedItem.Text;
int RoomId = int.Parse(this.DropDownList1.SelectedValue);
Maticsoft.Model.RoomSales model = new Maticsoft.Model.RoomSales();
model.RoomName = RoomName;
model.RoomId = RoomId;
model.id = int.Parse(drpRoom.SelectedValue);
Maticsoft.BLL.RoomSales bll = new Maticsoft.BLL.RoomSales();
bll.Update(model);
}
// 插入换房记录
private void InsertWardsRoom()
{
int FRoomId = int.Parse(Hidden1.Value);
int TRoomId = int.Parse(DropDownList1.SelectedValue);
string UserName = Hidden2.Value;
Maticsoft.Model.WardsRoom model = new Maticsoft.Model.WardsRoom();
model.FRoomId = FRoomId;
model.TRoomId = TRoomId;
model.UserName = UserName;