Пример #1
0
        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();
        }
Пример #2
0
 public void Bind()
 {
     Model.occu_infor mod = new Model.occu_infor();
     labfh.Text      = fmrzInfo.GetModel(ids).room_number;
     labfx.Text      = (fmrzInfo.GetModel(ids).real_type_id).ToString();
     labkffs.Text    = (fmrzInfo.GetModel(ids).meth_pay_id).ToString();
     lably.Text      = fmrzInfo.GetModel(ids).real_scheme_id.ToString();
     labname.Text    = fmrzInfo.GetModel(ids).occ_name.ToString();
     labrzDate.Text  = fmrzInfo.GetModel(ids).occ_time.ToString();
     labfjMoney.Text = fmrzInfo.GetModel(ids).real_scheme_id.ToString();
     labSymoney.Text = fmrzInfo.GetModel(ids).real_price.ToString();
 }
Пример #3
0
 /// <summary>
 /// 确定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnAdds_Click(object sender, EventArgs e)
 {
     Model.goods_account model = new Model.goods_account();
     model.ga_people   = UserNow.UserID;
     model.ga_zffs_id  = Convert.ToInt32(DDlZffs.SelectedValue);
     model.ga_price    = 0;
     model.ga_sfacount = "是";
     model.ga_name     = "退款";
     model.ga_occuid   = fmrzo.GetModel(ids).order_id;
     model.Ga_goodNo   = fmrzo.GetModel(ids).occ_no;
     model.ga_price    = Convert.ToDecimal(txt_tkMoney.Value) * -1;
     model.ga_Type     = 5;
     //fmrz.GetMaxId();
     model.ga_number     = "TK" + System.DateTime.Now.ToString().Replace("-", "").Replace(":", "").Replace(" ", "");
     model.ga_date       = System.DateTime.Now;
     model.ga_roomNumber = txt_fh.Value.ToString();
     if (fmrz.Add(model) > 0)
     {
         ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript'>if(confirm('退款成功,是否打印退款单?')){XZintRZ(this,'" + model.ga_occuid + "')} else{ }</script>");
     }
 }
Пример #4
0
        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];
            }
        }
Пример #5
0
        /// <summary>
        /// 撤销结账
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btncxSava_Click(object sender, EventArgs e)
        {
            if (ddlState.SelectedValue == "4")
            {
                string SQls = "update room_number set Rn_state=2 where Rn_roomNum='" + brBll.GetModel(Convert.ToInt32(txt_room.Value)).room_number + "'";
                string strs = "update occu_infor set state_id='0', tuifaId='0',occ_TfTime=null where occ_id=" + txt_room.Value + "";

                if (fmroom.Updates(SQls) && brBll.Updates(strs))
                {
                    Maticsoft.Common.MessageBox.ShowAndRedirect(this, "撤销挂单成功!", "");
                }
            }
            else
            {
                List <Model.goods_account> listga = bllga.GetModelList1("ga_occuid='" + brBll.GetModel(Convert.ToInt32(txt_room.Value)).order_id + "' and ga_isjz=1");
                if (listga != null && listga.Count > 0)
                {
                    Maticsoft.Common.MessageBox.ShowAndRedirect(this, "已交班不能撤销结账!", "");
                }
                else
                {
                    string strsql = "update goods_account set ga_sfacount='否' where ga_occuid='" + brBll.GetModel(Convert.ToInt32(txt_room.Value)).order_id + "'";
                    string SQl    = string.Empty;
                    if (rooms.Value != "")
                    {
                        SQl = "update room_number set Rn_state=2 where Rn_roomNum in(" + rooms.Value + ")";
                    }
                    string strs = "update occu_infor set state_id='0', tuifaId='0' where order_id=" + brBll.GetModel(Convert.ToInt32(txt_room.Value)).order_id + "";
                    string SQls = "delete from goods_account where ga_Type in(4,6) and ga_occuid='" + brBll.GetModel(Convert.ToInt32(txt_room.Value)).order_id + "'";
                    if (fmroom.Updates(SQl) && brBll.Updates(strs))
                    {
                        fmgoods.Updates(strsql);
                        fmgoods.Deletes(SQls);
                        string up = rooms.Value.Replace("'", "");
                        Helper.AddRoom(brBll.GetModel(Convert.ToInt32(txt_room.Value)).room_number, up + ",");
                        Maticsoft.Common.MessageBox.ShowAndRedirect(this, "撤销结账成功!", "");
                    }
                    else
                    {
                        Maticsoft.Common.MessageBox.ShowAndRedirect(this, "撤销结账失败!", "");
                    }
                }
            }
        }
