Пример #1
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

            //根据线路编号获取相应的实体
            var IBll = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance();
            EyouSoft.Model.NewTourStructure.MRoutePrint RoutePrintModel = IBll.GetPrintModel(RouteId);
            //更新阅览记录
            IBll.UpdateClick(RouteId);
            if (RoutePrintModel != null)
            {
                if (RoutePrintModel.RouteType == AreaType.国际线)
                {
                    isInternational = true;
                }
                #region 普通信息
                //根据公司编号获取网店链接
                if (RoutePrintModel.RouteSource == RouteSource.专线商添加)
                {
                    ShopURL = Utils.GetShopUrl(RoutePrintModel.CompanyId);
                }

                //线路名称
                this.RouteName.Text = RoutePrintModel.RouteName;
                //公司名称
                this.CompanyName.Text = RoutePrintModel.CompanyName;
                Mq = Utils.GetMQ(RoutePrintModel.CompanyContactMq);
                //专线类型
                this.RouteType.Text = RoutePrintModel.AreaName;
                //出发交通和城市
                this.StartTraffic.Text = RoutePrintModel.StartTraffic + " " + RoutePrintModel.StartCityName;
                //返回交通和城市
                this.EndTraffic.Text = RoutePrintModel.EndTraffic + " " + RoutePrintModel.EndCityName;
                //主题
                this.RouteTheme.Text = RoutePrintModel.ThemeName;
                //天数
                this.Day.Text = RoutePrintModel.Day.ToString();
                //晚
                this.Night.Text = RoutePrintModel.Late.ToString();
                //最小成团人数
                this.Min.Text = RoutePrintModel.GroupNum.ToString();
                //主要游览地区
                this.MainTourArea.Text = RoutePrintModel.BrowseCity;
                //签证地区
                this.VisaArea.Text = RoutePrintModel.VisaCity;
                var strAdultPrice = new StringBuilder();
                if (RoutePrintModel.AdultPrice <= 0)
                {
                    if (RoutePrintModel.AdultPrice == -1)
                    {
                        strAdultPrice.Append("成人 <span class=\"ff0000\">电询</span> &nbsp;");
                    }
                    if (RoutePrintModel.AdultPrice == 0)
                    {
                        strAdultPrice.Append("成人 <span class=\"ff0000\">无需定金</span> &nbsp;");
                    }
                }
                else
                {
                    strAdultPrice.AppendFormat("成人 <span class=\"ff0000\">{0}</span> 元&nbsp;",
                                               Utils.FilterEndOfTheZeroDecimal(RoutePrintModel.AdultPrice));
                }
                if (RoutePrintModel.ChildrenPrice <= 0)
                {
                    if (RoutePrintModel.AdultPrice == -1)
                    {
                        strAdultPrice.Append("儿童 <span class=\"ff0000\">电询</span> &nbsp;");
                    }
                    if (RoutePrintModel.AdultPrice == 0)
                    {
                        strAdultPrice.Append("儿童 <span class=\"ff0000\">无需定金</span> &nbsp;");
                    }
                }
                else
                {
                    strAdultPrice.AppendFormat(" 儿童 <span class=\"ff0000\">{0}</span> 元&nbsp;&nbsp;&nbsp;",
                                               Utils.FilterEndOfTheZeroDecimal(RoutePrintModel.ChildrenPrice));
                }
                ltrPrice.Text = strAdultPrice.ToString();
                //线路特色
                this.RouteFeatures.Text = Utils.TextToHtml(RoutePrintModel.Characteristic);
                #endregion

                #region 团队参考价格
                if (RoutePrintModel.ReferencePrice == 0)
                {
                    this.TeamPrice.Text = "一团一议";
                }
                else
                {
                    this.TeamPrice.Text = Utils.FilterEndOfTheZeroDecimal(RoutePrintModel.ReferencePrice);
                }
                #endregion

                #region 绑定日程
                if (RoutePrintModel.StandardPlan != null && RoutePrintModel.StandardPlan.Count > 0)
                {
                    isStandard = true;
                    BindStandardPlan(RoutePrintModel.StandardPlan);
                }
                else
                {
                    this.QuickStandard.Text = RoutePrintModel.FastPlan;
                }
                #endregion

                #region  务信息
                if (RoutePrintModel.FitQuotation != null && RoutePrintModel.FitQuotation != "")
                {
                    this.Containers.Text = Utils.TextToHtml(RoutePrintModel.FitQuotation);
                }
                if (RoutePrintModel.ServiceStandard != null)
                {
                    //报价包含
                    if (RoutePrintModel.FitQuotation == null || RoutePrintModel.FitQuotation == "")
                    {
                        this.Containers.Text = Utils.TextToHtml(GetContainers(RoutePrintModel.ServiceStandard));
                    }
                    //不含
                    this.NoContainers.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.NotContainService);
                    //儿童
                    this.Children.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.ChildrenInfo);
                    //赠送
                    this.Gift.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.GiftInfo);
                    //购物
                    this.Shopping.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.ShoppingInfo);
                    //自费
                    this.OwnExpense.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.ExpenseItem);
                    //备注
                    this.Remark.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.Notes);
                }
                #endregion
            }
        }
