Пример #1
0
        /// <summary>
        /// 绑定要修改的信息
        /// </summary>
        public void BindUpdateInfo()
        {
            DataSet dt = fmmx.GetList(" room_number='" + roomsid + "' and occ_with='否' and state_id=0");

            foreach (DataRow dr in dt.Tables[0].Rows)
            {
                txt_roomid.Value         = dr["room_number"].ToString();
                ddroomtype.SelectedValue = Convert.ToInt32(dr["real_type_id"]).ToString();

                txt_money.Value = dr["real_price"].ToString();

                txt_rzdate.Value     = dr["occ_time"].ToString();
                txt_Day.Value        = dr["stay_day"].ToString();
                txt_ylDate.Value     = dr["depar_time"].ToString();
                txt_name.Value       = dr["occ_name"].ToString();
                txt_Sex.Value        = dr["sex"].ToString();
                txt_Date2.Value      = dr["brithday"].ToString();
                txt_mingzhu.Value    = dr["family_name"].ToString();
                DDlSFz.SelectedValue = dr["card_id"].ToString();
                txt_CardId.Value     = dr["card_no"].ToString();

                txt_address.Value     = dr["address"].ToString();     //地址
                txt_lxphone.Value     = dr["phonenum"].ToString();    //联系电话
                txt_zfzhanghao.Value  = dr["lordRoomid"].ToString();  //主房账号
                txt_Remaker.Value     = dr["remark"].ToString();
                DDlZffs.SelectedValue = dr["meth_pay_id"].ToString(); //支付方式
                txt_yjmoney.Value     = dr["deposit"].ToString();     //押金
            }
        }
Пример #2
0
        public void BindGV()
        {
            string  roomsid = Request.QueryString["rooms"].ToString();
            DataSet dts     = fmmx.GetList(" room_number='" + roomsid + "' and occ_with='是' and state_id=0");

            foreach (DataRow drs in dts.Tables[0].Rows)
            {
                if (txt_Info.Value == "")
                {
                    txt_Info.Value += drs["room_number"].ToString() + "," + drs["occ_name"].ToString() + "," + drs["sex"].ToString() + "," + drs["brithday"].ToString() + "," + fsfBll.GetModel(Convert.ToInt32(drs["card_id"].ToString())).ct_name + "," + drs["card_no"].ToString() + "," + drs["address"].ToString();
                }
                else
                {
                    txt_Info.Value += "|" + drs["room_number"].ToString() + "," + drs["occ_name"].ToString() + "," + drs["sex"].ToString() + "," + drs["brithday"].ToString() + "," + fsfBll.GetModel(Convert.ToInt32(drs["card_id"].ToString())).ct_name + "," + drs["card_no"].ToString() + "," + drs["address"].ToString();
                }
            }

            //string conteent = "";

            // ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "qwwqwq", "GetBind('" + txt_Info.Value + "');", true);
        }
Пример #3
0
        /// <summary>
        /// 退房绑定
        /// </summary>
        public void BandTF()
        {
            int    count     = 0;
            string roomsName = "";
            //and tuifaId in(" + hidid + ")
            //and tuifaId in(0,1)
            string  a  = fmOc.GetModel(ids).lordRoomid;
            DataSet dt = fmOc.GetList(" occ_with='否' and order_id='" + orderid + "'  ");

            foreach (DataRow dr in dt.Tables[0].Rows)
            {
                if (dr["lordRoomid"].ToString() == dr["room_number"].ToString())
                {
                    dr["lordRoomid"] = "主";
                }
                else
                {
                    dr["lordRoomid"] = "从";
                }

                if (dr["state_id"].ToString() == "3")
                {
                    dr["mem_cardno"] = "已退房";
                }
                if (dr["state_id"].ToString() == "0")
                {
                    dr["mem_cardno"] = "在住";
                }
                count++;
                //if (hidids == "" ||hidids==null)
                //{
                //    hidids = dr["order_id"].ToString();
                //    //hidid = dr["occ_id"].ToString();
                //}
                //else
                //{
                //    hidids += "," + dr["order_id"].ToString();
                //   // hidid =","+ dr["occ_id"].ToString();
                //}
                txt_num.InnerText = count.ToString();
                if (roomsName == "")
                {
                    roomsName = dr["room_number"].ToString();
                }
                else
                {
                    roomsName += "," + dr["room_number"].ToString();
                }
                sboption.Append("<option value='" + dr["room_number"] + "'>" + dr["room_number"] + "</option>");
                roomNumed.InnerText = roomsName;
            }
            if (count > 2)
            {
                btngd.Attributes.Add("display", "block");
            }
            GrdCostRoom.DataSource = dt;
            GrdCostRoom.DataBind();
            for (int i = 0; i < GrdCostRoom.Rows.Count; i++)
            {
                CheckBox    cbxCheck  = GrdCostRoom.Rows[i].FindControl("cbxCheck") as CheckBox;
                HiddenField hidNewsId = GrdCostRoom.Rows[i].FindControl("hidId") as HiddenField;
                if (fmOc.GetModel(Convert.ToInt32(hidNewsId.Value)).state_id == 3 || fmOc.GetModel(Convert.ToInt32(hidNewsId.Value)).state_id == 2)
                {
                    cbxCheck.Enabled = false;
                    cbxCheck.Checked = true;
                }
            }
        }
Пример #4
0
        /// <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());
            }
        }