Пример #6
0
 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;
     }
 }
Пример #7
0
        protected void btncx_Click(object sender, EventArgs e)
        {
            string a       = txt_ids.Value;
            string orderby = fmmx.GetModel(Convert.ToInt32(a)).order_id;
            string Sql     = "update goods_account set ga_sfacount='是' where ga_occuid='" + orderby + "'";
            string str2    = "update room_number set Rn_state=3 where Rn_roomNum='" + fmmx.GetModel(Convert.ToInt32(a)).room_number + "'";
            string STRSQL  = " update occu_infor set state_id=10 where occ_id='" + a + "'";

            if (fmnumber.Updates(str2) && fmmx.Updates(STRSQL) && fmgood.Updates(Sql))
            {
                ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('撤销入账成功');</script>");

                AllBind();
            }
            else
            {
                ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('撤销入账失败');</script>");
            }
        }
Пример #8
0
        /// <summary>
        /// 确认
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdds_Click(object sender, EventArgs e)
        {
            string strSQL = "";
            string sql    = "";
            string Strsql = "";
            int    count  = 0;

            for (int i = 0; i < GrdCostRoom.Rows.Count; i++)
            {
                CheckBox cbxCheck = GrdCostRoom.Rows[i].FindControl("cbxCheck") as CheckBox;
                if (cbxCheck.Checked)
                {
                    if (cbxCheck.Enabled == true)
                    {
                        HiddenField hidNewsId = GrdCostRoom.Rows[i].FindControl("hidId") as HiddenField;
                        if (occid == "")
                        {
                            occid = hidNewsId.Value;
                        }
                        else
                        {
                            occid += "," + hidNewsId.Value;
                        }

                        sql = " update room_number set Rn_state=4 where Rn_roomNum='" + fmOc.GetModel(Convert.ToInt32(hidNewsId.Value)).room_number + "' ";
                        Helper.AddRoom(fmOc.GetModel(Convert.ToInt32(hidNewsId.Value)).room_number);
                        fmroom.Updates(sql);
                    }
                    count++;
                }
            }

            strSQL = "update occu_infor set state_id=3 where occ_id in (" + occid + ")";
            fmOc.Updates(strSQL);

            if (GrdCostRoom.Rows.Count == count)
            {
                Strsql = "update goods_account set ga_sfacount='是' where ga_occuid ='" + fmOc.GetModel(ids).order_id + "' ";
                if (!Helper.IsJz(fmOc.GetModel(ids).order_id))
                {
                    string[] txtzffs = txt_zhfsMoney.Value.Split('|');
                    if (hidcs.Value == "0")
                    {
                        Model.goods_account model = new Model.goods_account();
                        model.ga_people = UserNow.UserID;
                        // model.ga_zffs_id = 1;
                        // model.ga_price = Convert.ToInt32( txt_bcysMoneys.Value);
                        model.ga_price     = Convert.ToDecimal("-" + txt_bcysMoneys.Value);
                        model.ga_sfacount  = "是";
                        model.ga_name      = "结账退款";
                        model.ga_occuid    = fmOc.GetModel(ids).order_id;
                        model.ga_sum_price = 0;
                        model.ga_Type      = 6;
                        //fmrz.GetMaxId();
                        model.ga_number     = System.DateTime.Now.ToString().Replace("-", "").Replace(":", "").Replace(" ", "");
                        model.ga_date       = System.DateTime.Now;
                        model.ga_roomNumber = fmOc.GetModel(ids).room_number.ToString();
                        fmrz.Add(model);
                    }
                    else if (hidcs.Value == "1")

                    {
                        for (int j = 0; j < txtzffs.Length - 1; j++)
                        {
                            Model.goods_account model = new Model.goods_account();
                            model.ga_people    = UserNow.UserID;
                            model.ga_zffs_id   = Convert.ToInt32(txtzffs[j].Split('#')[0]);
                            model.ga_price     = Convert.ToDecimal(txtzffs[j].Split('#')[1]);
                            model.ga_sfacount  = "是";
                            model.ga_name      = "结账收款";
                            model.ga_occuid    = fmOc.GetModel(ids).order_id;
                            model.ga_sum_price = 0;
                            model.ga_Type      = 4;

                            //fmrz.GetMaxId();
                            model.ga_number     = System.DateTime.Now.ToString().Replace("-", "").Replace(":", "").Replace(" ", "");
                            model.ga_date       = System.DateTime.Now;
                            model.ga_roomNumber = fmOc.GetModel(ids).room_number.ToString();
                            fmrz.Add(model);
                        }
                    }

                    if (fmrz.Updates(Strsql))
                    {
                        // Maticsoft.Common.MessageBox.ShowAndRedirect(this, "!", "");
                        string strqwl = "update occu_infor set tuifaId=2 where occ_id in (" + occid + ")";
                        fmOc.Updates(strqwl);
                        Helper.AddRoom(fmOc.GetModel(ids).room_number);
                        ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript'>if(confirm('结账成功,是否打结账单')){ PrintJz(this," + orderid + ");}else{ShowTabs('房态图');}</script>");
                    }
                }
                else
                {
                    ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript'>Erroc();</script>");
                }
            }
            else
            {
                Maticsoft.Common.MessageBox.ShowAndRedirect(this, "退房成功!", "");
                string strqwl = "update occu_infor set tuifaId=1,continuelive=1 where occ_id in (" + ids + ")";
                fmOc.Updates(strqwl);
                //ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('退房成功');parent.Window_Close();</script>");
            }
        }
        /// <summary>
        /// 根据消费金额添加一定的积分
        /// </summary>
        private void AddJf()
        {
            int    pric   = Convert.ToInt32(txt_xfMoney.Value);
            string cardid = hycard.Value;

            Model.member modelmem = bllmem.GetModel(cardid);
            if (modelmem != null)
            {
                Model.memberType modelmt = bllmt.GetModel(Convert.ToInt32(modelmem.Mtype));
                if (modelmt.IntegraIs)     //如果是积分卡
                {
                    if (modelmt.IsConsump) //如果是按消费积分
                    {
                        if (modelmt.XfPrice.ToString() != "" && modelmt.XfConsump.ToString() != "")
                        {
                            int sumzj     = 0;
                            int xfPrice   = Convert.ToInt32(modelmt.XfPrice);
                            int XfConsump = Convert.ToInt32(modelmt.XfConsump);
                            int ds        = pric / xfPrice;
                            for (int i = 0; i < ds; i++)
                            {
                                sumzj += XfConsump;
                            }
                            Model.mRecords modelmr = new Model.mRecords();
                            modelmr.mmid   = cardid;
                            modelmr.Price  = sumzj;
                            modelmr.Type   = 3;
                            modelmr.Remark = "赠送消费积分";
                            bllmr.Add(modelmr);
                        }
                    }
                }
                if (modelmt.IsLive)   //如果按入住天数计算
                {
                    DateTime date1 = Convert.ToDateTime(fmOc.GetModel(ids).occ_time.ToString());
                    DateTime date2 = System.DateTime.Now;
                    int      cc    = date2.Day - date1.Day;
                    if (cc < 0)
                    {
                        cc = (Convert.ToDateTime(date2.ToString("yyyy-MM-dd")) - Convert.ToDateTime(date1.ToString("yyyy-MM-dd"))).Days;
                    }
                    int sumzj = 0;
                    int m     = Convert.ToInt32(modelmt.LiveNum);
                    int lp    = Convert.ToInt32(modelmt.LiveConsump);
                    int ds    = cc / m;
                    for (int i = 0; i < ds; i++)
                    {
                        sumzj += lp;
                    }
                    Model.mRecords modelmr = new Model.mRecords();
                    modelmr.mmid   = cardid;
                    modelmr.Price  = sumzj;
                    modelmr.Type   = 3;
                    modelmr.Remark = "赠送入住天数积分";
                    bllmr.Add(modelmr);
                }
            }
        }
