Exemplo n.º 1
0
        protected void initData(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return;
            }
            EyouSoft.BLL.HotelStructure.HotelTourCustoms BLL = new EyouSoft.BLL.HotelStructure.HotelTourCustoms();
            HotelTourCustoms Model = BLL.GetModel(Utils.GetInt(id));

            if (null == Model)
            {
                return;
            }
            this.lbStartTime.Text = string.Format("{0:yyyy-MM-dd}—{1:yyyy-MM-dd}", Model.LiveStartDate, Model.LiveEndDate);//入住时间
            EyouSoft.Model.HotelStructure.HotelCity hotelCityModel = EyouSoft.BLL.HotelStructure.HotelCity.CreateInstance().GetModel(Model.CityCode);
            if (null != hotelCityModel)
            {
                this.lbCityName.Text = hotelCityModel.CityName;
            }
            this.lbPlace.Text        = Model.LocationAsk;                                                      //地理位置要求
            this.lbIsPointHotel.Text = string.IsNullOrEmpty(Model.HotelName.Trim())?"无":"是";                   //是否有指定酒店
            this.lbHotelName.Text    = Model.HotelName;                                                        //指定酒店名称
            this.lbStar.Text         = this.GetHotelLevelByEnum(Model.HotelStar);                              //星级要求
            this.lbRoom.Text         = Model.RoomAsk;                                                          //房型要求
            this.lbRoomCount.Text    = Convert.ToString(Model.RoomCount);                                      //房间数量
            this.lbPeopleCount.Text  = Convert.ToString(Model.PeopleCount);                                    //人数
            this.lbGroupPlan.Text    = string.Format("{0}元-{1}元", (int)Model.BudgetMin, (int)Model.BudgetMax); //团房预算
            EyouSoft.Model.CompanyStructure.ContactPersonInfo personModel = Model.Contact;
            if (null != personModel)
            {
                StringBuilder strPerson = new StringBuilder();
                if (!string.IsNullOrEmpty(personModel.ContactName))
                {
                    strPerson.Append("姓名:" + personModel.ContactName + ";");
                }
                if (!string.IsNullOrEmpty(personModel.Mobile))
                {
                    strPerson.Append("手机:" + personModel.Mobile + ";");
                }
                if (!string.IsNullOrEmpty(personModel.Tel))
                {
                    strPerson.Append("电话:" + personModel.Tel + ";");
                }
                if (!string.IsNullOrEmpty(personModel.Fax))
                {
                    strPerson.Append("传真:" + personModel.Fax + ";");
                }
                if (!string.IsNullOrEmpty(personModel.Email))
                {
                    strPerson.Append("Email:" + personModel.Email + ";");
                }
                this.lbContact.Text = strPerson.ToString();                 //订单联系人
            }
            this.lbPeopleType.Text = ((int)Model.GuestType) == 0?"内宾":"外宾"; //宾客类型
            this.lbGroupType.Text  = Model.TourType.ToString();             //团队类型
            this.lbOther.Text      = Model.OtherRemark;                     //其他要求
        }
