Esempio n. 1
0
        protected void GetModelByOrderNoId()
        {
            if (!string.IsNullOrEmpty(TourId))
            {
                modelMTourList = EyouSoft.BLL.NewTourStructure.BTourList.CreateInstance().GetModel(TourId);
                if (modelMTourList == null)
                {
                    modelMTourList = new MTourList();
                }
                else
                {
                    GetStatues(modelMTourList.OrderStatus);
                    #region 获取专线商联系人
                    modelCompany = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(modelMTourList.Business);
                    if (modelCompany == null)
                    {
                        modelCompany = new CompanyDetailInfo();
                    }
                    else
                    {
                        ContactInfo.Text = modelCompany.ContactInfo.ContactName + "    电话:" + modelCompany.ContactInfo.Tel;
                    }
                    #endregion

                    MRoute modelMroute = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(modelMTourList.RouteId);
                    litPriceTeam.Text = modelMroute.IndependentGroupPrice.ToString("0.00");

                    #region 获取游客联系人

                    litVisitorContact.Text = modelMTourList.VisitorContact + "    电话:" + modelMTourList.VisitorTel;

                    #endregion
                }
            }
        }
Esempio n. 2
0
        private void CheckDj()
        {
            MRoute modelinfo = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(RouteId);

            if (modelinfo.RouteSource == RouteSource.地接社添加)
            {
                Response.Redirect("LineList.aspx");
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 获取线路实体
        /// </summary>
        /// <param name="Id">线路自增编号</param>
        /// <returns>线路实体</returns>
        public virtual MRoute GetModel(long Id)
        {
            MRoute item = null;

            if (Id > 0)
            {
                item = dal.GetModel(Id);
            }
            return(item);
        }
Esempio n. 4
0
        /// <summary>
        /// 获取线路实体
        /// </summary>
        /// <param name="routeId">线路编号</param>
        /// <returns>线路实体</returns>
        public MRoute GetModel(string routeId)
        {
            MRoute item = null;

            if (!string.IsNullOrEmpty(routeId))
            {
                item = dal.GetModel(routeId);
            }
            return(item);
        }
Esempio n. 5
0
        /// <summary>
        /// 修改线路
        /// </summary>
        /// <param name="item">线路实体</param>
        /// <returns></returns>
        public bool UpdateRoute(MRoute item)
        {
            bool result = false;

            if (item != null)
            {
                item.StartCityName = GetCityName(item.StartCity);
                item.EndCityName   = GetCityName(item.EndCity);
                if (dal.UpdateRoute(item) > 0)
                {
                    result = true;
                }
            }
            return(result);
        }
Esempio n. 6
0
        protected string GetLineModel(string lineid)
        {
            string result     = "";
            MRoute modelroute = new MRoute();

            if (!string.IsNullOrEmpty(lineid))
            {
                modelroute = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(lineid);
                if (modelroute != null)
                {
                    result = modelroute.StartCityName;
                }
            }
            return(result);
        }
Esempio n. 7
0
        /// <summary>
        /// 获取线路区域类型
        /// </summary>
        /// <returns></returns>
        protected int GetAreaType()
        {
            MRoute routeModel =
                EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(
                    Utils.GetQueryStringValue("routeid").Length > 0
                        ? Utils.GetQueryStringValue("routeid")
                        : Utils.GetFormValue("routeid"));

            if (routeModel == null)
            {
                return(0);
            }

            return((int)routeModel.RouteType);
        }
Esempio n. 8
0
        /// <summary>
        /// 获取线路区域类型
        /// </summary>
        /// <returns></returns>
        protected void GetAreaType()
        {
            MRoute routeModel =
                EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(
                    Utils.GetQueryStringValue("routeid").Length > 0
                        ? Utils.GetQueryStringValue("routeid")
                        : Utils.GetFormValue("routeid"));

            if (routeModel == null)
            {
                AreaType = 0;
            }
            else
            {
                AreaType = (int)routeModel.RouteType;
            }
        }
Esempio n. 9
0
        /// <summary>
        /// 添加简易版线路(地接社)
        /// </summary>
        /// <param name="item">线路实体</param>
        /// <returns>线路编号</returns>
        public string AddGroundQuickRoute(MRoute item)
        {
            string routeId = string.Empty;

            if (item != null)
            {
                item.RouteId       = Guid.NewGuid().ToString();
                item.RouteSource   = RouteSource.地接社添加;
                item.StartCityName = GetCityName(item.StartCity);
                item.EndCityName   = GetCityName(item.EndCity);
                //item.B2BOrder = 50;
                //item.B2COrder = 50;
                item.ReleaseType = EyouSoft.Model.TourStructure.ReleaseType.Quick;
                if (dal.AddRoute(item) > 0)
                {
                    routeId = item.RouteId;
                }
            }
            return(routeId);
        }
Esempio n. 10
0
        /// <summary>
        /// 添加保存
        /// </summary>
        private void AddSave()
        {
            //出团日期
            string[] leaveDateStr = Utils.GetFormValue("leaveDate").Split(',');
            MRoute   routeModel   = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(Utils.GetFormValue("routeid"));
            //提前天数
            int         advanceDayRegistration = routeModel.AdvanceDayRegistration;
            MPowderList model = new MPowderList();

            #region 已注释
            //发布人名称
            //model.OperatorName = SiteUserInfo.UserName;
            ////主要浏览城市
            //model.BrowseCitys = routeModel.BrowseCitys;
            ////主要浏览国家
            //model.BrowseCountrys = routeModel.BrowseCountrys;
            ////线路特色
            //model.Characteristic = routeModel.Characteristic;
            ////点击量
            //model.ClickNum = routeModel.ClickNum;
            ////发布商品牌名称
            //model.CompanyBrand = routeModel.CompanyBrand;
            ////公司等级
            //model.Companylev = routeModel.Companylev;
            ////发布商简称
            //model.Introduction = routeModel.Introduction;
            #endregion
            //发布人IP
            model.IP = Request.UserHostAddress;
            //发布人编号
            model.OperatorId = SiteUserInfo.ID;
            //公司编号
            model.Publishers = SiteUserInfo.CompanyID;
            //线路Id
            model.RouteId = Utils.GetFormValue("routeid");
            //线路名称
            model.RouteName = routeModel.RouteName;
            //专线类型
            model.AreaId = routeModel.AreaId;
            //团队人数
            model.TourNum = Utils.GetInt(Utils.GetFormValue("txt_tourNum"));
            //是否限制人数
            model.IsLimit = Utils.GetFormValue("hd_isLimit") == "0";
            if (!model.IsLimit)
            {
                //余位
                model.MoreThan = Utils.GetInt(Utils.GetFormValue("txt_moreThan"), model.TourNum);
            }
            //成人市场价
            model.RetailAdultPrice = Utils.GetDecimal(Utils.GetFormValue("txt_retailAdultPrice"));
            //成人结算价
            model.SettlementAudltPrice = Utils.GetDecimal(Utils.GetFormValue("txt_settlementAudltPrice"));
            //儿童市场价
            model.RetailChildrenPrice = Utils.GetDecimal(Utils.GetFormValue("txt_retailChildrenPrice"), 0);
            //儿童结算价
            model.SettlementChildrenPrice = Utils.GetDecimal(Utils.GetFormValue("txt_settlementChildrenPrice"), 0);
            //单房差
            model.MarketPrice = Utils.GetDecimal(Utils.GetFormValue("txt_marketPrice"));
            //集合说明
            model.SetDec = Utils.GetFormValue("txt_setDec");
            //线路销售备注
            model.TourNotes = Utils.GetFormValue("txt_tourNotes");
            //领队全陪
            model.TeamLeaderDec = Utils.GetFormValue("txt_teamLeaderDec");
            //航班出发时间
            model.StartDate = Utils.GetFormValue("txt_startDate");
            //航班返回时间
            model.EndDate = Utils.GetFormValue("txt_endDate");

            //计算有几个出团日期
            int i = leaveDateStr.Length;
            //出团日期
            DateTime[] leaveDate = new DateTime[i];
            //报名截止时间
            DateTime[] registrationEndDate = new DateTime[i];
            //遍历
            while (i-- > 0)
            {
                //出团日期
                leaveDate[i] = Utils.GetDateTime(leaveDateStr[i]);
                //计算截止时间
                registrationEndDate[i] = leaveDate[i] - new TimeSpan(advanceDayRegistration, 0, 0, 0);

                //周六继续提前1天
                if ((int)registrationEndDate[i].DayOfWeek == 6)
                {
                    registrationEndDate[i] = registrationEndDate[i] - new TimeSpan(1, 0, 0, 0);
                }
                //周日继续提前2天
                if ((int)registrationEndDate[i].DayOfWeek == 0)
                {
                    registrationEndDate[i] = registrationEndDate[i] - new TimeSpan(2, 0, 0, 0);
                }
            }
            Response.Clear();
            Response.Write(EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance().AddBatchPowder(model, leaveDate, registrationEndDate));
            Response.End();
        }
Esempio n. 11
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save(string Operating)
        {
            /*
             * 初始化保存Model
             * 当存在线路Id获取原线路实体
             * 否则实例化一个新的线路实体
             */
            MRoute model = Utils.GetQueryStringValue("routeId").Length > 0 ?
                           EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(Utils.GetQueryStringValue("routeId"))
                :
                           new MRoute();

            //确保原线路实体不为空
            if (model != null)
            {
                #region 实体赋值
                //写死
                model.B2BOrder = 50;
                model.B2COrder = 50;
                //线路类型
                model.RouteType = (AreaType)Utils.GetInt(Utils.GetQueryStringValue("travelRangeType"));
                #region 主要浏览
                if (model.RouteType == AreaType.国际线)
                {
                    #region 主要浏览国家
                    //主要浏览国家信息
                    string[] browseCountryControl = Utils.GetFormValue(hd_BrowseCountrys.UniqueID).Split(',');
                    if (browseCountryControl.Length > 0)
                    {
                        //主要浏览国家
                        model.BrowseCountrys = new List <MBrowseCountryControl>();
                        //主要浏览国家个数
                        int i = browseCountryControl.Length;
                        //主要浏览国家签证信息
                        string qzArr = Utils.GetFormValue(hd_qz.UniqueID);
                        //递减遍历
                        while (i-- > 0)
                        {
                            //国家实体
                            MBrowseCountryControl browseCityControlModel = new MBrowseCountryControl();
                            //国家id
                            browseCityControlModel.CountryId = Utils.GetInt(browseCountryControl[i]);

                            //免签没有选择,才给其他赋值,否则直接不赋值
                            if (!chk_null.Checked)
                            {
                                //判断是否签证
                                if (qzArr.IndexOf(browseCountryControl[i] + ",") >= 0)
                                {
                                    browseCityControlModel.IsVisa = true;
                                }
                            }

                            model.BrowseCountrys.Add(browseCityControlModel);
                        }
                    }
                    else
                    {
                        model.BrowseCountrys = null;
                    }
                    //是否免签
                    if (chk_null.Checked)
                    {
                        model.IsNotVisa = true;
                    }
                    else
                    {
                        model.IsNotVisa = false;
                    }
                    //国际线路成人定金
                    model.AdultPrice = Utils.GetDecimal(Utils.GetFormValue(txt_AdultDeposit.UniqueID), -1);
                    //国际线路儿童定金
                    model.ChildrenPrice = Utils.GetDecimal(Utils.GetFormValue(txt_ChildrenDeposit.UniqueID), -1);
                    #endregion
                }
                else
                {
                    #region 主要浏览城市
                    string[] browseCitys = Utils.GetFormValue(hd_BrowseCitys.UniqueID).Split(',');
                    int      i           = browseCitys.Length;
                    if (i > 0)
                    {
                        //主要浏览城市
                        IList <MBrowseCityControl> browseCityControl = new List <MBrowseCityControl>();


                        while (i-- > 0)
                        {
                            MBrowseCityControl browseCityControlModel = new MBrowseCityControl();
                            //拆分城市县
                            int[] array = Utils.StringArrToIntArr(browseCitys[i].Split('|'));
                            if (array.Length > 1)
                            {
                                //县Id
                                browseCityControlModel.CountyId = array[0];
                                //城市Id
                                browseCityControlModel.CityId = array[1];
                            }
                            else
                            {
                                //城市Id
                                browseCityControlModel.CityId = Utils.GetInt(browseCitys[i]);
                            }

                            browseCityControl.Add(browseCityControlModel);
                        }
                        model.BrowseCitys = browseCityControl;
                    }
                    else
                    {
                        model.BrowseCitys = null;
                    }
                    #endregion
                }
                #endregion
                //公司编号
                model.Publishers = SiteUserInfo.CompanyID;
                //发布人ID
                model.OperatorId = SiteUserInfo.ID;
                //发布人名称
                model.OperatorName = SiteUserInfo.CompanyName;
                //专线类型
                model.AreaId = Utils.GetInt(Utils.GetQueryStringValue("travelRangeId"));
                //线路名称
                model.RouteName = Utils.GetFormValue(txt_LineName.UniqueID);
                //推荐类型
                model.RecommendType = (RecommendType)Utils.GetInt(Utils.GetFormValue(ddl_Status.UniqueID));
                //出发交通
                model.StartTraffic = (TrafficType)Utils.GetInt(Utils.GetFormValue(ddl_DepartureTraffic.UniqueID));
                //返回交通
                model.EndTraffic = (TrafficType)Utils.GetInt(Utils.GetFormValue(ddl_ReturnTraffic.UniqueID));
                //出发城市
                string[] sCity = Utils.GetFormValue(hd_goCity.UniqueID).Split('|');
                model.StartCity     = Utils.GetInt(sCity[0]);
                model.StartCityName = sCity[1];
                //返回城市
                string[] eCity = Utils.GetFormValue(hd_returnCity.UniqueID).Split('|');
                model.EndCity     = Utils.GetInt(eCity[0]);
                model.EndCityName = eCity[1];
                //线路特色
                model.Characteristic = Utils.GetFormValue(txt_LineFeatures.UniqueID);
                //最小成团人数
                model.GroupNum = Utils.GetInt(Utils.GetFormValue(txt_MinNumberPeople.UniqueID));
                //团队参考价格
                model.IndependentGroupPrice = Utils.GetDecimal(Utils.GetFormValue(txt_ReferencePrice.UniqueID));
                //天数
                model.Day = Utils.GetInt(Utils.GetFormValue(txt_days.UniqueID));
                //夜数
                model.Late = Utils.GetInt(Utils.GetFormValue(txt_nights.UniqueID));
                //线路主题
                model.Themes = GetTheme();
                //提前几天报名
                model.AdvanceDayRegistration = Utils.GetInt(Utils.GetFormValue(txt_EarlyDays.UniqueID));
                //散客报名无需成团,铁定发团
                model.IsCertain = Utils.GetFormValue(chk_FITRegistration.UniqueID) == "true";
                //报价包含
                string fITOrTeam = Utils.GetFormValue("hd_FITOrTeam").Trim();
                //线路配图
                string[] imgs = Utils.GetFormValue(this.files.UniqueID + "$hidFileName").Split('|');
                if (imgs != null && imgs.Count() > 1)
                {
                    model.RouteImg  = imgs[0];
                    model.RouteImg1 = imgs[1];
                    model.RouteImg2 = imgs[1];
                }
                //model.RouteImg = Utils.GetFormValue(this.files.UniqueID + "$hidFileName").Length > 0 ? Utils.GetFormValue(this.files.UniqueID + "$hidFileName") : model.RouteImg == null ? string.Empty : model.RouteImg;
                //实例化
                model.ServiceStandard = new MServiceStandard();
                #region 行程
                if (fITOrTeam == "FIT")
                {
                    string strTmp = Utils.GetFormValue(txt_FIT.UniqueID);
                    model.FitQuotation = string.IsNullOrEmpty(strTmp)
                                             ? string.Empty
                                             : strTmp;
                    /*清空标准版原有信息*/
                    //用车
                    model.ServiceStandard.CarContent = string.Empty;
                    //其他包含
                    model.ServiceStandard.IncludeOtherContent = string.Empty;
                    //用餐
                    model.ServiceStandard.DinnerContent = string.Empty;
                    //导游
                    model.ServiceStandard.GuideContent = string.Empty;
                    //住宿
                    model.ServiceStandard.ResideContent = string.Empty;
                    //景点
                    model.ServiceStandard.SightContent = string.Empty;
                    //往返交通
                    model.ServiceStandard.TrafficContent = string.Empty;
                    /***********************************************************/
                }
                else
                {
                    /*清空简易版原有信息*/
                    model.FitQuotation = string.Empty;
                    /************************************************************/
                    //用车
                    model.ServiceStandard.CarContent = Utils.GetFormValue("txt_car");
                    //其他包含
                    model.ServiceStandard.IncludeOtherContent = Utils.GetFormValue("txt_qt");
                    //用餐
                    model.ServiceStandard.DinnerContent = Utils.GetFormValue("txt_yc");
                    //导游
                    model.ServiceStandard.GuideContent = Utils.GetFormValue("txt_dy");
                    //住宿
                    model.ServiceStandard.ResideContent = Utils.GetFormValue("txt_zs");
                    //景点
                    model.ServiceStandard.SightContent = Utils.GetFormValue("txt_jd");
                    //往返交通
                    model.ServiceStandard.TrafficContent = Utils.GetFormValue("txt_fhjt");
                }
                #endregion
                //报价不包含
                model.ServiceStandard.NotContainService = Utils.GetFormValue(txt_PriceExcluding.UniqueID);
                //赠送项目
                model.ServiceStandard.GiftInfo = Utils.GetFormValue(txt_GiftItems.UniqueID);
                //儿童及其他安排
                model.ServiceStandard.ChildrenInfo = Utils.GetFormValue(txt_OtherArr.UniqueID);
                //购物安排
                model.ServiceStandard.ShoppingInfo = Utils.GetFormValue(txt_ShoppingArr.UniqueID);
                //自费项目
                model.ServiceStandard.ExpenseItem = Utils.GetFormValue(txt_ThisConsumption.UniqueID);
                //销售商须知(只有组团社用到)
                model.VendorsNotes = Utils.GetFormValue(txt_Notes.UniqueID);
                //备注
                model.ServiceStandard.Notes = Utils.GetFormValue(txt_Remarks.UniqueID);
                //销售区域
                if (routeSource == RouteSource.专线商添加 || model.RouteSource == RouteSource.专线商添加)
                {
                    model.Citys = GetSalesArea();
                }
                #endregion
                IRoute bll = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance();
                //行程类型
                string travelType = Utils.GetFormValue("hd_TravelContent").Trim();

                /*
                 * 操作结果变量
                 * >0=保存成功的线路Id,空字符串=保存失败,-2线路名已存在
                 */
                string isSave = "-1";
                //添加
                if (Operating == "AddSave")
                {
                    #region 添加
                    if (travelType == "SAE")
                    {
                        #region 行程简易版
                        model.FastPlan = Utils.EditInputText(Request.Form[txt_AddTourismBriefnessTravel.UniqueID] ?? string.Empty);
                        if ((RouteSource)Utils.GetInt(Utils.GetQueryStringValue("RouteSource"), 1) == RouteSource.专线商添加)
                        {
                            //专线添加
                            isSave = (!bll.IsExits(SiteUserInfo.CompanyID, model.RouteName)) ? bll.AddQuickRoute(model) : "-2";
                        }
                        else
                        {
                            //地接添加
                            isSave = (!bll.IsExits(SiteUserInfo.CompanyID, model.RouteName)) ? bll.AddGroundQuickRoute(model) : "-2";
                        }
                        #endregion
                    }
                    else
                    {
                        #region 行程内容标准
                        model.StandardPlans = GetTravel();
                        if ((RouteSource)Utils.GetInt(Utils.GetQueryStringValue("RouteSource"), 1) == RouteSource.专线商添加)
                        {
                            //专线添加
                            isSave = (!bll.IsExits(SiteUserInfo.CompanyID, model.RouteName)) ? bll.AddStandardRoute(model) : "-2";
                        }
                        else
                        {
                            //地接添加
                            isSave = (!bll.IsExits(SiteUserInfo.CompanyID, model.RouteName)) ? bll.AddGroundStandardRoute(model) : "-2";
                        }
                        #endregion
                    }
                    #endregion
                }
                else
                {
                    #region 修改
                    if (travelType == "SAE")
                    {
                        #region 行程简易版
                        model.ReleaseType = ReleaseType.Quick;
                        //清除原先标准版数据
                        model.StandardPlans = null;
                        model.FastPlan      = Utils.EditInputText(
                            Request.Form[txt_AddTourismBriefnessTravel.UniqueID] != null
                            &&
                            Request.Form[txt_AddTourismBriefnessTravel.UniqueID].ToString().Length > 0 ?
                            Request.Form[txt_AddTourismBriefnessTravel.UniqueID] :
                            string.Empty);
                        #endregion
                    }
                    else
                    {
                        #region 行程标准版
                        model.ReleaseType = ReleaseType.Standard;
                        //清除原先简易版数据
                        model.FastPlan      = string.Empty;
                        model.StandardPlans = GetTravel();
                        #endregion
                    }
                    #endregion
                    isSave = bll.UpdateRoute(model) ? model.RouteId : "-2";
                }
                Response.Clear();
                Response.Write(isSave.ToString());
                Response.End();
            }
            Response.Clear();
            Response.Write("");
            Response.End();
        }
Esempio n. 12
0
        /// <summary>
        /// 初始化页面
        /// </summary>
        private void InitPage()
        {
            #region 配置用户控件
            //配置上传用户控件
            files.IsGenerateThumbnail = true;
            //标准报价包含用户控件配置
            AddStandardRoute_ServiceStandard.ContainerID = Key;
            #endregion
            //线路区域类型名称
            lbl_travelRangeName.Text = EyouSoft.Common.Utils.GetQueryStringValue("travelRangeName");
            //绑定销售城市
            SalesArea();
            //绑定交通
            BindTraffic();
            //绑定推荐状态
            BindRecommendType(false);
            //绑定线路区域主题
            BindTheme();
            //线路Id
            routeId = Utils.GetQueryStringValue("RouteId");
            #region 修改-复制加载原有数据
            if (routeId.Length > 0)
            {
                #region 页面赋值
                //线路实体
                MRoute model = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(routeId);
                //线路来源
                routeSource = model.RouteSource;
                //专线类型
                travelRangeId = model.AreaId;
                if (model != null)
                {
                    //线路配图
                    if (model.RouteImg.Length > 0)
                    {
                        img_showImg.Src     = EyouSoft.Common.Domain.FileSystem + model.RouteImg1;
                        img_showImg.Visible = true;
                        //a_showImg.HRef = EyouSoft.Common.Domain.FileSystem + model.RouteImg;
                        //a_showImg.Visible = true;
                    }
                    #region 线路类型
                    //线路类型
                    travelRangeType = (int)model.RouteType;
                    if (model.RouteType == AreaType.国际线)
                    {
                        #region 主要浏览国家
                        if (model.BrowseCountrys != null && model.BrowseCountrys.Count > 0)
                        {
                            //主要浏览国家个数
                            int i = model.BrowseCountrys.Count;
                            //变量
                            string str = string.Empty, qzstr = string.Empty;
                            //递减遍历主要浏览国家
                            while (i-- > 0)
                            {
                                //国家信息
                                str += model.BrowseCountrys[i].CountryId + ",";
                                //签证信息
                                if (model.BrowseCountrys[i].IsVisa)
                                {
                                    qzstr += model.BrowseCountrys[i].CountryId + ",";
                                }
                            }
                            //国家信息
                            hd_BrowseCountrys.Value = str.Substring(0, str.Length - 1);
                            //签证信息
                            if (qzstr.Length > 0)
                            {
                                hd_qz.Value = qzstr.Substring(0, qzstr.Length - 1);
                            }
                        }
                        //免签 直接显示免签
                        if (model.IsNotVisa)
                        {
                            chk_null.Checked = true;
                            hd_qz.Value      = string.Empty;
                        }
                        //国际线路成人定金
                        txt_AdultDeposit.Text = model.AdultPrice < 0 ? string.Empty : Utils.FilterEndOfTheZeroDecimal(model.AdultPrice);
                        //国际线路儿童定金
                        txt_ChildrenDeposit.Text = model.ChildrenPrice < 0 ? string.Empty : Utils.FilterEndOfTheZeroDecimal(model.ChildrenPrice);
                        #endregion
                    }
                    else
                    {
                        #region 主要浏览城市
                        if (model.BrowseCitys != null && model.BrowseCitys.Count > 0)
                        {
                            //主要浏览城市个数
                            int i = model.BrowseCitys.Count;
                            //变量
                            string str = string.Empty;
                            //递减遍历主要浏览城市
                            while (i-- > 0)
                            {
                                /*
                                 * 保存主要浏览城市信息
                                 * 存在县保存:县id|城市id,
                                 * 不存在县(城市)保存:城市id,
                                 * 最终用js拆分
                                 */
                                if (model.BrowseCitys[i].CountyId > 0)
                                {
                                    str += model.BrowseCitys[i].CountyId + "|" + model.BrowseCitys[i].CityId + ",";
                                }
                                else
                                {
                                    str += model.BrowseCitys[i].CityId + ",";
                                }
                            }
                            //主要浏览城市信息
                            hd_BrowseCitys.Value = str.Substring(0, str.Length - 1);
                        }
                        #endregion
                    }
                    #endregion
                    #region 普通数据
                    //专线名称
                    lbl_travelRangeName.Text = model.AreaName;
                    //线路名称
                    txt_LineName.Text = model.RouteName;
                    //如果是推荐状态为  推荐 重新绑定推荐状态
                    if (model.RecommendType == RecommendType.推荐)
                    {
                        BindRecommendType(true);
                    }
                    //推荐状态
                    ddl_Status.SelectedValue = ((int)model.RecommendType).ToString();
                    //出发交通
                    ddl_DepartureTraffic.SelectedIndex = (int)model.StartTraffic - 1;
                    //返回交通
                    ddl_ReturnTraffic.SelectedIndex = (int)model.EndTraffic - 1;
                    //出发城市
                    hd_goCity.Value = model.StartCity + "|" + model.StartCityName;
                    //返回城市
                    hd_returnCity.Value = model.EndCity + "|" + model.EndCityName;
                    //线路特色
                    txt_LineFeatures.Value = model.Characteristic;
                    //最小成团人数
                    txt_MinNumberPeople.Text = model.GroupNum.ToString();
                    //参考价
                    txt_ReferencePrice.Text = Utils.FilterEndOfTheZeroDecimal(model.IndependentGroupPrice);
                    //住宿天数
                    txt_days.Text = model.Day.ToString();
                    //住宿夜数
                    txt_nights.Text = model.Late.ToString();
                    //提前几天报名
                    txt_EarlyDays.Text = model.AdvanceDayRegistration.ToString();
                    //散客报名无需成团,铁定发团
                    chk_FITRegistration.Checked = model.IsCertain;
                    //简易版行程
                    txt_AddTourismBriefnessTravel.Value = model.FastPlan;
                    //报价不包含
                    txt_PriceExcluding.Value = model.ServiceStandard.NotContainService;
                    //赠送项目
                    txt_GiftItems.Value = model.ServiceStandard.GiftInfo;
                    //儿童及其他安排
                    txt_OtherArr.Value = model.ServiceStandard.ChildrenInfo;
                    //购物安排
                    txt_ShoppingArr.Value = model.ServiceStandard.ShoppingInfo;
                    //自费项目
                    txt_ThisConsumption.Value = model.ServiceStandard.ExpenseItem;
                    //销售须知
                    txt_Notes.Value = model.VendorsNotes;
                    //备注
                    txt_Remarks.Value = model.ServiceStandard.Notes;
                    //主题
                    hd_SubjectLine.Value = SetTheme(model.Themes);
                    //销售区域
                    hd_SellCity.Value = SetSalesArea(model.Citys);
                    #endregion
                    #region 行程
                    //行程
                    if (model.ReleaseType == ReleaseType.Quick)
                    {
                        txt_AddTourismBriefnessTravel.Value = model.FastPlan;
                    }
                    else
                    {
                        if (model.StandardPlans != null && model.StandardPlans.Count > 0)
                        {
                            isTravel = true;
                            rpt_standardPlans.DataSource = model.StandardPlans.OrderBy(r => r.PlanDay).ToList();
                            rpt_standardPlans.DataBind();
                        }
                    }
                    #endregion
                    #region 报价
                    txt_FIT.Value = model.FitQuotation;
                    AddStandardRoute_ServiceStandard.RouteServiceStandardInfo = model.ServiceStandard;
                    //判断是否为团队
                    isServiceStandard = model.ServiceStandard.CarContent.Length > 0 ||        //用车
                                        model.ServiceStandard.DinnerContent.Length > 0 ||     //用餐
                                        model.ServiceStandard.ResideContent.Length > 0 ||     //住宿
                                        model.ServiceStandard.SightContent.Length > 0 ||      //景点
                                        model.ServiceStandard.TrafficContent.Length > 0 ||    //往返交通
                                        model.ServiceStandard.GuideContent.Length > 0 ||      //导游
                                        model.ServiceStandard.IncludeOtherContent.Length > 0; //其他包含
                    #endregion
                }
                #endregion
                //保存类型
                SaveType = Utils.GetQueryStringValue("type");
                if (SaveType == "copy")
                {
                    //复制
                    //清空线路ID
                    routeId = string.Empty;
                    //清空线路名称
                    txt_LineName.Text = string.Empty;
                }
            }
            #endregion

            /*
             * 绑定出发返回城市
             * 该方法需要根据线路区域类型显示不同的返回城市
             * 为兼容添加与修改
             * 该方法只能写在线路数据加载之后
             */
            BindCity();

            /*
             * 绑定主要浏览国家或城市
             * 该方法需要根据线路区域类型显示不同的返回城市
             * 为兼容添加与修改
             * 该方法只能写在线路数据加载之后
             * 此方法与修改-复制原有数据中的代码无冲突
             */
            BindCountrysOrCity();
        }
Esempio n. 13
0
        /// <summary>
        /// 页面初始化
        /// </summary>
        private void InitPage()
        {
            routeId        = Utils.GetQueryStringValue("routeId");
            tourId         = Utils.GetQueryStringValue("tourId");
            IntRouteSource = Utils.GetInt(Utils.GetQueryStringValue("intRouteSource"), 0);
            if (IntRouteSource >= 0)
            {
                if (IntRouteSource == 2)
                {
                    title = "地接社";
                }
                else
                {
                    title = "专线社";
                }
            }
            else
            {
                title = "组团社";
            }

            //判断是否为组团
            isZT = Utils.GetQueryStringValue("isZT").Length > 0;
            if (routeId.Length > 0)
            {
                if (!SiteUserInfo.CompanyRole.HasRole(CompanyType.组团))
                {
                    Response.Clear();
                    Response.Write("<script>javascript: window.location.href='/default.aspx';</script>");
                    Response.End();
                    return;
                }
                #region 单团预定初始化
                MRoute model = BRoute.CreateInstance().GetModel(routeId);
                if (model != null)
                {
                    advanceDayRegistration = model.AdvanceDayRegistration.ToString();
                    companyID = model.Publishers;
                    //lbl_MQ.Text = SiteUserInfo.ContactInfo.MQ;
                    //lbl_QQ.Text = SiteUserInfo.ContactInfo.QQ;
                    //线路名称
                    lbl_routeName.Text = model.RouteName;
                    //发布人名称
                    lbl_operatorName.Text = model.OperatorName;
                    CompanyDetailInfo cdModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(model.Publishers);
                    MQ                    = cdModel.ContactInfo.MQ;
                    QQ                    = cdModel.ContactInfo.QQ;
                    a_gowd.HRef           = Utils.GetShopUrl(model.Publishers);
                    lbl_operatorName.Text = cdModel.CompanyName;
                    lbl_sTraffic.Text     = model.StartTraffic + "  " + model.StartCityName;
                    lbl_eTraffic.Text    += model.EndTraffic + "  " + model.EndCityName;

                    isGJ = model.RouteType == AreaType.国际线;
                    //团队参考价
                    lbl_groupNum.Text = (model.IndependentGroupPrice == 0 ?
                                         "一团一议" : Utils.FilterEndOfTheZeroDecimal(model.IndependentGroupPrice) + " 元") + ",  最小成团人数 " + model.GroupNum + " 人";
                    //定金
                    if (isGJ)
                    {
                        string strPrice = "成人:";
                        //成人定金
                        if (model.AdultPrice <= 0)
                        {
                            strPrice += (model.AdultPrice == -1 ? "电询" : "无需定金");
                        }
                        else
                        {
                            strPrice += (model.AdultPrice.ToString("F0") + "元");
                        }

                        strPrice += "  儿童:";
                        //儿童定金
                        if (model.ChildrenPrice <= 0)
                        {
                            strPrice += (model.ChildrenPrice == -1 ? "电询" : "无需定金");
                        }
                        else
                        {
                            strPrice += (model.ChildrenPrice.ToString("F0") + "元");
                        }

                        lbl_Price.Text = strPrice;
                    }
                    //组团社联系人姓名
                    txt_travelContact.Value = Request.QueryString["contact"] ?? SiteUserInfo.ContactInfo.ContactName;
                    //组团社联系人电话
                    txt_travelTel.Value = Request.QueryString["tel"] ?? SiteUserInfo.ContactInfo.Tel;
                    //成人数未传值默认为1人
                    string adult = Request.QueryString["adult"] ?? "1";
                    //儿童数未传值默认为0人
                    string child = Request.QueryString["child"] ?? "0";
                    //预定人数=成人数+儿童数
                    txt_adultPrice.Value = (Utils.GetInt(adult) + Utils.GetInt(child)).ToString();
                    //参考金额=预定人数*参考金额
                    //参考总金额
                    lbl_tourPrice.Text = model.IndependentGroupPrice == 0 ?
                                         "一团一议" :
                                         Utils.FilterEndOfTheZeroDecimal((Utils.GetInt(adult) + Utils.GetInt(child)) * model.IndependentGroupPrice) + " 元";
                    IndependentGroupPrice = model.IndependentGroupPrice == 0 ?
                                            "一团一议" :
                                            model.IndependentGroupPrice.ToString();
                }
                #endregion
            }
            else if (tourId.Length > 0)
            {
                #region 团队订单管理查看初始化
                MTourList model = BTourList.CreateInstance().GetModel(tourId);
                if (model != null)
                {
                    orderStatus = model.OrderStatus;
                    //出团时间
                    lbl_leaveDate.Text = model.StartDate.ToString("yyyy-MM-dd");
                    //线路名称(定团旅行社)
                    lbl_routeName.Text = model.RouteName;
                    lbl_sTraffic.Text  = model.StartTraffic + "  " + model.StartCityName;
                    lbl_eTraffic.Text += model.EndTraffic + "  " + model.EndCityName;
                    if (isZT)
                    {
                        MQ = model.BusinessMQ;
                        QQ = model.BusinessQQ;
                        lbl_operatorName.Text = model.BusinessName;
                        a_gowd.HRef           = Utils.GetShopUrl(model.Business);
                        lbl_OrderNo.Text      = model.OrderNo;
                        //组团社联系人
                        txt_travelContact.Value = model.TravelContact;
                        //组团社联系人电话
                        txt_travelTel.Value = model.TravelTel;
                        //游客联系人
                        txt_visitorContact.Value = model.VisitorContact;
                        //游客联系人电话
                        txt_visitorTel.Value = model.VisitorTel;
                    }
                    else
                    {
                        MQ = model.TravelMQ;
                        QQ = model.TravelQQ;
                        lbl_operatorName.Text = model.TravelName;
                        a_gowd.HRef           = Utils.GetShopUrl(model.Travel);
                        //组团社联系人
                        lbl_travel.Text = model.TravelContact + " 联系电话:" + model.TravelTel;
                        //游客联系人
                        lbl_visitor.Text = model.VisitorContact + " 联系电话:" + model.VisitorTel;
                    }


                    if (model.RouteId.Length > 0)
                    {
                        routeId = model.RouteId;
                        MRoute routeModel = BRoute.CreateInstance().GetModel(model.RouteId);
                        if (routeModel != null)
                        {
                            isGJ = routeModel.RouteType == AreaType.国际线;
                            #region 团队参考价
                            //团队参考价
                            lbl_groupNum.Text = "最小成团人数: " + routeModel.GroupNum + " 人," +
                                                (routeModel.IndependentGroupPrice == 0 ?
                                                 "一团一议"
                                :
                                                 "参考价: " + Utils.FilterEndOfTheZeroDecimal(routeModel.IndependentGroupPrice) + " 元");
                            if (isZT)
                            {
                                lbl_groupNum.Text     += "</br>同业销售须知:</br>";
                                lbl_groupNum.Text     += model.VendorsNotes;
                                lbl_businessNotes.Text = model.BusinessNotes;
                                txt_travelNotes.Value  = model.TravelNotes;
                            }
                            else
                            {
                                lbl_travelNotes.Text    = model.TravelNotes;
                                txt_businessNotes.Value = model.BusinessNotes;
                            }
                            #endregion
                            #region 定金
                            //定金
                            if (isGJ)
                            {
                                lbl_Price.Text = "成人定金:" + (model.AdultPrice < 0 ? "电询" : Utils.FilterEndOfTheZeroDecimal(model.AdultPrice)) + "  儿童定金:" + (model.ChildrenPrice < 0 ? "电询" : Utils.FilterEndOfTheZeroDecimal(model.ChildrenPrice));
                            }
                            #endregion
                            #region 参考总金额
                            //参考总金额
                            lbl_tourPrice.Text = routeModel.IndependentGroupPrice == 0 ?
                                                 "一团一议" :
                                                 Utils.FilterEndOfTheZeroDecimal(model.ScheduleNum * routeModel.IndependentGroupPrice) + " 元";
                            IndependentGroupPrice = routeModel.IndependentGroupPrice == 0 ?
                                                    "一团一议" :
                                                    Utils.FilterEndOfTheZeroDecimal(routeModel.IndependentGroupPrice) + " 元";
                            #endregion
                        }
                    }
                    //预定人数
                    txt_adultPrice.Value = model.ScheduleNum.ToString();
                    //下单时间
                    lbl_issueTime.Text = model.IssueTime.ToString("yyyy-MM-dd HH:mm") + " " + model.OperatorName;
                }
                #endregion
            }
        }
Esempio n. 14
0
        /// <summary>
        /// 保存
        /// </summary>
        private void Save()
        {
            routeId = Utils.GetQueryStringValue("routeId");
            tourId  = Utils.GetQueryStringValue("tourId");
            if (tourId.Length <= 0 && routeId.Length > 0)
            {
                #region 组团社-单团预定
                MTourList model   = new MTourList();
                MRoute    brModel = BRoute.CreateInstance().GetModel(routeId);
                //线路Id
                model.RouteId = routeId;
                //线路名称
                model.RouteName = brModel.RouteName;
                //下单人编号
                model.OperatorId = SiteUserInfo.ID;
                //下单人名称
                model.OperatorName = SiteUserInfo.UserName;
                //下单时间
                model.IssueTime = DateTime.Now;
                //预定人数
                model.ScheduleNum = Utils.GetInt(Utils.GetFormValue(txt_adultPrice.UniqueID));
                //组团社备注
                model.TravelNotes = Utils.GetFormValue(txt_travelNotes.UniqueID);
                //组团社联系人
                model.TravelContact = Utils.GetFormValue(txt_travelContact.UniqueID);
                //组团社联系人电话
                model.TravelTel = Utils.GetFormValue(txt_travelTel.UniqueID);
                //游客联系人
                model.VisitorContact = Utils.GetFormValue(txt_visitorContact.UniqueID);
                //游客联系人电话
                model.VisitorTel = Utils.GetFormValue(txt_visitorTel.UniqueID);
                //出发日期
                model.StartDate = Utils.GetDateTime(Utils.GetFormValue(txt_leaveDate.UniqueID));
                //预订公司编号
                model.Travel = SiteUserInfo.CompanyID;
                //发布线路专线商或地接社公司编号
                model.Business = Utils.GetQueryStringValue("companyID");
                bool isSave = BTourList.CreateInstance().AddTourList(model);

                #region 发送短信模块
                if (isSave)
                {
                    EyouSoft.Model.SystemStructure.MSysSettingInfo SettingInfoModel = EyouSoft.BLL.SystemStructure.SystemInfo.CreateInstance().GetSysSetting();
                    //获得组团公司实体
                    EyouSoft.Model.CompanyStructure.CompanyDetailInfo travelComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
                    ////获得专线或地接公司实体
                    EyouSoft.Model.CompanyStructure.CompanyDetailInfo tourComModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(brModel.Publishers);
                    if (SettingInfoModel != null && travelComModel != null)
                    {
                        if (SettingInfoModel.OrderSmsCompanyTypes.Contains(travelComModel.CompanyLev))
                        {
                            string sendMsg = SettingInfoModel.OrderSmsTemplate;
                            sendMsg = sendMsg.Replace("[预订公司]", SiteUserInfo.CompanyName);
                            sendMsg = sendMsg.Replace("[预订联系电话]", SiteUserInfo.ContactInfo.Mobile);
                            sendMsg = sendMsg.Replace("[预订出发时间]", model.StartDate.ToString("yyyy-MM-dd"));
                            sendMsg = sendMsg.Replace("[预订产品]", model.RouteName);
                            sendMsg = sendMsg.Replace("[预订数量]", model.ScheduleNum.ToString() + "人");

                            #region 发送操作
                            EyouSoft.Model.SMSStructure.SendMessageInfo sendMessageInfo = new EyouSoft.Model.SMSStructure.SendMessageInfo();
                            sendMessageInfo.CompanyId    = SiteUserInfo.CompanyID;
                            sendMessageInfo.CompanyName  = SiteUserInfo.CompanyName;
                            sendMessageInfo.UserId       = this.SiteUserInfo.ID;
                            sendMessageInfo.UserFullName = SiteUserInfo.ContactInfo.ContactName;
                            sendMessageInfo.SMSContent   = sendMsg;
                            sendMessageInfo.SendTime     = DateTime.Now;
                            //添加要发送的手机号码
                            List <EyouSoft.Model.SMSStructure.AcceptMobileInfo> moblieList  = new List <EyouSoft.Model.SMSStructure.AcceptMobileInfo>();
                            EyouSoft.Model.SMSStructure.AcceptMobileInfo        mobileModel = new EyouSoft.Model.SMSStructure.AcceptMobileInfo();
                            mobileModel.IsEncrypt = false;
                            if (tourComModel.ContactInfo != null)
                            {
                                mobileModel.Mobile = tourComModel.ContactInfo.Mobile;
                            }
                            moblieList.Add(mobileModel);
                            sendMessageInfo.Mobiles = moblieList;

                            //发送通道
                            EyouSoft.Model.SMSStructure.SMSChannel sendChannel = new EyouSoft.Model.SMSStructure.SMSChannelList()[Convert.ToInt32(SettingInfoModel.OrderSmsChannelIndex)];
                            sendMessageInfo.SendChannel = sendChannel;
                            sendMessageInfo.SendType    = EyouSoft.Model.SMSStructure.SendType.直接发送;
                            EyouSoft.IBLL.SMSStructure.ISendMessage    sBll            = EyouSoft.BLL.SMSStructure.SendMessage.CreateInstance();
                            EyouSoft.Model.SMSStructure.SendResultInfo SendResultModel = sBll.Send(sendMessageInfo);
                            SendResultModel = null;
                            sendMessageInfo = null;

                            #endregion
                        }
                    }
                }
                #endregion

                Response.Clear();
                Response.Write(isSave.ToString().ToLower());
                Response.End();
                #endregion
            }
            else if (tourId.Length > 0)
            {
                #region 组团-地接-专线修改
                MTourList model = BTourList.CreateInstance().GetModel(tourId);
                model.ScheduleNum = Utils.GetInt(Utils.GetFormValue(txt_adultPrice.UniqueID));
                if (Utils.GetQueryStringValue("isZT").Length > 0)
                {
                    //组团修改
                    model.TravelNotes = Utils.GetFormValue(txt_travelNotes.UniqueID);
                    //组团社联系人
                    model.TravelContact = Utils.GetFormValue(txt_travelContact.UniqueID);
                    //组团社联系人电话
                    model.TravelTel = Utils.GetFormValue(txt_travelTel.UniqueID);
                    //游客联系人
                    model.VisitorContact = Utils.GetFormValue(txt_visitorContact.UniqueID);
                    //游客联系人电话
                    model.VisitorTel = Utils.GetFormValue(txt_visitorTel.UniqueID);
                    Response.Clear();
                    Response.Write(BTourList.CreateInstance().OrderModifyZT(model));
                    Response.End();
                }
                else
                {
                    //专线,地接修改
                    model.BusinessNotes = Utils.GetFormValue(txt_businessNotes.UniqueID);
                    Response.Clear();
                    Response.Write(BTourList.CreateInstance().OrderModifyZXDJ(model));
                    Response.End();
                }
                #endregion
            }
        }
Esempio n. 15
0
        /// <summary>
        /// 加载页面
        /// </summary>
        protected void InitPage()
        {
            #region 判断公司身份
            CompanyType[] companyType = this.SiteUserInfo.CompanyRole.RoleItems;
            foreach (var item in companyType)
            {
                switch (item)
                {
                case CompanyType.专线:
                    IsRouteAgency = true;
                    break;

                case CompanyType.地接:
                    break;

                case CompanyType.组团:
                    IsTourAgency = true;
                    break;

                default:
                    break;
                }
            }
            #endregion

            //根据团号获取团队实体信息
            EyouSoft.Model.NewTourStructure.MPowderList PowderModel =
                EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance().GetModel(TeamId);
            if (PowderModel != null)
            {
                if (PowderModel.RouteType == AreaType.国际线)
                {
                    isInternational = true;
                }

                #region 判断散拼团队状态以及过期时间
                if (PowderModel.LeaveDate.Subtract(DateTime.Now.Date).Days <= 0 || PowderModel.PowderTourStatus == PowderTourStatus.客满 || PowderModel.PowderTourStatus == PowderTourStatus.停收)
                {
                    IsShow = false;
                }
                #endregion

                #region 普通信息
                //团号
                this.TourNo.Text = PowderModel.TourNo;
                //团队状态
                this.Statue.Text = PowderModel.PowderTourStatus.ToString();
                //出发时间
                this.BeginDate.Text = PowderModel.LeaveDate.ToString("yyyy-MM-dd");
                //报名截止时间
                this.EndDate.Text = PowderModel.RegistrationEndDate.ToString("yyyy-MM-dd");
                //成人市场价
                this.AdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(PowderModel.RetailAdultPrice);
                //儿童市场价
                this.ChildPrice.Text = Utils.FilterEndOfTheZeroDecimal(PowderModel.RetailChildrenPrice);
                //成人结算价
                this.AdultSettlementPrice.Text = Utils.FilterEndOfTheZeroDecimal(PowderModel.SettlementAudltPrice);
                //儿童结算价
                this.ChildSettlementPrice.Text = Utils.FilterEndOfTheZeroDecimal(PowderModel.SettlementChildrenPrice);
                //单房差
                this.danfangcha.Text = Utils.FilterEndOfTheZeroDecimal(PowderModel.MarketPrice);
                //团队
                this.Team.Text = "计划收客人数 " + PowderModel.TourNum.ToString() +
                                 "余位 " + PowderModel.MoreThan.ToString() +
                                 "留位 " + PowderModel.SaveNum.ToString();
                //出发班次时间
                this.GoTime.Text = PowderModel.StartDate;
                //反悔航班时间
                this.BackTime.Text = PowderModel.EndDate;
                //集合说明
                this.CollectionDescription.Text = PowderModel.SetDec;
                //领队全陪说明
                this.DescriptionLeader.Text = PowderModel.TeamLeaderDec;
                //销售商须知
                this.SellerNotice.Text = PowderModel.VendorsNotes;
                //团队备注
                this.TeamRemark.Text = PowderModel.TourNotes;
                //线路名称
                this.RouteName.Text = PowderModel.RouteName;
                //公司名称
                this.CompanyName.Text = PowderModel.PublishersName;
                Mq = Utils.GetMQ(SiteUserInfo.ContactInfo.MQ);
                //专线名称
                this.RouteType.Text = PowderModel.AreaName;
                //出发交通和城市
                this.StartTraffic.Text = PowderModel.StartTraffic + " " + PowderModel.StartCityName;
                //返回交通和城市
                this.EndTraffic.Text = PowderModel.EndTraffic + " " + PowderModel.EndCityName;
                //主题
                this.RouteTheme.Text = GetThemeList(PowderModel.Themes);
                //天数
                this.Day.Text = PowderModel.Day.ToString();
                //晚
                this.Night.Text = PowderModel.Late.ToString();
                //主要游览地区
                this.MainTourArea.Text = GetMainTourArea(PowderModel.RouteType, PowderModel.BrowseCitys, PowderModel.BrowseCountrys);
                //签证地区
                this.VisaArea.Text = GetVisaArea(PowderModel.BrowseCountrys);
                //成人定金
                this.Adult.Text = PowderModel.AdultPrice == 0 ? "电询" : Utils.FilterEndOfTheZeroDecimal(PowderModel.AdultPrice);
                //儿童定金
                this.Child.Text = PowderModel.ChildrenPrice == 0 ? "电询" : Utils.FilterEndOfTheZeroDecimal(PowderModel.ChildrenPrice);
                //线路特色
                this.RouteFeatures.Text = Utils.TextToHtml(PowderModel.Characteristic);
                #endregion

                #region 团队参考价格&最小成团人数
                if (PowderModel.RouteId != "" && PowderModel.RouteId != null)
                {
                    MRoute routeModel = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(PowderModel.RouteId);
                    //最小成团人数
                    this.Min.Text = routeModel.GroupNum.ToString();
                    //团队参考价格
                    if (routeModel.IndependentGroupPrice == 0)
                    {
                        this.TeamPrice.Text = "一团一议";
                    }
                    else
                    {
                        this.TeamPrice.Text = Utils.FilterEndOfTheZeroDecimal(routeModel.IndependentGroupPrice);
                    }
                }
                #endregion

                #region 日程信息
                if (PowderModel.StandardPlans != null && PowderModel.StandardPlans.Count > 0)
                {
                    isStandard = true;
                    //标准日程
                    BindStandardPlan(PowderModel.StandardPlans);
                }
                else
                {
                    //简易行程
                    this.FastStandard.Text = PowderModel.StandardStroke;
                }
                #endregion

                #region  务信息
                if (PowderModel.FitQuotation != "" && PowderModel.FitQuotation != null)
                {
                    this.Containers.Text = PowderModel.FitQuotation;
                }
                if (PowderModel.ServiceStandard != null)
                {
                    if (PowderModel.FitQuotation == "" || PowderModel.FitQuotation == null)
                    {
                        //报价包含
                        this.Containers.Text = Utils.TextToHtml(GetContainers(PowderModel.ServiceStandard));
                    }
                    //不含
                    this.NoContainers.Text = Utils.TextToHtml(PowderModel.ServiceStandard.NotContainService);
                    //儿童
                    this.Children.Text = Utils.TextToHtml(PowderModel.ServiceStandard.ChildrenInfo);
                    //赠送
                    this.Gift.Text = Utils.TextToHtml(PowderModel.ServiceStandard.GiftInfo);
                    //购物
                    this.Shopping.Text = Utils.TextToHtml(PowderModel.ServiceStandard.ShoppingInfo);
                    //自费
                    this.OwnExpense.Text = Utils.TextToHtml(PowderModel.ServiceStandard.ExpenseItem);
                    //备注
                    this.Remark.Text = Utils.TextToHtml(PowderModel.ServiceStandard.Notes);
                }
                #endregion
            }
        }
Esempio n. 16
0
        /// <summary>
        /// 添加保存
        /// </summary>
        private void AddSave()
        {
            MRoute routeModel = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetModel(Utils.GetFormValue("RouteId"));

            if (routeModel != null)
            {
                //提前天数
                int         advanceDayRegistration = routeModel.AdvanceDayRegistration;
                MPowderList model = new MPowderList();

                #region 线路信息赋值
                //线路Id
                model.RouteId        = Utils.GetFormValue("RouteId");
                model.Characteristic = routeModel.Characteristic;
                //线路名称
                model.RouteName = routeModel.RouteName;
                //专线类型
                model.AreaId   = routeModel.AreaId;
                model.AreaName = routeModel.AreaName;
                //发布人编号
                model.OperatorId   = routeModel.OperatorId;
                model.OperatorName = routeModel.OperatorName;
                //公司编号
                model.Publishers     = CompanyId;
                model.BrowseCitys    = routeModel.BrowseCitys;
                model.BrowseCountrys = routeModel.BrowseCountrys;
                model.Citys          = routeModel.Citys;
                model.ClickNum       = 0;
                model.EndCity        = routeModel.EndCity;
                model.EndCityName    = routeModel.EndCityName;
                model.Day            = routeModel.Day;
                model.EndTraffic     = routeModel.EndTraffic;
                model.FitQuotation   = routeModel.FitQuotation;
                model.IssueTime      = DateTime.Now;
                model.Late           = routeModel.Late;
                //收客状态
                model.PowderTourStatus = PowderTourStatus.收客;
                model.RecommendType    = RecommendType.新品;
                model.RouteImg         = routeModel.RouteImg;
                model.RouteImg1        = routeModel.RouteImg1;
                model.RouteImg2        = routeModel.RouteImg2;
                model.ServiceStandard  = routeModel.ServiceStandard;
                model.StandardPlans    = routeModel.StandardPlans;
                model.StartTraffic     = routeModel.StartTraffic;
                model.TeamLeaderDec    = routeModel.TeamPlanDes;
                model.Themes           = routeModel.Themes;
                model.VendorsNotes     = routeModel.VendorsNotes;

                EyouSoft.Model.CompanyStructure.CompanyInfo comModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(CompanyId);
                if (comModel != null)
                {
                    model.CompanyLev   = comModel.CompanyLev;
                    model.CompanyBrand = comModel.CompanyBrand;
                    model.Introduction = comModel.Introduction;
                }

                #endregion
                //团队人数
                model.TourNum = Utils.GetInt(Utils.GetFormValue("txt_tourNum"));

                //是否限制人数
                model.IsLimit = Utils.GetFormValue("hd_isLimit") == "0";
                if (!model.IsLimit)
                {
                    //余位
                    model.MoreThan = Utils.GetInt(Utils.GetFormValue("txt_moreThan"));
                }
                //成人市场价
                model.RetailAdultPrice = Utils.GetDecimal(Utils.GetFormValue("txt_retailAdultPrice"));
                //成人结算价
                model.SettlementAudltPrice = Utils.GetDecimal(Utils.GetFormValue("txt_settlementAudltPrice"));
                //儿童市场价
                model.RetailChildrenPrice = Utils.GetDecimal(Utils.GetFormValue("txt_retailChildrenPrice"));
                //儿童结算价
                model.SettlementChildrenPrice = Utils.GetDecimal(Utils.GetFormValue("txt_settlementChildrenPrice"));
                //单房差
                model.MarketPrice = Utils.GetDecimal(Utils.GetFormValue("txt_marketPrice"));
                //集合说明
                model.SetDec = Utils.GetFormValue("txt_marketPrice");
                //线路销售备注
                model.TourNotes = Utils.GetFormValue("txt_tourNotes");
                //领队全陪
                model.TeamLeaderDec = Utils.GetFormValue("txt_tourNotes");

                model.StartDate = Utils.GetFormValue(this.txt_startDate.UniqueID);
                model.EndDate   = Utils.GetFormValue(this.txt_endDate.UniqueID);

                //出团日期
                string[] leaveDateStr = Utils.GetFormValue("leaveDate").Split(',');

                //计算有几个出团日期
                int i = leaveDateStr.Length;
                //出团日期
                DateTime[] leaveDate = new DateTime[i];
                //报名截止时间
                DateTime[] registrationEndDate = new DateTime[i];
                //遍历
                while (i-- > 0)
                {
                    //出团日期
                    leaveDate[i] = Utils.GetDateTime(leaveDateStr[i]);
                    //计算截止时间
                    registrationEndDate[i] = leaveDate[i] - new TimeSpan(advanceDayRegistration, 0, 0, 0);

                    //周六继续提前1天
                    if ((int)registrationEndDate[i].DayOfWeek == 6)
                    {
                        registrationEndDate[i] = registrationEndDate[i] - new TimeSpan(1, 0, 0, 0);
                    }
                    //周日继续提前2天
                    if ((int)registrationEndDate[i].DayOfWeek == 0)
                    {
                        registrationEndDate[i] = registrationEndDate[i] - new TimeSpan(2, 0, 0, 0);
                    }
                }
                model.IP = Page.Request.UserHostAddress;
                bool ret = EyouSoft.BLL.NewTourStructure.BPowderList.CreateInstance().AddBatchPowder(model, leaveDate, registrationEndDate);
                Response.Clear();
                if (ret)
                {
                    Response.Write(true);
                }
                else
                {
                    Response.Write(false);
                }
                Response.End();
            }
        }