Пример #10
0
        public void Bind()
        {
            Model.occu_infor mod = new Model.occu_infor();
            labfh.Text      = fmrzInfo.GetModel(ids).room_number;
            labfx.Text      = GetRealTypeName((fmrzInfo.GetModel(ids).real_type_id));
            labkffs.Text    = GetKffsName(fmrzInfo.GetModel(ids).real_mode_id);
            lably.Text      = GetLYName(fmrzInfo.GetModel(ids).source_id);
            labname.Text    = fmrzInfo.GetModel(ids).occ_name.ToString();
            labrzDate.Text  = fmrzInfo.GetModel(ids).occ_time.ToString();
            labfjMoney.Text = fmrzInfo.GetModel(ids).real_price.ToString();
            labSymoney.Text = fmrzInfo.GetModel(ids).amount_money.ToString();
            double  ysMoney = 0;
            DataSet dt      = fmgoodvount.GetList(" ga_occuid in ('" + fmrzInfo.GetModel(ids).order_id + "')");

            foreach (DataRow dr in dt.Tables[0].Rows)
            {
                try
                {
                    ysMoney += double.Parse(dr["ga_sum_price"].ToString());
                }
                catch { }
            }
            labSymoney.Text = ysMoney.ToString();
        }
Пример #11
0
        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);
        }
