コード例 #1
0
        /*统计NOshow*/
        void NOshow()
        {
            BLL.book_room          bllbr    = new BLL.book_room();
            Model.SysParamter      modelsys = bllsys.GetModel(1);
            DateTime               dtnow    = DateTime.Now;
            DateTime               dtstart  = Convert.ToDateTime(dtnow.ToString("yyyy-MM-dd")).AddHours(modelsys.YsTime.Hours).AddMinutes(modelsys.YsTime.Minutes).AddSeconds(modelsys.YsTime.Seconds);
            List <Model.book_room> listbr   = bllbr.GetModelList("Accounts!='' and state_id=1");

            if (listbr.Count > 0)
            {
                foreach (Model.book_room item in listbr)
                {
                    TimeSpan tso = Convert.ToDateTime(item.time_to) - Convert.ToDateTime(dtstart);
                    if (tso.TotalSeconds < 0)
                    {
                        Model.customer modelcus = bllcuns.GetAccounts(item.Accounts);
                        if (modelcus != null)
                        {
                            modelcus.NoShow += 1;
                            bllcuns.Update(modelcus);
                        }
                    }
                    item.state_id = 4;
                    bllbr.Update(item);
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// 获得离开时间
        /// </summary>
        private void GetYLTIME()
        {
            Model.SysParamter modelsys = new Model.SysParamter();
            modelsys = bllsys.GetModel(1);
            string txt    = context.Request.QueryString["txt"];
            string days   = context.Request.QueryString["days"];
            string rztime = context.Request.QueryString["rztime"];
            string str    = "";

            if (txt == "天房" || txt == "免费房")
            {
                //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);//得到今日凌晨房开始时间
                str = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddDays(Convert.ToInt32(days)).AddHours(dt11.Hours).ToString();
            }
            else if (txt == "凌晨房")
            {
                TimeSpan dt11 = TimeSpan.Parse(modelsys.EarlyOutTime.ToString());
                str = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddDays(Convert.ToInt32(days)).AddHours(dt11.Hours).ToString();
            }
            else if (txt == "月租房")
            {
                str = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddMonths(1).ToString();
            }
            context.Response.Write(str);
        }
コード例 #3
0
        //第一次加载显示的值
        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();
        }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
 protected void BtnSave_Click(object sender, EventArgs e)
 {
     Model.SysParamter modelsyts = bllsys.GetModel(1);
     modelsyts.MarkSuo = LockType.SelectedValue;
     bllsys.Update(modelsyts);
     ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('结帐成功');parent.window.location.reload();</script>");
 }
コード例 #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Model.SysParamter modelsyts = bllsys.GetModel(1);
         txt.Value = modelsyts.MarkSuo;
     }
 }