Exemplo n.º 2
0
        protected void initData()
        {
            this.pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            string   kw        = Server.UrlDecode(Utils.GetQueryStringValue("kw"));                 //关键字
            string   flag      = Utils.GetQueryStringValue("flag");                                 //0:入住时间  1:离店时间
            DateTime?startTime = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("startTime")); //开始时间
            DateTime?endTime   = Utils.GetDateTimeNullable(Utils.GetQueryStringValue("endTime"));   //结束时间

            EyouSoft.BLL.HotelStructure.HotelTourCustoms BLL = new EyouSoft.BLL.HotelStructure.HotelTourCustoms();
            SearchTourCustomsInfo Model = new SearchTourCustomsInfo();

            Model.HotelName = kw;
            Model.CompanyId = this.SiteUserInfo.CompanyID;
            if (flag == "0")//入住时间
            {
                Model.CheckInEDate = endTime;
                Model.CheckInSDate = startTime;
            }
            else
            { //离店时间
                Model.CheckOutEDate = endTime;
                Model.CheckOutSDate = startTime;
            }
            IList <HotelTourCustoms> lst = BLL.GetList(this.pageSize, this.pageIndex, ref this.recordCount, Model);

            if (null != lst && lst.Count > 0)
            {
                this.RepList.DataSource = lst;
                this.RepList.DataBind();
                this.BindPage(kw, flag, startTime, endTime);
            }
            else
            {
                this.RepList.Controls.Add(new Literal()
                {
                    Text = "<tr><td colspan='9' align='center'>暂无信息!</td></tr>"
                });
                this.ExportPageInfo1.Visible = false;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 保存提交信息
        /// </summary>
        protected void Save()
        {
            bool result = false; //验证是否添加成功

            EyouSoft.Model.HotelStructure.HotelTourCustoms Model_TotelTourCustoms = new EyouSoft.Model.HotelStructure.HotelTourCustoms();
            EyouSoft.BLL.HotelStructure.HotelTourCustoms   Bll_TotelTourCustoms   = new EyouSoft.BLL.HotelStructure.HotelTourCustoms();
            Model_TotelTourCustoms.CompanyId = CompanyID;//公司编号

            if (string.IsNullOrEmpty(Utils.GetFormValue("startDateTime")))
            {
                SetErrorMsg(false, "请填写入住时间");
                return;
            }

            if (string.IsNullOrEmpty(Utils.GetFormValue("endDateTime")))
            {
                SetErrorMsg(false, "请填写离店时间");
                return;
            }

            if (Utils.GetFormValue(this.tos_destination.UniqueID) == "0")
            {
                SetErrorMsg(false, "请填写城市");
                return;
            }

            Model_TotelTourCustoms.LiveStartDate = Utils.GetDateTime(Utils.GetFormValue("startDateTime"));
            Model_TotelTourCustoms.LiveEndDate   = Utils.GetDateTime(Utils.GetFormValue("endDateTime"));
            Model_TotelTourCustoms.CityCode      = Utils.GetFormValue(this.tos_destination.UniqueID);
            Model_TotelTourCustoms.LocationAsk   = Utils.GetString(Utils.GetFormValue("tos_statusrequirement"), "");                                                //地理位置要求
            Model_TotelTourCustoms.HotelStar     = (EyouSoft.HotelBI.HotelRankEnum)Utils.GetInt(Utils.GetFormValue(tos_starrequirement.UniqueID).Trim());           //星级要求
            Model_TotelTourCustoms.RoomAsk       = Utils.GetString(Utils.GetFormValue("tos_roomtyperequirements"), "");                                             //房型要求
            Model_TotelTourCustoms.GuestType     = (EyouSoft.HotelBI.HBEGuestTypeIndicator)Utils.GetInt(Utils.GetFormValue(this.tos_visitorstype.UniqueID).Trim()); //宾客类型
            Model_TotelTourCustoms.TourType      = (EyouSoft.Model.HotelStructure.TourTypeList)Utils.GetInt(Utils.GetFormValue(this.tos_teamtype.UniqueID).Trim()); //团队类型
            Model_TotelTourCustoms.OtherRemark   = Utils.GetString(Utils.GetFormValue("textarea"), "");                                                             //其它要求

            if (Utils.GetInt(Utils.GetFormValue("tos_result")) == 1)                                                                                                //有指定酒店
            {
                if (Utils.GetFormValue("tos_HotelName") == "请填写酒店官方名称")
                {
                    SetErrorMsg(false, "请填写酒店官方名称");
                    return;
                }
                else
                {
                    Model_TotelTourCustoms.HotelName = Utils.GetString(Utils.GetFormValue("tos_HotelName"), "");  //酒店名称
                }
            }
            else
            {
                Model_TotelTourCustoms.HotelName = "";                   //酒店名称为空
            }
            if (Utils.GetInt(Utils.GetFormValue("tos_roomnumber")) == 0) //团队预订的房间数量是0
            {
                SetErrorMsg(false, "请填写预订的房间数量!");
                return;
            }

            if (Utils.GetInt(Utils.GetFormValue("tos_roomnumber")) < 7)  //预订的房间数量小于7
            {
                SetErrorMsg(false, "至少要预订7间房间!");
                return;
            }
            Model_TotelTourCustoms.RoomCount = Utils.GetInt(Utils.GetFormValue("tos_roomnumber"));  //房间数量


            if (Utils.GetInt(Utils.GetFormValue("tos_Number")) == 0) //入住的人数是0
            {
                SetErrorMsg(false, "请填写入住的人数!");
                return;
            }
            Model_TotelTourCustoms.PeopleCount = Utils.GetInt(Utils.GetFormValue("tos_Number"));  //入住人数

            if (Utils.GetDecimal(Utils.GetFormValue("tos_budget1")) == 0)
            {
                SetErrorMsg(false, "请填写团队房预算最小数!");
                return;
            }
            Model_TotelTourCustoms.BudgetMin = Utils.GetDecimal(Utils.GetFormValue("tos_budget1")); //团房预算最小值

            if (Utils.GetDecimal(Utils.GetFormValue("tos_budget2")) == 0)
            {
                SetErrorMsg(false, "请填写团队房预算最大数!");
                return;
            }

            if (Utils.GetDecimal(Utils.GetFormValue("tos_budget1")) > Utils.GetDecimal(Utils.GetFormValue("tos_budget2")))
            {
                SetErrorMsg(false, "团队房预算最大数不能小于最小数!");
                return;
            }

            Model_TotelTourCustoms.BudgetMax = Utils.GetDecimal(Utils.GetFormValue("tos_budget2")); //团房预算最大值

            result = Bll_TotelTourCustoms.Add(Model_TotelTourCustoms);                              //执行添加的方法
            if (result)
            {
                SetErrorMsg(true, "提交成功!");
            }
            else
            {
                SetErrorMsg(false, "提交失败");
            }

            Model_TotelTourCustoms = null; //释放资源
            Bll_TotelTourCustoms   = null;
        }