Пример #12
0
        public string UpdateState()
        {
            int    state    = Convert.ToInt32(Request.QueryString["state"].ToString());
            string roomNums = Request.QueryString["id"].ToString();
            string FtName   = "";
            string ullihtml = "";
            string ids      = "";

            if (state != 0)
            {
                FtName = fmft.GetModel(state).room_state_name;
            }
            try
            {
                if (roomNums != "")
                {
                    switch (FtName)
                    {
                    case "在住房":
                        ids      = fmoc.GetModel(Convert.ToInt32(roomNums)).room_number;
                        roomNums = fhBll.GetModelList(" Rn_roomNum='" + ids + "'")[0].id.ToString();
                        ullihtml = "<div class=\"menu\" style=\"width:120px;\"><div class=\"menu-line\" style=\"height: 224px;\"></div>" + GetHtmlDiv("设置脏房", "onclick=\"cds(5," + roomNums + ")\"") + "</div>";
                        break;

                    case "干净房":
                        if (fhBll.GetModel(Convert.ToInt32(roomNums)).Room_suod.ToString().Trim() == "是")
                        {
                            ullihtml = "<div class=\"menu\" style=\"width:120px;\"><div class=\"menu-line\" style=\"height: 224px;\"></div>" + GetHtmlDiv("解锁", "onclick=\"cds(4," + roomNums + ");\"") + GetHtmlDiv("设置脏房", "onclick=\"cds(0," + roomNums + ");\"") + "</div>";
                        }
                        else
                        {
                            ullihtml = "<div class=\"menu\" style=\"width:120px;\"><div class=\"menu-line\" style=\"height: 224px;\"></div>" + GetHtmlDiv("锁房", " onclick=\"cds(3," + roomNums + ");\"") + GetHtmlDiv("脏房", "onclick=\"cds(0," + roomNums + ");\"") + GetHtmlDiv("维修房", "onclick=\"ShowweixiuTabs('维修原因'," + roomNums + ",0);\"") + GetHtmlDiv("自用房", "onclick=\"ShowweixiuTabs('自用房'," + roomNums + ",1);\"") + "</div>";
                        }

                        break;

                    case "将到房":
                        ullihtml = "<div class=\"menu\" style=\"width:120px;\"><div class=\"menu-line\" style=\"height: 224px;\"></div>" + GetHtmlDiv("设置干净房", "onclick=\"cds(2," + roomNums + ");\"") + "</div>";
                        break;

                    case "脏房":
                        if (fhBll.GetModel(Convert.ToInt32(roomNums)).Room_suod.ToString().Trim() == "是")
                        {
                            ullihtml = "<div class=\"menu\" style=\"width:120px;\"><div class=\"menu-line\" style=\"height: 224px;\"></div>" + GetHtmlDiv("解锁", "onclick=\"cds(4," + roomNums + ");\"") + GetHtmlDiv("设置干净房", "onclick=\"cds(2," + roomNums + ");\"") + "</div>";
                        }
                        else
                        {
                            ullihtml = "<div class=\"menu\" style=\"width:120px;\"><div class=\"menu-line\" style=\"height: 224px;\"></div>" + GetHtmlDiv("锁房", "onclick=\"cds(3," + roomNums + ");\"") + GetHtmlDiv("设置干净房", "onclick=\"cds(2," + roomNums + ");\"") + GetHtmlDiv("自用房", "onclick=\"ShowweixiuTabs('自用房'," + roomNums + ",1);\"") + GetHtmlDiv("维修房", "onclick=\"ShowweixiuTabs('维修原因'," + roomNums + ",0);\"") + "</div>";
                        }
                        break;

                    case "脏住房":
                        ullihtml = "<div class=\"menu\" style=\"width:120px;\"><div class=\"menu-line\" style=\"height: 224px;\"></div>" + GetHtmlDiv("设置干净房", "onclick=\"cds(6," + roomNums + ");\"") + "</div>";
                        break;

                    default:
                        break;
                    }
                }
            }
            catch { }

            return(ullihtml);
        }