コード例 #7
0
        protected void Application_Start(Object sender, EventArgs e)
        {
            Model.SysParamter          modelsys = bllsys.GetModel(1);
            DateTime                   dtnow    = DateTime.Now;
            DateTime                   dtstart  = Convert.ToDateTime(dtnow.ToString("yyyy-MM-dd")).AddHours(modelsys.YsTime.Hours).AddMinutes(modelsys.YsTime.Minutes).AddSeconds(modelsys.YsTime.Seconds);
            List <Model.goods_account> listga   = bllga.GetModelList1("ga_isys=0");

            foreach (Model.goods_account item in listga)
            {
                TimeSpan tso = Convert.ToDateTime(item.ga_date) - Convert.ToDateTime(dtstart);
                if (tso.TotalSeconds < 0)
                {
                    item.ga_isys = 1;
                    bllga.Update(item);
                }
            }
            NOshow();
            #region 默认蓝

            TimeSpan ts = modelsys.YsTime;
            iHour   = ts.Hours;
            iMinute = ts.Minutes;
            iSecond = ts.Seconds;

            System.Timers.Timer aTimer = new System.Timers.Timer();

            aTimer.Elapsed += new System.Timers.ElapsedEventHandler(aTimer_Elapsed);
            aTimer.Interval = 1000;
            aTimer.Enabled  = true;
            Application["1xtop1_bgimage"]           = "images/top-1.gif";     //顶框背景图片
            Application["1xtop2_bgimage"]           = "images/top-2.gif";     //顶框背景图片
            Application["1xtop3_bgimage"]           = "images/top-3.gif";     //顶框背景图片
            Application["1xtop4_bgimage"]           = "images/top-4.gif";     //顶框背景图片
            Application["1xtop5_bgimage"]           = "images/top-5.gif";     //顶框背景图片
            Application["1xtopbj_bgimage"]          = "images/top-bj.gif";    //顶框背景图片
            Application["1xtopbar_bgimage"]         = "images/topbar_01.jpg"; //顶框工具条背景图片
            Application["1xfirstpage_bgimage"]      = "images/dbsx_01.gif";   //首页背景图片
            Application["1xforumcolor"]             = "#f0f4fb";
            Application["1xleft_width"]             = "204";                  //左框架宽度
            Application["1xtree_bgcolor"]           = "#e3eeff";              //左框架树背景色
            Application["1xleft1_bgimage"]          = "images/left-1.gif";
            Application["1xleft2_bgimage"]          = "images/left-2.gif";
            Application["1xleft3_bgimage"]          = "images/left-3.gif";
            Application["1xleftbj_bgimage"]         = "images/left-bj.gif";
            Application["1xspliter_color"]          = "#6B7DDE";               //分隔块色
            Application["1xdesktop_bj"]             = "";                      //images/right-bj.gif
            Application["1xdesktop_bgimage"]        = "images/desktop_01.gif"; //right.gif
            Application["1xtable_bgcolor"]          = "#F5F9FF";               //最外层表格背景
            Application["1xtable_bordercolorlight"] = "#4F7FC9";               //中层表格亮边框
            Application["1xtable_bordercolordark"]  = "#D3D8E0";               //中层表格暗边框
            Application["1xtable_titlebgcolor"]     = "#E3EFFF";               //中层表格标题栏
            Application["1xform_requestcolor"]      = "#E78A29";               //表单中必填字段*颜色
            Application["1xfirstpage_topimage"]     = "images/top_01.gif";
            Application["1xfirstpage_bottomimage"]  = "images/bottom_01.gif";
            Application["1xfirstpage_middleimage"]  = "images/bg_01.gif";
            #endregion
            base.Application_Start(sender, e);
        }
コード例 #8
0
 public override void SonLoad()
 {
     if (!IsPostBack)
     {
         model      = blls.GetModel(1);
         modelday   = blles.GetModelList("TypeRoom=1")[0];
         modelEarly = blles.GetModelList("TypeRoom=5")[0];
         Bind();
     }
 }
コード例 #9
0
        /// <summary>
        /// 测试是否能入住
        /// </summary>
        private void Isrz()
        {
            Model.SysParamter modelsys = bllsys.GetModel(1);
            int ids = Convert.ToInt32(context.Request.QueryString["id"]);
            List <Model.room_number> list = bllrn.GetModelList("Rn_state=4 and id=" + ids);

            if (modelsys.IsOcczf == false && list.Count > 0)
            {
                context.Response.Write("ok");
                context.Response.End();
            }
            else
            {
                context.Response.Write("err");
                context.Response.End();
            }
        }
