//第一次加载显示的值 public void RealPrice() { //先获取房型房价 然后再打折扣 int room_type_Id = Convert.ToInt32(this.RoomTypeDdl.SelectedValue); Model.room_type model = rtBll.GetModel(room_type_Id); pricetxt.Value = Convert.ToDecimal(model.room_listedmoney).ToString("0.##"); int house_shame_id = Convert.ToInt32(this.HouseShameDdl.SelectedValue); Model.hourse_scheme hsmodel = hsBll.GetModel(house_shame_id); double room_money = (Convert.ToDouble(model.room_listedmoney)); double discount = (Convert.ToDouble(hsmodel.hs_Discount)); this.real_price.Value = (room_money * discount).ToString(); //默认来店时间 this.time_to.Value = System.DateTime.Now.Date.ToShortDateString(); //默认入住时间 this.real_time.Value = System.DateTime.Now.Date.AddDays(1).ToShortDateString() + " " + "18:00"; Model.SysParamter modelsys = new Model.SysParamter(); BLL.SysParameter blls = new SysParameter(); modelsys = blls.GetModel(1); TimeSpan dt1 = TimeSpan.Parse(modelsys.DayOutTime.ToString());//得到系统设置的天房退房时间 //默认离店时间 this.time_from.Value = System.DateTime.Now.Date.AddDays(2).AddHours(dt1.Hours).ToString(); }
/// <summary> /// 通过房型与和协议获得价格 /// </summary> private void GetPrice() { int cpid = Convert.ToInt32(context.Request.QueryString["cpid"]); int typeid = Convert.ToInt32(context.Request.QueryString["typeid"]); Model.cprotocol modelcp = bllcp.GetModel(cpid); if (!modelcp.Isdiscount) { //如果没有使用固定折扣值 List <Model.cprotocolPrice> listap = bllcprice.GetModelList("cpID=" + cpid + " and RoomType=" + typeid); if (listap.Count > 0) { string str = js1.Serialize(listap); Common.AjaxMsgHelper.AjaxMsg1("ok", "", str, ""); } else { decimal dc = Convert.ToDecimal(bllrt.GetModel(typeid).room_listedmoney); decimal zkz = Convert.ToDecimal(modelcp.discount); var obj = new { Price = dc, protoPrice = (dc * zkz).ToString() }; string str = js1.Serialize(obj); Common.AjaxMsgHelper.AjaxMsg1("err", "", str, ""); } } else //如果使用固定折扣值 { decimal dc = Convert.ToDecimal(bllrt.GetModel(typeid).room_listedmoney); decimal zkz = Convert.ToDecimal(modelcp.discount); var obj = new { Price = dc, protoPrice = (dc * zkz).ToString() }; string str = js1.Serialize(obj); Common.AjaxMsgHelper.AjaxMsg1("err", "", str, ""); } }
/// <summary> /// 绑定房型 /// </summary> public void BindFX() { ddroomtype.DataSource = fxBll.GetAllList(); ddroomtype.DataBind(); txt_money.Value = fxBll.GetModel(Convert.ToInt32(ddroomtype.SelectedValue)).room_listedmoney.ToString(); // ddroomtype.Items.Insert(0, "请选择房型"); }
//获得房型名称 public string GetRealTypeName(int id) { BLL.room_type rtbll = new BLL.room_type(); Model.room_type model = rtbll.GetModel(Convert.ToInt32(id.ToString())); string a = rtbll.GetModel(Convert.ToInt32(id.ToString())).room_name; return(model.room_name); }
private void GetmaxNum() { string room_type_Id = context.Request.QueryString["typeid"]; //List<Model.room_number> list = bllrn.GetModelList("Rn_room=" + room_type_Id + " and Rn_state=3 and Rn_ToBe!=1"); double oknum = Convert.ToDouble(context.Request.QueryString["txtOkNum"]); double bfb = bllrt.GetModel(Convert.ToInt32(room_type_Id)).Room_Bfb; int maxNums = Convert.ToInt32(oknum + (oknum * bfb * 0.01)); context.Response.Write(maxNums); }
public void Bind() { string id = Request.QueryString["id"].ToString(); if (id == "") { return; } else { txt_roomName.Value = fmBll.GetModel(Convert.ToInt32(id)).room_name; txt_room_listedmoney.Value = Convert.ToDecimal(fmBll.GetModel(Convert.ToInt32(id)).room_listedmoney).ToString("0.##"); txt_room_zmmoney.Value = Convert.ToDecimal(fmBll.GetModel(Convert.ToInt32(id)).room_zmmoney).ToString("0.##"); txt_Reamker.Value = (fmBll.GetModel(Convert.ToInt32(id)).room_reamker).ToString(); txt_lcPrice.Value = Convert.ToDecimal(fmBll.GetModel(Convert.ToInt32(id)).Room_ealry_price).ToString("0.##"); txt_yzprice.Value = Convert.ToDecimal(fmBll.GetModel(Convert.ToInt32(id)).Room_Moth_price).ToString("0.##"); txt_iscy.Value = (fmBll.GetModel(Convert.ToInt32(id)).Room_Bfb).ToString(); if ((fmBll.GetModel(Convert.ToInt32(id)).room_hour == "允许")) { raddyes.Checked = true; } else { raddno.Checked = true; } } }
public void BookShow() { brModel = brBll.GetModel(Convert.ToInt32(id)); //预定人 this.lbname.Text = brModel.book_Name; //号码 this.lbtele.Text = brModel.tele_no; //客人来源 Model.guest_source gsModel = gsBll.GetModel(Convert.ToInt32(brModel.source_id)); this.lbsource.Text = gsModel.gs_name; //房型 Model.room_type rtModel = rtBll.GetModel(Convert.ToInt32(brModel.real_type_id)); //可退订金 this.lbdeposit.Text = (Convert.ToDouble(brModel.deposit)).ToString(); //来店时间 this.lbtimeto.Text = brModel.time_to.ToString(); //离店时间 this.lbtimefrom.Text = brModel.time_from.ToString(); //绑定房型下拉 }
public void Bind() { string id = Request.QueryString["id"].ToString(); if (id == "") { return; } else { txt_roomName.Value = fmBll.GetModel(Convert.ToInt32(id)).room_name; txt_room_listedmoney.Value = (fmBll.GetModel(Convert.ToInt32(id)).room_listedmoney).ToString(); txt_room_zmmoney.Value = (fmBll.GetModel(Convert.ToInt32(id)).room_zmmoney).ToString(); txt_Reamker.Value = (fmBll.GetModel(Convert.ToInt32(id)).room_reamker).ToString(); } }
public void BookShow() { brModel = brBll.GetModel(Convert.ToInt32(id)); if (brModel != null) { List <Model.Book_Rdetail> list = bllbr.GetListModel("Book_no='" + brModel.book_no + "'"); if (list != null) { //预定人 this.lbname.Text = brModel.book_Name; //号码 this.lbtele.Text = brModel.tele_no; //客人来源 Model.guest_source gsModel = gsBll.GetModel(Convert.ToInt32(brModel.source_id)); this.lbsource.Text = gsModel.gs_name; //房型 Model.room_type rtModel = rtBll.GetModel(Convert.ToInt32(list[0].Real_type_Id)); this.lbroomtype.Text = rtModel.room_name; //房数 this.lbrealnum.Text = list.Count.ToString(); //可退订金 this.lbdeposit.Text = (Convert.ToDouble(brModel.deposit)).ToString(); } } }
/// <summary> /// 绑定价格 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddroomtype_SelectedIndexChanged(object sender, EventArgs e) { txt_RoomNum.Value = ""; if (ddroomtype.SelectedIndex > 0) { txt_Money.Value = (fxBll.GetModel(Convert.ToInt32(ddroomtype.SelectedValue)).room_listedmoney).ToString(); } }
protected string GetName(int id) { Model.room_type model = bllrt.GetModel(id); if (model != null) { return(model.room_name); } return(""); }
protected string GetFxName(string fxid) { BLL.room_type bllrt = new BLL.room_type(); Model.room_type modelrt = bllrt.GetModel(Convert.ToInt32(fxid)); if (modelrt != null) { return(modelrt.room_name.ToString()); } return(""); }
protected string GetFxPrice(string fxid) { BLL.room_type bllrt = new BLL.room_type(); Model.room_type modelrt = bllrt.GetModel(Convert.ToInt32(fxid)); if (modelrt != null) { return(Convert.ToDecimal(modelrt.room_listedmoney).ToString("0.##")); } return(""); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindLD(); BindLC(); BindFX(); txt_modth.Value = fxBll.GetModel(Convert.ToInt32(ddroomtype.SelectedValue)).Room_Moth_price.ToString(); txt_lc.Value = fxBll.GetModel(Convert.ToInt32(ddroomtype.SelectedValue)).Room_ealry_price.ToString(); } }
public string BindMaxNum(int room_type_Id) { List <Model.room_number> list = bllrn.GetModelList("Rn_room=" + room_type_Id + " and Rn_state=3"); List <Model.book_room> listbook = bllbr.GetModelList("DateDiff(s,'" + Convert.ToDateTime(Convert.ToDateTime(this.real_time.Value).ToString("yyyy-MM-dd")).Add(SysModel.YsTime) + "',time_from)>0 and state_id in (1,6)"); int sumint = 0; if (listbook.Count > 0) { foreach (Model.book_room item in listbook) { List <Model.Book_Rdetail> listbrs = bllbrs.GetListModel("Book_no='" + item.book_no + "'"); sumint += listbrs.Count; } } double oknum = list.Count - sumint; double bfb = bllrt.GetModel(room_type_Id).Room_Bfb; int maxNums = Convert.ToInt32(oknum + (oknum * bfb * 0.01)); return(maxNums.ToString()); }
//获得房型名称 public string GetRealTypeName(object id) { if (id.ToString() == "") { return(""); } BLL.room_type rtbll = new BLL.room_type(); Model.room_type model = rtbll.GetModel(Convert.ToInt32(id.ToString())); if (model != null) { if (model.room_name != null) { if (model.room_name == "") { return(""); } } return(model.room_name); } return(""); }
//把预定的信息绑定到入住信息里面 public void bindInfo() { //房型 Model.book_room bkmodel = bkBll.GetModel(ids); Model.room_type rtmodel = fxBll.GetModel(Convert.ToInt32(bkmodel.real_type_id)); this.ddroomtype.SelectedValue = rtmodel.room_name; //设为不可编辑 this.ddroomtype.Enabled = false; //房价 this.txt_money.Value = (Convert.ToDouble(bkmodel.real_price)).ToString(); //姓名 this.txt_name.Value = bkmodel.book_Name; //电话 this.txt_lxphone.Value = bkmodel.tele_no; //预住天数 this.txt_Day.Value = bkmodel.real_num.ToString(); //时间 txt_rzdate.Value = System.DateTime.Now.ToString(); }
private string GetFxName(int id) { BLL.room_type bllrt = new BLL.room_type(); return(bllrt.GetModel(id).room_name); }
protected string Getyuan(int id) { BLL.room_type bllrt = new BLL.room_type(); return(bllrt.GetModel(id).room_name); }
//获得房型名称 public string GetRealTypeNamePrice(int id) { BLL.room_type rtbll = new BLL.room_type(); Model.room_type model = rtbll.GetModel(Convert.ToInt32(id.ToString())); return(Convert.ToDecimal(model.room_listedmoney).ToString("0.##")); }
public override void SonLoad() { if (!IsPostBack) { contents = ""; count = 0; yxcount = 0; BindFX(); BindZFFS(); BindSFZ(); string id = Request.QueryString["id"].ToString(); roomsidcs = ""; if (Request.QueryString["type"].ToString() == "0") { roomsid = (Request.QueryString["id"].ToString()); ids = Request.QueryString["id"].ToString(); DivDisHidroom.Style.Add("display", "none"); bindInfo(); BindKYGV(); occno = System.DateTime.Now.ToString().Replace("-", "").Replace(":", "").Replace(" ", "").Replace("/", ""); txt_ylDate.Value = System.DateTime.Now.AddDays(1).ToString(); } if (Request.QueryString["type"].ToString() == "1") { roomsid = fmmx.GetModel(Convert.ToInt32(Request.QueryString["id"].ToString())).room_number; ids = Request.QueryString["id"].ToString(); hidSuikeInfo.Value = fmmx.GetModel(Convert.ToInt32(ids.ToString())).room_number; BindUpdateInfo(); DivDisHidroom.Style.Add("display", "none"); // DivDisHid.Style.Add("display", ""); btn_rooms.Style.Add("display", "none"); btn_rooms.Value = ""; DivDisHidroom.Style.Add("display", "none"); txt_yjmoney.Disabled = true; DDlZffs.Enabled = false; btnAdds.Text = "修改"; } if (Request["type"] != null) { if (Request["type"].ToString() == "yding") { occno = System.DateTime.Now.ToString().Replace("-", "").Replace(":", "").Replace(" ", "").Replace("/", ""); ids = Request.QueryString["id"].ToString(); ydBindsInfo(); txt_yjmoney.Disabled = true; DDlZffs.Enabled = false; //string ydRoomnum = ""; DataSet dt = fhBll.GetList(" Rn_roomNum in (" + Request.QueryString["xqid"].ToString() + ")"); foreach (DataRow dr in dt.Tables[0].Rows) { if (roomsid == null || roomsid == "") { roomsid = dr["id"].ToString(); } else { roomsid += "," + dr["id"].ToString(); } } txt_roomnumber.Value = roomsid; DivDisHidroom.Style.Add("display", ""); btn_rooms.Value = "终止开房"; bindInfo(); BindYXGV(); BindKYGV(); } } roomycid = ""; cardnumber = ""; if (Request.QueryString["type"] == "0") { if (IsEraly()) { //DDlKffs.SelectedIndex = 4; if (Request.QueryString["type"].ToString() == "0") { txt_money.Value = bllrt.GetModel(Convert.ToInt32(fhBll.GetModel(Convert.ToInt32(ids)).Rn_room)).Room_ealry_price.ToString(); } else if (Request.QueryString["type"].ToString() == "1") { txt_money.Value = bllrt.GetModel(fmmx.GetModel(Convert.ToInt32(ids)).real_type_id).Room_ealry_price.ToString(); } else { txt_money.Value = bllrt.GetModel(fmrdet.GetListModel(" Book_no='" + Request.QueryString["ydbookno"].ToString() + "' and Room_number='" + Request.QueryString["rooms"].ToString() + "'")[0].Real_type_Id).Room_ealry_price.ToString(); } } TimeSpan dt1 = TimeSpan.Parse(modelsys.DayTime.ToString()); //得到时间 TimeSpan dt11 = TimeSpan.Parse(modelsys.DayOutTime.ToString()); //得到时间 DateTime dt2 = DateTime.Now; //得到当前时间 DateTime dts = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddHours(dt1.Hours); //得到今日凌晨房开始时间 TimeSpan to1 = dt2 - dts; if (to1.TotalSeconds < 0) { txt_ylDate.Value = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddHours(12).ToString(); } else { txt_ylDate.Value = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddDays(1).AddHours(dt11.Hours).ToString(); } } } }