Пример #13
0
 public void Bind()
 {
     Model.occu_infor mod = new Model.occu_infor();
     labfh.Text       = fmrzInfo.GetModel(ids).room_number;
     labfx.Text       = GetRealTypeName(fmrzInfo.GetModel(ids).real_type_id);
     labkffs.Text     = GetKffsName(fmrzInfo.GetModel(ids).real_mode_id);
     lably.Text       = GetLYName(fmrzInfo.GetModel(ids).source_id);
     labname.Text     = fmrzInfo.GetModel(ids).occ_name.ToString();
     labrzDate.Text   = fmrzInfo.GetModel(ids).occ_time.ToString();
     labfjMoney.Text  = fmrzInfo.GetModel(ids).real_scheme_id.ToString();
     labSymoney.Text  = fmrzInfo.GetModel(ids).deposit.ToString();
     txt_ydDate.Value = fmrzInfo.GetModel(ids).depar_time.ToString();
     txt_xdDate.Value = Convert.ToDateTime(fmrzInfo.GetModel(ids).depar_time).AddDays(Convert.ToInt32(txt_liveDay.Value)).ToString();
 }
Пример #14
0
        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            string SQl     = "";
            string roomNum = hidRoom.Value;
            string a       = hidNumber.Value;

            if (bllic.GetModel(Convert.ToInt32(roomNum)) != null)
            {
                string num = bllic.GetModel(Convert.ToInt32(roomNum)).room_number;
                Helper.AddRoom(num);
                roomNum = bllrn.GetModelList("Rn_roomNum='" + num + "'")[0].id.ToString();
            }
            else
            {
                Helper.AddRoom(bllrn.GetModel(Convert.ToInt32(roomNum)).Rn_roomNum);
            }
            if (hidNumber.Value == "0")
            {
                //脏房
                SQl = "update room_number set Rn_state=4 where id=" + roomNum + "";
            }
            //if (hidNumber.Value == "1")
            //{
            //    //维修
            //    SQl = "update room_number set Rn_state=5 where id=" + roomNum + "";

            //}
            if (hidNumber.Value == "2")

            {
                //干净房
                SQl = "update room_number set Rn_state=3 where id=" + roomNum + "";
            }

            if (hidNumber.Value == "3")
            {
                //锁定
                SQl = "update room_number set Room_suod='是' where id=" + roomNum + "";
            }
            if (hidNumber.Value == "4")
            {
                //没有锁定
                SQl = "update room_number set Room_suod='否' where id=" + roomNum + "";
            }
            if (hidNumber.Value == "5")
            {
                //脏住房
                SQl = "update room_number set Rn_state=7 where id='" + roomNum + "'";
            }
            if (hidNumber.Value == "6")
            {
                //干净房
                SQl = "update room_number set Rn_state=2 where id=" + roomNum + "";
            }
            if (hidNumber.Value == "7")
            {
                //自用房
                SQl = "update room_number set Rn_state=8 where id=" + roomNum + "";
            }
            brBll.Updates(SQl);
            Bind();
        }
