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(); } } }
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 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(); }
public override void SonLoad() { Model.SysParamter modelsys = bllsys.GetModel(1); isok.Value = modelsys.IsCy.ToString(); RoomTypeDdl.Attributes.Add("onchange", "selectChange(this)"); if (!IsPostBack) { GuestSourceData(); MethPayData(); RoomTypeData(); //BindHouseNumber(); HouseShameData(); RealPrice(); BindOkNum(Convert.ToInt32(this.RoomTypeDdl.SelectedValue)); maxNum.InnerText = BindMaxNum(Convert.ToInt32(this.RoomTypeDdl.SelectedValue)); string type = Request.QueryString["type"].ToString(); if (type == "add") { lblmsg.Text = "新增"; } else if (type == "edit") { lblmsg.Text = "修改"; deposit.Disabled = true; BookAddButton.Text = "更新"; id = Convert.ToInt32(Request.QueryString["id"].ToString()); nowModel = bllbr.GetModel(id); book_no_hid.Value = nowModel.book_no; //通过ID获得实体,然后为控件赋值 book_name.Value = nowModel.book_Name; tele_no.Value = nowModel.tele_no; onli_no.Value = nowModel.onli_no; real_time.Value = nowModel.time_to.ToString(); time_from.Value = Convert.ToDateTime(nowModel.time_from).ToString(); time_to.Value = Convert.ToDateTime(nowModel.real_time).ToString("yyyy-MM-dd"); mem_cardNo.Value = nowModel.mem_cardno; GuarWayDll.SelectedValue = nowModel.guar_way; GuestSourceDdl.SelectedValue = nowModel.source_id.ToString(); MethPayDdl.SelectedValue = nowModel.meth_pay_id.ToString(); deposit.Value = nowModel.deposit.ToString(); textRemaker.Value = nowModel.remark; if (nowModel.Accounts != "" && nowModel.Accounts != null) { BLL.customer bllcus = new BLL.customer(); accounts.Value = nowModel.Accounts;//协议单位编号 CpId.Value = nowModel.CpID.ToString(); Model.customer modelcus = bllcus.GetAccounts(nowModel.Accounts); customer.Value = modelcus.cName; } Dictionary <int, string> dic = new Dictionary <int, string>(); List <Model.Book_Rdetail> listbr = bllrd.GetListModel("Book_no='" + nowModel.book_no + "'"); foreach (Model.Book_Rdetail item in listbr) { if (dic.ContainsKey(item.Real_type_Id)) { continue; } dic.Add(item.Real_type_Id, "true"); List <Model.Book_Rdetail> lists = listbr.Where(d => d.Real_type_Id == item.Real_type_Id).ToList(); if (lists.Count > 1) { //item = lists[0]; } sbDel.Append("<tr class=\"tr\"><td class=\"w30\"><span>房 型:</span></td>"); sbDel.Append("<td class=\"w70\"><select name=\"RoomTypeDdl\" id=\"RoomTypeDdl\" onchange=\"selectChange(this)\">"); GetAllType(item); sbDel.Append("</select></td>"); sbDel.Append("<td class=\"w30\">"); sbDel.Append("<span>方 案:</span>"); sbDel.Append("</td>"); sbDel.Append("<td class=\"w70\">"); sbDel.Append("<select name=\"HouseShameDdl\" id=\"HouseShameDdl\">"); GetAllYh(item); sbDel.Append("</select>"); sbDel.Append("</td>"); sbDel.Append("<td class=\"w30\">"); sbDel.Append("<span>房 价:</span>"); sbDel.Append("</td>"); sbDel.Append("<td class=\"w70\">"); sbDel.Append("<input name=\"real_price\" type=\"text\" id=\"real_price\" class=\"txtprice\" value=\"" + item.Real_Price + "\">"); sbDel.Append("</td>"); sbDel.Append("<td class=\"w70\">可预定数:<span id=\"txtOkNum\" runat=\"server\" class=\"txtprice\" >" + BindOkNum1(item.Real_type_Id) + "</span><span runat=\"server\" id=\"maxNum\" style=\" display:none;\">" + BindMaxNum(item.Real_type_Id) + "</span></td>"); sbDel.Append("<td class=\"w50\">"); sbDel.Append("<span>房间数量:</span>"); sbDel.Append("</td>"); sbDel.Append("<td class=\"w\" style=\"width:220px;\">"); sbDel.Append("<p onclick=\"SaleRealNum(this)\" class=\"jians\">"); sbDel.Append("-</p>"); sbDel.Append("<p style=\"float: left;\">"); if (lists.Count > 1) { sbDel.Append(" <input name=\"real_num\" type=\"text\" id=\"real_num\" value=\"" + lists.Count + "\" class=\"number fjslInp\"></p>"); } else { sbDel.Append(" <input name=\"real_num\" type=\"text\" id=\"real_num\" value=\"" + item.Real_num + "\" class=\"number fjslInp\"></p>"); } sbDel.Append("<p onclick=\"addRealNum(this)\" class=\"jia\">"); sbDel.Append(" +</p>"); sbDel.Append(" <p onclick=\"funAddTable()\" class=\"addBook\">"); sbDel.Append(" 添加</p>"); sbDel.Append(" <p class=\"delBook\" onclick=\"DelTr(this)\">"); sbDel.Append(" 删除</p>"); sbDel.Append("</td>"); sbDel.Append(" <td class=\"w30\">"); sbDel.Append(" <span>房 号:</span>"); sbDel.Append(" </td>"); sbDel.Append(" <td class=\"w30\" style=\"width:60px;\">"); if (lists.Count > 1) { sbDel.Append(" <span id=\"fh\">" + Geta(lists) + "</span><span class=\"yffh addBook\" onclick=\"ShowDiog(this)\" style=\" cursor:pointer;\">预 分</span>"); } else { sbDel.Append(" <span id=\"fh\"><a>" + item.Room_number + "</a></span><span class=\"yffh addBook\" onclick=\"ShowDiog(this)\" style=\" cursor:pointer;\">预 分</span>"); } sbDel.Append(" </td>"); sbDel.Append(" <td class=\"w70\">"); sbDel.Append(" <span id=\"HouseNumDdl\"></span>"); sbDel.Append(" </td>"); sbDel.Append(" </tr>"); } if (Request["isok"] != null) { bool b = Convert.ToBoolean(Request["isok"]); if (b) { BookAddButton.Style.Add("display", "none"); } } } } }