/*统计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);
                }
            }
        }
        /// <summary>
        /// 绑定可预定数
        /// </summary>
        public void BindOkNum(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;
                }
            }
            txtOkNum.InnerText = (list.Count - sumint).ToString();
        }
        private void GetOkNum()
        {
            string room_type_Id               = context.Request.QueryString["typeid"];
            string real_time                  = context.Request.QueryString["real_time"];
            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,'" + real_time + "',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;
                }
            }
            context.Response.Write(list.Count - sumint);
        }
Exemple #4
0
 public override void SonLoad()
 {
     sum = brBll.GetModelList("").Count;
     if (!IsPostBack)
     {
         sbHtml.Clear();
         RoomStateBind();
         BookDataBind(pageSize, pageIndex);
     }
 }
Exemple #5
0
        /// <summary>
        /// 获得预到时间
        /// </summary>
        /// <returns></returns>
        private string GetYuDao(string nummber)
        {
            List <Model.Book_Rdetail> listbr = bllbr.GetListModel("Room_number='" + nummber + "' and Room_typeid in(1,6)");
            string bookno = string.Empty;

            if (listbr.Count > 0)
            {
                bookno = listbr[0].Book_no;
                List <Model.book_room> listb = bllr.GetModelList("book_no='" + bookno + "'");
                if (listb.Count > 0)
                {
                    return(listb[0].time_to.ToString());
                }
            }
            return("");
        }
Exemple #6
0
 public override void SonLoad()
 {
     id = "Y2015411111326";
     if (Request["id"] != null)
     {
         id = Request["id"].ToString();
         List <Model.book_room> listbr = bllbr.GetModelList("Book_no='" + id + "'");
         if (listbr != null)
         {
             nowModel = listbr[0];
             if (Request["desp"] != null)
             {
                 nowModel.deposit = Convert.ToDecimal(Request["desp"]);
             }
         }
         Bind();
     }
 }
        /// <summary>
        /// 绑定
        /// </summary>
        private void Bind()
        {
            decimal sumpri = 0.00M;
            List <Model.book_room> list = bllbr.GetModelList("Book_no='" + bookno + "'");

            if (list.Count > 0)
            {
                lbname.Text    = list[0].book_Name;
                lbtele.Text    = list[0].tele_no;
                lbdeposit.Text = list[0].deposit.ToString();
            }
            List <Model.goods_account> listga = bllga.GetModelList1("ga_number='" + bookno + "' and ga_name='退订金'");

            if (listga != null)
            {
                foreach (Model.goods_account model in listga)
                {
                    sumpri += Convert.ToDecimal(model.ga_price);
                }
            }
            ytuiqian.Text = sumpri.ToString();
        }