コード例 #10
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnOk_Click(object sender, EventArgs e)
 {
     Model.SysParamter modelsys = new Model.SysParamter();
     modelsys.id            = 1;
     modelsys.CancellMin    = Convert.ToInt32(CancellMin.Value);
     modelsys.IsDeposit     = IsDepost.Checked;
     modelsys.Deposit       = Convert.ToDecimal(deposit.Value);
     modelsys.IsEarlyRoom   = IsEarlyRoom1.Checked;
     modelsys.EarlyStart    = TimeSpan.Parse(EarlyStart.Value);
     modelsys.EarlyEnd      = TimeSpan.Parse(EarlyEnd.Value);
     modelsys.EarlyOutTime  = TimeSpan.Parse(EarlyOutTime.Value);
     modelsys.EarlyFee      = Convert.ToInt32(EarlyFee.Value);
     modelsys.EarlyFeeSel   = Convert.ToInt32(EarlyFeeSel.Value);
     modelsys.EarlyFeeTwo   = Convert.ToInt32(EarlyFeeTwo.Value);
     modelsys.EarlyOutTimes = TimeSpan.Parse(EarlyOutTimes.Value);
     modelsys.DayOutTime    = TimeSpan.Parse(DayOutTime.Value);
     modelsys.DayFee        = Convert.ToInt32(DayFee.Value);
     modelsys.DayFeeTwo     = TimeSpan.Parse(DayFeeTwo.Value);
     modelsys.DayTime       = TimeSpan.Parse(DayTime.Value);
     modelsys.Istype        = istype.Checked;
     modelsys.YsTime        = TimeSpan.Parse(ysTime.Value);
     modelsys.IsOcczf       = isOcczf.Checked;
     modelsys.IsCy          = isCy.Checked;
     if (blls.Update(modelsys))
     {
         Model.ExceedScheme modele = new Model.ExceedScheme();
         modele.GraceTime         = Convert.ToInt32(GraceTimeEarly.Value);
         modele.TypeRoom          = 5;
         modele.Earlyapart        = Convert.ToInt32(Earlyapart.Value);
         modele.EarlyapartAddP    = Convert.ToInt32(EarlyapartAddP.Value);
         modele.EarlyInsufficient = Convert.ToInt32(EarlyInsufficient.Value);
         modele.EarlyInExceed     = Convert.ToInt32(EarlyInExceed.Value);
         modele.EarlyInAddPri     = Convert.ToInt32(EarlyInAddPri.Value);
         blles.Update(modele);
         Model.ExceedScheme modeld = new Model.ExceedScheme();
         modeld.GraceTime         = Convert.ToInt32(GraceTimeDay.Value);
         modeld.TypeRoom          = 1;
         modeld.Earlyapart        = Convert.ToInt32(Dayapart.Value);
         modeld.EarlyapartAddP    = Convert.ToInt32(DayapartAddP.Value);
         modeld.EarlyInsufficient = Convert.ToInt32(DayInsufficient.Value);
         modeld.EarlyInExceed     = Convert.ToInt32(DayInExceed.Value);
         modeld.EarlyInAddPri     = Convert.ToInt32(DayInAddPri.Value);
         blles.Update(modeld);
         ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>alert('更新成功');</script>");
     }
 }
コード例 #11
0
        /// <summary>
        /// 是否是凌晨房
        /// </summary>
        private bool IsEraly()
        {
            modelsys = bllsys.GetModel(1);
            TimeSpan dt1  = TimeSpan.Parse(modelsys.EarlyStart.ToString());                                                   //得到系统设置的凌晨房开始时间
            TimeSpan dt11 = TimeSpan.Parse(modelsys.EarlyEnd.ToString());                                                     //得到系统设置的凌晨房结束时间
            DateTime dt2  = DateTime.Now;                                                                                     //得到当前时间
            DateTime dts  = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddHours(dt1.Hours);  //得到今日凌晨房开始时间
            DateTime dts1 = Convert.ToDateTime(Convert.ToDateTime(DateTime.Now).ToString("yyyy-MM-dd")).AddHours(dt11.Hours); //得到今日凌晨房结束时间
            TimeSpan to1  = dt2 - dts;
            TimeSpan to2  = dt2 - dts1;

            if (to1.TotalSeconds > 0 && to2.TotalSeconds < 0)
            {
                return(true);
            }
            return(false);
        }
コード例 #12
0
        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";
                    }
                }
            }
        }
