//更新连房ICOSession private void UpdateSeesion() { int index = 0; ListOcc = fmmx.GetModelList("occ_with='否' and state_id=0"); if (ListOcc.Count > 1) { foreach (Model.occu_infor item in ListOcc) { List <Model.occu_infor> listocc1 = fmmx.GetModelList("order_id='" + fmmx.GetModels(" where occ_with='否' and occ_no!='' and state_id=0 and room_number='" + item.room_number + "'").order_id + "' and occ_no!='' and state_id=0"); if (listocc1.Count > 1) { if (dicstr.ContainsKey(item.room_number.ToString())) { //如果包含 //LFimg = dicstr[drs["Rn_roomNum"].ToString()]; } else { index++; foreach (Model.occu_infor i1 in listocc1) { if (!dicstr.ContainsKey(i1.room_number)) { dicstr.Add(i1.room_number, "<img src='/admin/images/" + index + ".png' />"); } } } } } } context.Session["dic"] = dicstr; }
public override void SonLoad() { if (!IsPostBack) { //ids = Convert.ToInt32(Request.QueryString["id"]); string id = Request.QueryString["id"]; ids = blloc.GetModelList("order_id='" + id + "'")[0].occ_id; txt_hidid.Value = ids.ToString(); Model.occu_infor modelocc = fmOc.GetModel(ids); if (modelocc == null) { Model.room_number modelrn = bllrn.GetModel(ids); modelocc = blloc.GetModelList("room_number='" + modelrn.Rn_roomNum + "' and state_id=0")[0]; } prooccmodle = modelocc; occno = modelocc.occ_no.ToString(); orderid = modelocc.order_id.ToString(); orderids.Value = orderid; btnserch_Click(null, null); BindZFFS(); BindInfo(); occid = ""; hidids = ""; txt_id.Value = ids.ToString(); try { txt_ysqje.Value = fmrz.GetModels(" where ga_occuid='" + occno + "'").ga_price.ToString(); } catch { txt_ysqje.Value = "0.00"; } } }
private void Bind() { sbroom.Clear(); int id = Convert.ToInt32(Request.QueryString["id"]); string room = blloc.GetModel(id).room_number; orderid.Value = blloc.GetModel(id).order_id;//得到 点击的OrderID loadRoom.Value = blloc.GetModel(id).room_number; rep.DataSource = blloc.GetModelList("order_id!='" + orderid.Value + "' and state_id=0"); rep.DataBind(); }
/// <summary> /// 通过锁号找到房间号,开房方式,房型,开房时间,离开时间 /// </summary> private void GetInfoBySuo() { string SuoMa = context.Request.QueryString["SuoMa"]; BLL.SysParameter bllsys = new BLL.SysParameter(); Model.SysParamter modelsyts = bllsys.GetModel(1); string suo = modelsyts.MarkSuo; BLL.SuoRoom bllss = new BLL.SuoRoom(); List <Model.SuoRoom> listss = bllss.GetModelList("SuoType='" + suo + "' and SuoMa='" + SuoMa + "'"); string roomNumber = ""; string res = string.Empty; if (listss.Count > 0) { Model.SuoRoom modelss = listss[0]; roomNumber = modelss.RoomNumber; BLL.occu_infor blloc = new BLL.occu_infor(); List <Model.occu_infor> listocc = blloc.GetModelList("state_id=0 and room_number='" + roomNumber + "'"); if (listocc.Count > 0) { Model.occu_infor modelocc = listocc[0]; var obj = new { state = "0", occ_name = modelocc.occ_name.ToString(), occ_time = modelocc.occ_time.ToString(), depar_time = modelocc.depar_time.ToString(), fxxs = RealModel(modelocc.real_mode_id) }; res = js.Serialize(obj); } else { var obj = new { state = "1" }; } } context.Response.Write(res); }
/// <summary> /// 通过房号判断是否已开房 /// </summary> /// <param name="room"></param> /// <returns></returns> public static bool IsOcc(string room) { List <Model.occu_infor> list = blloi.GetModelList("state_id=0 and room_number='" + room + "'"); if (list != null && list.Count > 0) { return(true); } return(false); }
private void BindZz(int state) { List <string> listorder = new List <string>(); List <Model.occu_infor> listocc = null; if (Request.QueryString["orderid"] != null) { listocc = blloc.GetModelList("state_id=" + state + " and order_id!='" + Request.QueryString["orderid"] + "'"); } else { listocc = blloc.GetModelList("state_id=" + state); } if (listocc.Count > 0) { foreach (Model.occu_infor model in listocc) { if (!listorder.Contains(model.order_id)) { listorder.Add(model.order_id); if (state == 0) { sbhtml1.Append("<tr order='" + model.order_id + "' ids='" + model.occ_id + "'><td><input type='radio' name='ra' class='cbx'></td><td>" + model.room_number + "</td><td>" + model.occ_name + "</td><td>" + model.phonenum + "</td>" + BindGv(model.order_id) + "</tr>"); } else { sbhtml2.Append("<tr order='" + model.order_id + "' ids='" + model.occ_id + "'><td><input type='radio' name='ra' class='cbx'></td><td>" + model.room_number + "</td><td>" + model.occ_name + "</td><td>" + model.phonenum + "</td>" + BindGv(model.order_id) + "</tr>"); } } } } else { if (state == 0) { sbhtml1.Append("<TR><td colspan=\"7\">暂无可挂帐目标!</td></TR>"); } else { sbhtml2.Append("<TR><td colspan=\"7\">暂无可挂帐目标!</td></TR>"); } } }
private void getbind() { string txtname = context.Request.Form["typeName"]; string cardNo = context.Request.Form["carno"]; List <Model.occu_infor> list = fmoc.GetModelList("occ_name='" + txtname + "' and card_no='" + cardNo + "' "); JavaScriptSerializer js = new JavaScriptSerializer(); string str = js.Serialize(list); string finalStr = "{data:" + str + "}"; context.Response.Write(finalStr); }
public override void SonLoad() { if (Request["hfID"] != null) { hfID = Convert.ToInt32(Request["hfID"]); } modelafter = blloi.GetModel(hfID); List <Model.occu_infor> list = blloi.GetModelList("continuelive=" + hfID + " and occ_with='否' and state_id=0"); if (list != null) { modelh = list[0]; } }
/// <summary> /// 绑定入住人的信息 /// </summary> private void BindOcc() { List <Model.occu_infor> list = blloc.GetModelList("order_id='" + roomnum + "'"); if (list.Count > 0) { modelocc = list[0]; //string s1 = modelocc.depar_time; DateTime dtone = Convert.ToDateTime(Convert.ToDateTime(modelocc.depar_time).ToString("yyyy-MM-dd")); DateTime dtwo = Convert.ToDateTime(Convert.ToDateTime(modelocc.occ_time).ToString("yyyy-MM-dd")); TimeSpan span = dtone.Subtract(dtwo); //TimeSpan ts = Convert.ToDateTime(modelocc.depar_time) - Convert.ToDateTime(modeloi.occ_time); shijian = span.Days.ToString(); } }
private void Isroom() { string id = context.Request.QueryString["id"]; Model.room_number modelrn = bllrn.GetModel(Convert.ToInt32(id)); List <Model.occu_infor> listoc = blloi.GetModelList("state_id=0 and room_number='" + modelrn.Rn_roomNum + "'"); if (listoc.Count > 0) { context.Response.Write("ok"); } else { context.Response.Write("err"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string odrdersid = Request.QueryString["ga_sfacount"]; hidorder.Value = odrdersid; List <Model.occu_infor> listocc = bllocc.GetModelList("order_id='" + odrdersid + "'"); if (listocc.Count > 0) { markTime.InnerText = listocc[0].occ_time.ToString(); ydTime.InnerText = listocc[0].depar_time.ToString(); hidroom.Value = listocc[0].room_number; name.InnerText = listocc[0].occ_name; Span1.InnerText = GetRealModel(listocc[0].real_mode_id); } } }
public override void SonLoad() { if (!IsPostBack) { ids = Convert.ToInt32(Request.QueryString["id"]); txt_hidid.Value = ids.ToString(); Model.occu_infor modelocc = fmOc.GetModel(Convert.ToInt32(Request.QueryString["id"])); if (modelocc == null) { Model.room_number modelrn = bllrn.GetModel(ids); modelocc = blloc.GetModelList("room_number='" + modelrn.Rn_roomNum + "' and state_id=0")[0]; } prooccmodle = modelocc; if (modelocc.mem_cardno != "" && modelocc.mem_cardno != null) { btn_duihaun.Style.Add("display", "inline-block"); hycard.Value = modelocc.mem_cardno; } else { btn_duihaun.Style.Add("display", "none"); hycard.Value = ""; } zffs_id.Value = modelocc.meth_pay_id.ToString(); occno = modelocc.occ_no.ToString(); orderid = modelocc.order_id.ToString(); orderids.Value = orderid; accounts.Value = modelocc.Accounts; btnserch_Click(null, null); BindZFFS(); BindInfo(); occid = ""; hidids = ""; txt_id.Value = ids.ToString(); try { txt_ysqje.Value = fmrz.GetModels(" where ga_occuid='" + occno + "'").ga_price.ToString(); } catch { txt_ysqje.Value = "0.00"; } } }
private void Chafeng() { try { System.Text.StringBuilder sbtext = new System.Text.StringBuilder(); string occno = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("-", "").Replace(":", "").Replace(" ", "").Replace("/", ""); int id = Convert.ToInt32(context.Request.QueryString["id"]); Model.occu_infor modelocc = blloc.GetModel(id); if (modelocc.room_number == modelocc.lordRoomid) { context.Response.Write("err"); context.Response.End(); } else { List <Model.occu_infor> listicc = blloc.GetModelList("order_id='" + modelocc.order_id + "'"); foreach (Model.occu_infor item in listicc) { sbtext.Append(item.room_number + ","); } List <Model.goods_account> listga = bllga.GetModelList1("ga_occuid='" + modelocc.order_id + "' and ga_roomNumber='" + modelocc.room_number + "'"); if (listga.Count > 0) { foreach (Model.goods_account item in listga) { item.ga_occuid = occno; bllga.Update(item); } } Helper.AddRoom(modelocc.room_number, sbtext.ToString()); modelocc.order_id = occno; modelocc.GzRoom = ""; modelocc.lordRoomid = modelocc.room_number; blloc.Update(modelocc); context.Response.Write("ok"); context.Response.End(); } } catch (Exception ex) { throw; } }
public override void SonLoad() { modelsys = bllsys.GetModel(1); if (!IsPostBack) { string odrdersid = Request.QueryString["orders"]; hidorder.Value = odrdersid; List <Model.occu_infor> listocc = bllocc.GetModelList("order_id='" + odrdersid + "'"); if (listocc.Count > 0) { markTime.InnerText = listocc[0].occ_time.ToString(); ydTime.InnerText = listocc[0].depar_time.ToString(); hidroom.Value = listocc[0].room_number; name.InnerText = listocc[0].occ_name; Span1.InnerText = GetRealName(listocc[0].real_mode_id); // string BDatestr = DateTime.Now.ToString("yyMMddHHmm");//发卡时间必须取当前时间 //string EDatestr = DateTime.Now.AddDays(1).ToString("yyMMddHHmm"); BDate.Value = DateTime.Now.ToString("yyMMddHHmm"); //发卡时间必须取当前时间 EDate.Value = Convert.ToDateTime(listocc[0].depar_time).ToString("yyMMddHHmm"); //结束时间 LockNo.Value = GetSuoNumber(); //锁号 if (IsBack()) { LLockHid.Value = "1"; //开反锁标志 } else { LLockHid.Value = "0"; } if (IsComm()) { pdoorsHid.Value = "1"; //开反锁标志 } else { pdoorsHid.Value = "0"; } } } }
public void Bind() { sbhtml.Clear(); Dictionary <string, string> dicstr = new Dictionary <string, string>(); Dictionary <string, string> dicCz = new Dictionary <string, string>(); /*计算边房对应的图标*/ List <Model.occu_infor> listocc = fmmx.GetModelList("occ_with='否' and state_id=0"); dicstr = Session["dic"] as Dictionary <string, string>; dicCz = Session["iscz"] as Dictionary <string, string>; StrWheres(); DivContent.InnerHtml = ""; string sjsj = ""; string img = ""; string GoodNo = ""; Model.room_number frmfh = new Model.room_number(); Model.floor_manage frmlc = new Model.floor_manage(); DataTable dt = fmlc.GetListYou(); List <Model.room_number> listrn = bllrn.GetModelList(""); if (listrn.Count > 0) { allroom = listrn.Count; } DataSet dts = null; foreach (DataRow dr in dt.Rows) { dts = brBll.GetList(stwhere + " and Rn_floor=" + dr["floor_id"].ToString() + ""); //if (txt_Namesp.Value == "") //{ // dts = brBll.GetList(stwhere + " and Rn_floor=" + dr["floor_id"].ToString() + ""); //} //else if (txt_Namesp.Value == "欠费") //{ // string SQL = "select (SUM(ga_price)-SUM(ga_sum_price)) as c,ga_occuid from dbo.goods_account where ga_occuid in (select order_id from dbo.occu_infor where state_id=0) group by ga_occuid"; // spanqianf.Attributes.Add("class", "bor"); // dtQX = fmgood.GoodsQX(SQL); // foreach (DataRow drqf in dtQX.Tables[0].Rows) // { // if (Convert.ToDouble(drqf["c"]) < 0) // { // if (GoodNo == "") // { // drqfsb.Append("'" + drqf["ga_occuid"].ToString() + "'"); // } // else { drqfsb.Append("," + "'" + drqf["ga_occuid"].ToString() + "'"); } // } // } // if (drqfsb.ToString() == "") //如果没有欠费 // { // dts = brBll.GetList("1!=1"); // } // else//查询出来所有的欠费房间 // { // dts = brBll.GetListed(stwhere + " and Rn_floor=" + dr["floor_id"].ToString() + " and b.order_id in(" + drqfsb.ToString() + ")", " left join occu_infor as b on a.Rn_roomNum=b.room_number left join real_mode as c on b.real_mode_id=c.real_mode_id "); // } //} //else if (txt_Namesp.Value == "催帐") { // dts = brBll.GetListed("", "inner join( select * from occu_infor as oi inner join (select SUM(ga_price)-SUM(ga_sum_price) as sa,ga_occuid as t from goods_account where ga_isys=1 group by ga_occuid) as u on u.t =oi.order_id where u.sa<oi.real_price and datediff(D,[depar_time],'"+DateTime.Now.ToString()+"')=0) as uio on uio.room_number=a.Rn_roomNum and Rn_floor=" + dr["floor_id"].ToString() + ""); //} //else if (txt_Namesp.Value == "将走房") { // dts = brBll.GetList("Rn_floor=" + dr["floor_id"].ToString() + ""); //} //else //{ // dts = brBll.GetListed(stwhere + " and Rn_floor=" + dr["floor_id"].ToString() + "", " left join occu_infor as b on a.Rn_roomNum=b.room_number left join real_mode as c on b.real_mode_id=c.real_mode_id "); //} if (dts.Tables[0].Rows.Count > 0) { sbhtml.Append("<ul class='main'>"); foreach (DataRow drs in dts.Tables[0].Rows) { price = ""; Names = ""; xuzhu = ""; jzfimg = ""; LFimg = ""; totime = ""; numDay = ""; if ((drs["Rn_state"]) == null || drs["Rn_state"].ToString() == "") { drs["Rn_state"] = "0"; } FtNames = fmft.GetModel(Convert.ToInt32(drs["Rn_state"])).room_state_name; GetClass(Convert.ToInt32(drs["Rn_state"])); if (FtNames == "干净房") { sjsj = "ondblclick=\"ShowTabt('在住房信息'," + drs["id"].ToString() + ",0,this)\""; } else { sjsj = ""; } if (txt_Namesp.Value == "催帐") { czico = "<img src='/admin/images/iconcuizhang.png' />"; czCount++; } if (FtNames == "在住房" || FtNames == "脏住房") { try { a = drs["Rn_roomNum"].ToString(); lfcounts = 0; modelocc = fmmx.GetModels(" where occ_with='否' and state_id=0 and room_number='" + a + "'"); Names = modelocc.occ_name; totime = modelocc.occ_time.ToString("g"); real_mode_id = modelocc.real_mode_id; drs["id"] = modelocc.occ_id; switch (real_mode_id) { case 2: price = "<img src='../../images/sicon04.png' class=\"zdf\"/>"; zdfang++; break; case 19: price = "<img src='../../images/sicon01.png' class=\"yuezhu\"/>"; yzf++; break; case 5: price = "<img src='../../images/sicon03.png' class=\"lccio\" />"; lingcfang++; break; case 20: price = "<img src='/admin/images/iconfree.png' class=\"free\"/>"; mfcount++; break; default: break; } //str1 = "u.sa < " + modelocc.real_price + " and"; //if (modelfs.showday) //{ // str1 = "u.sa < " + Convert.ToInt32(modelfs.daynum) * modelocc.real_price + " and"; //} //else //{ // str1 = ""; //} //if (modelfs.showyue) //{ // str1 += " u.sa<" + modelfs.moneyNum + " and"; //} //dstable = brBll.GetProc(str1, Convert.ToInt32(dr["floor_id"]), a, DateTime.Now.ToString()); //dstable = brBll.GetListed("", "inner join( select * from occu_infor as oi inner join (select SUM(ga_price)-SUM(ga_sum_price) as sa,ga_occuid as t from goods_account where ga_isys=1 group by ga_occuid) as u on u.t =oi.order_id where " + str1 + " datediff(D,[depar_time],'" + DateTime.Now.ToString() + "')=0) as uio on uio.room_number=a.Rn_roomNum and Rn_floor=" + dr["floor_id"].ToString() + " and room_number='" + a + "'"); //if (dstable.Tables[0].Rows.Count > 0) //{ // if (modelfs.showyjb) // { // czico = "<img src='/admin/images/iconcuizhang.png'/>"; // } // czCount++; //} if (dicCz.ContainsKey(a.ToString())) { if (dicCz[a.ToString()].ToString() == "1") { if (modelfs.showyjb) { czico = "<img src='/admin/images/iconcuizhang.png'/>"; } czCount++; bs = true; } } date1 = Convert.ToDateTime(fmmx.GetModels(" where occ_with='否' and state_id=0 and real_mode_Id!=2 and real_mode_Id!=19 and room_number='" + a.ToString() + "'").depar_time.ToString()); date2 = System.DateTime.Now; cc = date1.Day - date2.Day; if (cc < 0) { cc = (Convert.ToDateTime(date1.ToString("yyyy-MM-dd")) - Convert.ToDateTime(date2.ToString("yyyy-MM-dd"))).Days; } if (modelfs.yuliDay) {//只是当日预离 if (cc == 0) { if (modelfs.showYuli) { //jzfimg = "<img src=\"/admin/images/iconjiangzou.png\">"; } jzhouf++; } } else if (modelfs.showDayTime) { //多少天内预离显示 if (Convert.ToInt32(cc) <= Convert.ToInt32(modelfs.dayNumYl)) { if (Convert.ToInt32(cc) == 0 || cc < 0) { numDay = "<span class=\"numday\"> </span>"; } else { numDay = "<span class=\"numday\">" + cc + "</span>"; } if (modelfs.showYuli) { //jzfimg = "<img src=\"/admin/images/iconjiangzou.png\">"; } jzhouf++; } } countxuzhu = fmmx.GetRecordCount(" where continuelive=" + modelocc.occ_id + ""); if (countxuzhu > 0) { xuzhu = "<img src=\"/admin/images/iconxz.png\">"; xuzhufang++; } countLF = fmmx.GetRecordCount(" where order_id='" + modelocc.order_id + "'"); if (listocc.Count > 1) { LFimg = dicstr[a.ToString()]; LFcount++; } //SQLlf = "select order_id from occu_infor where order_id in (select order_id from occu_infor group by order_id having count(order_id) > 1) group by order_id"; //DtLF = fmgood.GoodsQX(SQLlf); //LFcount = DtLF.Tables[0].Rows.Count; } catch { } } b = drs["Rn_roomNum"].ToString(); if (drs["Room_suod"].ToString().Trim() == "是")//是否为锁房间 { img = "<img src='/admin/images/iconsuofang.png' class=\"suofang\">"; sjsj = ""; suofang++; } else { img = ""; } yudao = string.Empty; string yustr = string.Empty; string yudaoDay = string.Empty; if (drs["Rn_Tobe"] != null)//是否为预定房间 { if (Convert.ToInt32(drs["Rn_Tobe"]) == 1) { yudao = GetYuDao(b); yustr = "yuding"; DateTime datestr = Convert.ToDateTime(yudao); DateTime dataend = Convert.ToDateTime(DateTime.Now); int days = datestr.Day - dataend.Day; if (days < 0) { TimeSpan tss = (Convert.ToDateTime(datestr.ToString("yyyy-MM-dd")) - Convert.ToDateTime(dataend.ToString("yyyy-MM-dd"))); days = tss.Days; } if (days <= 0) { yudaoDay = "<div class=\"yuding hrj\"> </div>"; yudao = Convert.ToDateTime(yudao).ToString("hh:mm"); } else { yudao = ""; yudaoDay = "<div class=\"yuding hrj\">" + days + "</div>"; } } } sbhtml.Append("<li class=\"hidli\" rooms=" + b + "><ul><li rooms=" + b + " id=" + Convert.ToInt32(drs["id"].ToString()) + " state=" + Convert.ToInt32(drs["Rn_state"]) + " " + sjsj + " class='" + yustr + " " + Style + "'><a href='#'><span class='span01'>" + b + "</span>" + numDay + "<span style='color:yellow'>" + ZC(drs["Rn_roomNum"].ToString()) + "</span><br /><span class=\"fxhrj\">" + fxdic[Convert.ToInt32(drs["Rn_room"])] + "</span> <p>" + img + "<span class=\"icospan\">" + price + "</span><span class=\"lfico\">" + LFimg + "</span><span class=\"qianfei\"></span> <span class=\"xuzhu\">" + xuzhu + "</span><span class=\"czimg\">" + czico + "</span><span class=\"jzfimg\">" + jzfimg + "</span><span class='totime'>" + totime + "</span></p><br /><span class='zuofu'>" + Names + "</span><span class='youfu'>" + Convert.ToDecimal(drs["Rn_price"].ToString()).ToString("0.##") + "</span><span class=\"yue1\"></span><span class=\"stime\"></span><span class=\"shengyu\"></span></a><span class=\"yudao\">" + yudao + "</span></span>" + yudaoDay + "</li></ul></li>"); czico = ""; bs = false; } sbhtml.Append("</ul>"); } } DivContent.InnerHtml = sbhtml.ToString(); }
/// <summary> /// 查询条件 /// </summary> public void StrWheres() { string a = txt_Namesp.Value; spanyzf.Attributes.Remove("class"); spanzdf.Attributes.Remove("class"); spanlingc.Attributes.Remove("class"); spanxuzhu.Attributes.Remove("class"); spansuofang.Attributes.Remove("class"); span1.Attributes.Remove("class"); span2.Attributes.Remove("class"); spanlf.Attributes.Remove("class"); spanjiangz.Attributes.Remove("class"); spanqianf.Attributes.Remove("class"); string s = ddroomtype.SelectedValue; if (a == "") { stwhere.Append("1=1 "); } else { stwhere.Append("1=1 and (b.state_id is null or b.state_id !=3 )"); } if (DDlouc.SelectedIndex > 0) { stwhere.Append(" and Rn_floor='" + DDlouc.SelectedValue + "'"); } if (ddroomtype.SelectedIndex > 0) { stwhere.Append(" and Rn_room=" + ddroomtype.SelectedValue + ""); } if (ddlState.SelectedIndex > 0) { stwhere.Append(" and Rn_state=" + ddlState.SelectedValue + ""); } if (sstext.Value != "") { List <Model.occu_infor> lio = bllic.GetModelList("occ_name like '%" + sstext.Value + "%'"); System.Text.StringBuilder sbroom = new System.Text.StringBuilder(); string r = string.Empty; if (lio.Count > 0) { foreach (Model.occu_infor item in lio) { sbroom.Append("'" + item.room_number + "',"); } r = sbroom.ToString().Remove(sbroom.Length - 1, 1); } else { r = "''"; } stwhere.Append(" and Rn_roomNum like '%" + sstext.Value + "%' or Rn_roomNum in(" + r + ")"); } if (ids != 0) { stwhere.Append(" and Rn_state=" + ids + ""); } if (ids == 999) { stwhere.Append(" 1=1 "); } if (a == "月租房") { stwhere.Append(" and b.real_mode_id=19 and state_id=0 "); spanyzf.Attributes.Add("class", "bor"); } if (a == "钟点房") { stwhere.Append(" and b.real_mode_id=2 and state_id=0 "); spanzdf.Attributes.Add("class", "bor"); } if (a == "凌晨房") { stwhere.Append(" and b.real_mode_id=5 and state_id=0 "); spanlingc.Attributes.Add("class", "bor"); } if (a == "续住") { stwhere.Append(" and occ_id in(select continuelive from occu_infor) and state_id=0 "); spanxuzhu.Attributes.Add("class", "bor"); } if (a == "锁房") { stwhere.Append(" and Room_suod='是'"); spansuofang.Attributes.Add("class", "bor"); } if (a == "催帐") { stwhere.Append(" and Room_suod='是'and state_id=0 "); span1.Attributes.Add("class", "bor"); } if (a == "免房") { stwhere.Append(" and b.real_mode_id=20 and state_id=0 "); span2.Attributes.Add("class", "bor"); } if (a == "联房") { stwhere.Append(" and order_id in (select order_id from occu_infor group by order_id having count(order_id) > 1) and state_id=0 "); spanlf.Attributes.Add("class", "bor"); } if (a == "将走房") { // stwhere += " and CONVERT(varchar(100), DATEADD (DAY,1,GETDATE()),20)=CONVERT(varchar(100), depar_time,20) and state_id=0 "; stwhere.Append(" and (datediff(HH,GETDATE(),depar_time))<=24 and state_id=0 and real_mode_id!=2"); spanjiangz.Attributes.Add("class", "bor"); } }
protected string GetMenu(int state, int id, string Roomid) { string FtName = ""; if (state != 0) { FtName = fmft.GetModel(state).room_state_name; } string html = ""; try { if (id.ToString() != "") { switch (FtName) { case "在住房": string cf = string.Empty; Model.occu_infor modelocc = blloc.GetModel(id); List <Model.occu_infor> listicc = blloc.GetModelList("order_id='" + modelocc.order_id + "'"); if (listicc.Count > 1) { cf = GetHtmlDiv("拆分", "onclick=\"ChaFeng(" + id + ")\""); } else { cf = ""; } html += GetHtmlDiv("结账", "onclick=\"ShowTabs('结账'," + id + ")\"") + GetHtmlDiv("加开房间", "onclick=\"ShowAddRoom('加开房间'," + id + ")\"") + GetHtmlDiv("合并房间", "onclick=\"AddRoom('合并房间'," + id + ")\"") + cf + GetHtmlDiv("商品入账", "onclick=\"GoodsAdds(this," + id + ")\"") + GetHtmlDiv("费用入账", "onclick=\"CostAdds(this," + id + ")\"") + GetHtmlDiv("续住", "onclick=\"ShowTabs1('续住'," + id + ")\"") + GetHtmlDiv("换房", "onclick=\"replaceAdds(this," + id + ")\"") + GetHtmlDiv("修改在住房信息", "onclick=\"ShowTab('修改在住房信息'," + id + ",1)\"") + GetHtmlDiv("撤销在住房", "onclick=\"CheXiao(" + id + ")\"") + GetHtmlDiv("修改房态", "", true); break; case "脏住房": string cf1 = string.Empty; Model.occu_infor modelocc1 = blloc.GetModel(id); List <Model.occu_infor> listicc1 = blloc.GetModelList("order_id='" + modelocc1.order_id + "'"); if (listicc1.Count > 1) { cf1 = GetHtmlDiv("拆分", "onclick=\"ChaFeng(" + id + ")\""); } else { cf1 = ""; } html += GetHtmlDiv("结账", "onclick=\"ShowTabs('结账'," + id + ")\"") + GetHtmlDiv("加开房间", "onclick=\"ShowAddRoom('加开房间'," + id + ")\"") + GetHtmlDiv("合并房间", "onclick=\"AddRoom('合并房间'," + id + ")\"") + cf1 + GetHtmlDiv("商品入账", "onclick=\"GoodsAdds(this," + id + ")\"") + GetHtmlDiv("费用入账", "onclick=\"CostAdds(this," + id + ")\"") + GetHtmlDiv("续住", "onclick=\"ShowTabs1('续住'," + id + ")\"") + GetHtmlDiv("换房", "onclick=\"replaceAdds(this," + id + ")\"") + GetHtmlDiv("修改在住房信息", "onclick=\"ShowTab('修改在住房信息'," + id + ",1)\"") + GetHtmlDiv("撤销在住房", "onclick=\"CheXiao(" + id + ")\"") + GetHtmlDiv("修改房态", "", true); break; case "干净房": if (fhBll.GetModelList(" Rn_roomNum='" + Roomid + "'")[0].Room_suod.ToString().Trim() == "是") { html += GetHtmlDiv("修改房态", "", true); } else { html += GetHtmlDiv("开房", "onclick=\"ShowTab('在住房信息'," + id + ",0)\"") + GetHtmlDiv("修改房态", "", true); } break; case "将到房": html += GetHtmlDiv("开房", "onclick=\"ShowTab('在住房信息'," + id + ",0)\"") + GetHtmlDiv("修改房态", "", true); break; case "脏房": if (fhBll.GetModelList(" Rn_roomNum='" + Roomid + "'")[0].Room_suod.ToString().Trim() == "是") { html += GetHtmlDiv("修改房态", "", true); } else { html += GetHtmlDiv("开房", "onclick=\"ShowTab('在住房信息'," + id + ",0)\"") + GetHtmlDiv("修改房态", "", true); } break; case "维修房": html += GetHtmlDiv("查看维修房", "onclick=\"ShowweixiuTabs('查看维修房'," + id + ",2);\"") + GetHtmlDiv("结束维修房", "onclick=\"cds(2," + id + ")\""); break; case "自用房": html += GetHtmlDiv("查看自用房", "onclick=\"ShowweixiuTabs('查看自用房'," + id + ",3)\"") + GetHtmlDiv("结束自用房", "onclick=\"cds(2," + id + ");\""); break; default: html += GetHtmlDiv("修改房态", "", true); break; } } } catch { } return(html); }
/// <summary> /// 获取在住客人详细详细 /// </summary> public void BindGvInfo() { string RoomNum = ""; double xiaofei = 0; //消费 double shoukuan = 0; //收款 double yue = 0; //余额 string sukeName = ""; double ysk = 0; int id = fmoc.GetModels(" where room_number='" + roomNum + "' and state_id=0 and occ_with='否'").occ_id; string orderid = fmoc.GetModels(" where room_number='" + roomNum + "' and state_id=0 and occ_with='否'").order_id; string Ocnono = fmoc.GetModels(" where room_number='" + roomNum + "' and state_id=0 and occ_with='否'").occ_no; IList <Model.goods_account> list = gmGood.GetModelList1(" ga_occuid='" + orderid + "'"); for (int i = 0; i < list.Count; i++) { xiaofei += Convert.ToDouble((list[i].ga_price)); shoukuan += Convert.ToDouble((list[i].ga_sum_price)); } IList <Model.occu_infor> lists = fmoc.GetModelList(" order_id='" + orderid + "' and occ_with='是'"); for (int i = 0; i < lists.Count; i++) { if (sukeName == "") { sukeName += (lists[i].occ_name); } else { sukeName += ";" + (lists[i].occ_name).ToString(); } } yue = xiaofei - shoukuan; try { ysk = Convert.ToDouble(gmGood.GetModels(" where ga_occuid='" + Ocnono + "'").ga_price.ToString()); } catch { ysk = 0; } DataSet dts = fmoc.GetList(" order_id='" + orderid + "' and occ_with='否'"); foreach (DataRow dr1 in dts.Tables[0].Rows) { if (RoomNum == "") { RoomNum += dr1["room_number"].ToString(); } else { RoomNum += ";" + dr1["room_number"].ToString(); } } string a = RoomNum; DataSet dt = fmoc.GetList(" room_number='" + roomNum + "' and state_id=0 and occ_with='否'"); foreach (DataRow dr in dt.Tables[0].Rows) { content = dr["occ_name"].ToString() + "," + dr["room_number"].ToString() + "," + dr["sex"].ToString() + "," + GetRealTypeName(Convert.ToInt32(dr["real_type_id"].ToString())) + "," + dr["occ_time"].ToString() + "," + dr["depar_time"].ToString() + "," + GetzjName(Convert.ToInt32(dr["card_id"].ToString())) + "," + dr["card_no"].ToString() + "," + dr["state_id"].ToString() + "," + dr["address"].ToString() + "," + dr["remark"].ToString() + "," + GetKffsName(Convert.ToInt32(dr["real_mode_id"].ToString())) + "," + RoomNum + "," + shoukuan + "," + xiaofei + "," + yue + "," + sukeName + "," + ysk + "," + Convert.ToDecimal(dr["real_price"]).ToString("0.##") + "," + GetRealTypeNamePrice(Convert.ToInt32(dr["real_type_id"])) + "," + dr["mem_cardno"].ToString() + "," + GetXieYi(dr["accounts"].ToString()); } }