Пример #2
0
        /// <summary>
        /// 加载页面信息
        /// </summary>
        protected void InitPage(string RouteId)
        {
            //根据线路编号获取相应的线路实体
            EyouSoft.Model.NewTourStructure.MRoutePrint RoutePrintModel =
                EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance().GetPrintModel(RouteId);
            if (RoutePrintModel != null)
            {
                if (RoutePrintModel.RouteType == AreaType.国际线)
                {
                    isInternational = true;
                }
                #region 普通信息

                //打印时间
                this.LabGetTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm");

                #region 联系信息2012-04-20  周文超 替换成当前登录用户的

                plhContact.Visible = IsLogin;
                if (IsLogin && SiteUserInfo != null)
                {
                    EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyDetailInfo =
                        EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);

                    //公司logo
                    if (!string.IsNullOrEmpty(companyDetailInfo.AttachInfo.CompanyLogo.ImagePath))
                    {
                        this.TravelLogo = string.Format(
                            "<img src=\"{0}\" height=\"60\">", EyouSoft.Common.Domain.FileSystem + companyDetailInfo.AttachInfo.CompanyLogo.ImagePath);
                    }

                    //发布商名称
                    this.TravelName.Text = companyDetailInfo.CompanyName;
                    //地址
                    this.TravelAddress.Text = companyDetailInfo.CompanyAddress;
                    //传真
                    this.Fax.Text = companyDetailInfo.ContactInfo.Fax;
                    //电话
                    this.Phone.Text = companyDetailInfo.ContactInfo.Tel;
                    //手机
                    this.Mobile.Text = companyDetailInfo.ContactInfo.Mobile;
                    //联系人
                    this.Contact.Text = companyDetailInfo.ContactInfo.ContactName;
                }

                #endregion

                //线路名称
                this.RouteName.Text = RoutePrintModel.RouteName;
                //线路名称
                this.RouteName1.Text = RoutePrintModel.RouteName;
                //主题
                this.Themes.Text = RoutePrintModel.ThemeName;
                //出发城市和交通
                this.TrafficandCity.Text = RoutePrintModel.StartCityName + "  " +
                                           RoutePrintModel.StartTraffic.ToString();
                //返程城市和交通
                this.TrafficandBackCity.Text = RoutePrintModel.EndCityName + "  " +
                                               RoutePrintModel.EndTraffic.ToString();
                //旅游天数
                this.Dates.Text = RoutePrintModel.Day.ToString() + "天";
                //报名截至时间
                this.ApplyEndDate.Text = string.Format("提前{0}日报名", RoutePrintModel.AdvanceDayRegistration);
                //主要游览地区
                this.MainTourArea.Text = RoutePrintModel.BrowseCity;
                //签证地区
                this.VisaArea.Text = RoutePrintModel.VisaCity;
                var strAdultPrice = new StringBuilder();
                if (RoutePrintModel.AdultPrice <= 0)
                {
                    if (RoutePrintModel.AdultPrice == -1)
                    {
                        strAdultPrice.Append("成人:电询 &nbsp;");
                    }
                    if (RoutePrintModel.AdultPrice == 0)
                    {
                        strAdultPrice.Append("成人:无需定金 &nbsp;");
                    }
                }
                else
                {
                    strAdultPrice.AppendFormat("成人:{0} 元/人&nbsp;",
                                               Utils.FilterEndOfTheZeroDecimal(RoutePrintModel.AdultPrice));
                }
                if (RoutePrintModel.ChildrenPrice <= 0)
                {
                    if (RoutePrintModel.AdultPrice == -1)
                    {
                        strAdultPrice.Append("儿童:电询 &nbsp;");
                    }
                    if (RoutePrintModel.AdultPrice == 0)
                    {
                        strAdultPrice.Append("儿童:无需定金 &nbsp;");
                    }
                }
                else
                {
                    strAdultPrice.AppendFormat(" 儿童:{0} 元/人&nbsp;&nbsp;&nbsp;",
                                               Utils.FilterEndOfTheZeroDecimal(RoutePrintModel.ChildrenPrice));
                }
                ltrPrice.Text = strAdultPrice.ToString();

                //线路特色
                this.RouteFeatures.Text = Utils.TextToHtml(RoutePrintModel.Characteristic);
                #endregion

                #region 市场价
                if (RoutePrintModel.TeamPlanDes != null && RoutePrintModel.TeamPlanDes.Count > 0)
                {
                    this.Price.Value = Utils.FilterEndOfTheZeroDecimal(RoutePrintModel.MinRetailAdultPrice);
                }
                else
                {
                    this.Price.Value = Utils.FilterEndOfTheZeroDecimal(RoutePrintModel.ReferencePrice);
                }
                #endregion

                #region 出团计划
                if (RoutePrintModel.TeamPlanDes != null && RoutePrintModel.TeamPlanDes.Count > 0)
                {
                    isShow = true;
                    this.GroupPlan.Text = GetTeamPlanDes(RoutePrintModel.TeamPlanDes);
                }
                #endregion

                #region 日程
                if (RoutePrintModel.StandardPlan != null && RoutePrintModel.StandardPlan.Count > 0)
                {
                    if (RoutePrintModel.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)
                    {
                        isStandard = true;
                        //绑定标准日程
                        BindStandardPlan(RoutePrintModel.StandardPlan);
                    }
                }
                else
                {
                    //简易行程
                    this.FastisStandard.Text = RoutePrintModel.FastPlan;
                }
                #endregion

                #region  务项目
                if (RoutePrintModel.FitQuotation != null && RoutePrintModel.FitQuotation != "")
                {
                    //简易报价包含
                    this.Containers.Text = RoutePrintModel.FitQuotation;
                }
                if (RoutePrintModel.ServiceStandard != null)
                {
                    //服务包含
                    if (RoutePrintModel.FitQuotation == null || RoutePrintModel.FitQuotation == "")
                    {
                        this.Containers.Text = Utils.TextToHtml(GetContainers(RoutePrintModel.ServiceStandard));
                    }
                    //服务不含
                    this.NoContainers.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.NotContainService);
                    //儿童
                    this.Children.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.ChildrenInfo);
                    //赠送
                    this.Gift.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.GiftInfo);
                    //购物
                    this.Shopping.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.ShoppingInfo);
                    //自费
                    this.OwnExpense.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.ExpenseItem);
                    //备注
                    this.Remark.Text = Utils.TextToHtml(RoutePrintModel.ServiceStandard.Notes);
                }
                #endregion

                #region 银行信息公司账户
                this.CompanyAcount.Text = RoutePrintModel.CompanyAccount;
                //个人账户
                this.PersonerAcount.Text = GetPersonAccount(RoutePrintModel.PersonalAccount);
                // 支付宝
                this.Alipay.Text = RoutePrintModel.AlipayAccount;
                #endregion
            }
        }