コード例 #13
0
        /// <summary>
        /// 验证方法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            SysModel = bllsys.GetModel(1);
            List <Model.shopInfo> listif = bllsi.GetModelList("");

            if (listif.Count > 0)
            {
                modelsi = listif[0];
            }
            if (Request.Cookies["User"] == null)
            {
                //Page.ClientScript.RegisterStartupScript(GetType(), "info", "<script>alert('您还没有登录!');window.location='/Admin/login.aspx';</script>");
                Response.Write("<script>alert('您还没有登录!');window.location='/Admin/login.aspx';</script>");
                Response.End();
            }
            else
            {
                //Session["User"] = UserNow;
                string uid = Request.Cookies["User"].Value;
                UserNow = bllu.GetModel(uid);
            }
            SonLoad();
        }
コード例 #14
0
        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");
                        }
                    }
                }
            }
        }
コード例 #15
0
        /// <summary>
        /// 通过ID日查询出来开的所有房间
        /// </summary>
        /// <param name="orrderID"></param>
        private void Bind(string orrderID)
        {
            List <Model.occu_infor> lisiico = blloi.GetDaySheetByOrderID(" order_id='" + orrderID + "'");

            if (lisiico != null)
            {
                nowmodel = lisiico[0];
                if (nowmodel.meth_pay_id == null)
                {
                    nowmodel.Meth_pay_model = new Model.meth_pay();
                    nowmodel.Meth_pay_model.meth_pay_name = "信用卡预授权";
                }
                foreach (Model.occu_infor model in lisiico)
                {
                    sbtext.Append("<tr><td>" + model.room_number + "</td><td>" + model.Real_mode_mode.real_mode_name + "</td><td>" + GetRoomStatu(model) + "</td><td>" + model.real_price + "</td></tr>");
                }
            }
            if (Request.QueryString["desp"] != null)
            {
                if (Convert.ToInt32(Request.QueryString["desp"]) < 0)
                {
                    fangshi = "退款";
                }

                nowmodel.deposit = Convert.ToDecimal(Request.QueryString["desp"]);
            }
            Model.SysParamter modelsys = bllsys.GetModel(1);
            if (nowmodel.real_mode_id == 2)   //如果是钟点房

            {
            }
            else if (nowmodel.real_mode_id != 5)//如果是天房
            {
                if (modelsys.DayFee == 1)
                {
                    strstrs = "住宿时间超过次日" + modelsys.DayTime + "-" + modelsys.DayFeeTwo + "时按分钟收费,超过" + modelsys.DayFeeTwo + "时按一天结账。";
                }
                else
                {
                    strstrs = "住宿时间超过次日" + modelsys.DayTime + "-" + modelsys.DayFeeTwo + "时加收半费,超过" + modelsys.DayFeeTwo + "时按一天结账。";
                }
            }

            else if (nowmodel.real_mode_id == 5)//如果是凌晨房
            {
                string fee          = string.Empty;
                string fangan       = string.Empty;
                string sel          = string.Empty;
                string EarlyOutTime = modelsys.EarlyOutTime.ToString();//凌晨房计费开始时间
                if (modelsys.EarlyFee == 1)
                {
                    fee = "加收半天房费";
                }
                else if (modelsys.EarlyFee == 2)
                {
                    fee = "按分钟收费";
                }
                else if (modelsys.EarlyFee == 3)
                {
                    fee = "不加收房费";
                }
                if (modelsys.EarlyFeeSel == 1)
                {
                    sel = "次日";
                }
                else if (modelsys.EarlyFeeSel == 2)
                {
                    sel = "当日";
                }
                string EarlyOutTimes = modelsys.EarlyOutTimes.ToString();//凌晨房结束时间
                if (modelsys.EarlyFeeTwo == 0)
                {
                    fangan = "加收全天房价";
                }
                else if (modelsys.EarlyFeeTwo == 1)
                {
                    fangan = "转为全天房价";
                }
                strstrs = "住宿时间超过" + sel + "" + EarlyOutTime + "-" + EarlyOutTimes + "时" + fee + ",超过" + EarlyOutTimes + "时" + fangan + "。";
            }
        }