Пример #15
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();
                    }
                }
            }
        }
Пример #16
0
 public void Bind()
 {
     Model.occu_infor mod = new Model.occu_infor();
     labfh.Text      = fmrzInfo.GetModel(ids).room_number;
     labfx.Text      = GetRealTypeName(fmrzInfo.GetModel(ids).real_type_id);
     labkffs.Text    = GetKffsName(fmrzInfo.GetModel(ids).real_mode_id);
     lably.Text      = GetLYName(fmrzInfo.GetModel(ids).source_id);
     labname.Text    = fmrzInfo.GetModel(ids).occ_name.ToString();
     labrzDate.Text  = fmrzInfo.GetModel(ids).occ_time.ToString();
     labfjMoney.Text = fmrzInfo.GetModel(ids).real_scheme_id.ToString();
     labSymoney.Text = fmrzInfo.GetModel(ids).real_price.ToString();
 }
Пример #17
0
        /// <summary>
        /// 修改房态
        /// </summary>
        private void UpSate()
        {
            try
            {
                string SQl     = "";
                string roomNum = context.Request.QueryString["hidRoom"];
                string a       = context.Request.QueryString["hidNumber"];
                if (bllic.GetModel(Convert.ToInt32(roomNum)) != null)
                {
                    string num = bllic.GetModel(Convert.ToInt32(roomNum)).room_number;
                    Helper.AddRoom(num);
                    roomNum = bllrn.GetModelList("Rn_roomNum='" + num + "'")[0].id.ToString();
                }
                else
                {
                    Helper.AddRoom(bllrn.GetModel(Convert.ToInt32(roomNum)).Rn_roomNum);
                }
                if (a == "0")
                {
                    //脏房
                    SQl = "update room_number set Rn_state=4 where id=" + roomNum + "";
                }
                //if (hidNumber.Value == "1")
                //{
                //    //维修
                //    SQl = "update room_number set Rn_state=5 where id=" + roomNum + "";

                //}
                if (a == "2")
                {
                    //干净房
                    SQl = "update room_number set Rn_state=3 where id=" + roomNum + "";
                }

                if (a == "3")
                {
                    //锁定
                    SQl = "update room_number set Room_suod='是' where id=" + roomNum + "";
                }
                if (a == "4")
                {
                    //没有锁定
                    SQl = "update room_number set Room_suod='否' where id=" + roomNum + "";
                }
                if (a == "5")
                {
                    //脏住房
                    SQl = "update room_number set Rn_state=7 where id='" + roomNum + "'";
                }
                if (a == "6")
                {
                    //干净房
                    SQl = "update room_number set Rn_state=2 where id=" + roomNum + "";
                }
                if (a == "7")
                {
                    //自用房
                    SQl = "update room_number set Rn_state=8 where id=" + roomNum + "";
                }
                brBll.Updates(SQl);
                context.Response.Write("更新成功!");
            }
            catch (Exception ex)
            {
                context.Response.Write("更新失败!");
            }
        }