Пример #1
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                TemplateTourID = model.ParentTourID;
                #region 获取所属公司信息
                EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                CompanyName      = companyInfoModel.CompanyName;
                CompanyAddress   = companyInfoModel.CompanyAddress;
                License          = companyInfoModel.License;
                TourContactFax   = companyInfoModel.ContactInfo.Fax;
                ICompanyInfobll  = null;
                companyInfoModel = null;
                #endregion

                #region 获取地接社信息
                if (model.LocalTravelAgency != null && model.LocalTravelAgency.Count > 0)
                {
                    //EyouSoft.Model.TourStructure.TourLocalityInfo localMode = ((List<EyouSoft.Model.TourStructure.TourLocalityInfo>)model.LocalTravelAgency).First(LocalAgency =>
                    //{
                    //    return LocalAgency.TourId == TourID;
                    //});
                    //if (localMode != null)
                    //{
                    ltrLocalCompanyName.Text = model.LocalTravelAgency[0].LocalCompanyName;
                    ltrLicenseNumber.Text    = model.LocalTravelAgency[0].LicenseNumber;
                    //}
                }
                #endregion

                #region 价格等级信息
                IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TemplateTourID);
                List <UserBackCenter.RouteAgency.CompanyPriceDetail> newLists   = new List <UserBackCenter.RouteAgency.CompanyPriceDetail>();
                UserBackCenter.RouteAgency.CompanyPriceDetail        cpModel    = null;
                if (PriceLists != null && PriceLists.Count > 0)
                {
                    ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item =>
                    {
                        cpModel = new UserBackCenter.RouteAgency.CompanyPriceDetail();
                        cpModel.PriceStandName = item.PriceStandName;
                        ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem =>
                        {
                            switch (childItem.CustomerLevelType)
                            {
                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.行:
                                cpModel.AdultPrice1    = childItem.AdultPrice;
                                cpModel.ChildrenPrice1 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市:
                                cpModel.AdultPrice2    = childItem.AdultPrice;
                                cpModel.ChildrenPrice2 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                                cpModel.SingleRoom1 = childItem.AdultPrice;
                                cpModel.SingleRoom2 = childItem.ChildrenPrice;
                                break;
                            }
                        });
                        newLists.Add(cpModel);
                        cpModel = null;
                    });
                    this.rptTourPriceDetail.DataSource = newLists;
                    this.rptTourPriceDetail.DataBind();
                    newLists = null;
                }
                PriceLists = null;
                #endregion

                #region 团队相关信息
                RouteName = model.RouteName;
                LeaveDate = model.LeaveDate;
                BackDate  = model.ComeBackDate;
                TourDays  = model.TourDays;
                TourCode  = model.TourNo;
                if (((int)model.ReleaseType) == 0)//标注发布
                {
                    ltrTraffic.Text           = model.LeaveTraffic;
                    ltrMeetTourContect.Text   = model.MeetTourContect;
                    ltrCollectionContect.Text = model.CollectionContect;
                    //行程信息及相关
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                    //服务标准及说明
                    List <EyouSoft.Model.TourStructure.ServiceStandard> serviceList = new List <EyouSoft.Model.TourStructure.ServiceStandard>();
                    if (model.ServiceStandard != null)
                    {
                        serviceList.Add(model.ServiceStandard);
                        this.rptServiceStandard.DataSource = serviceList;
                        this.rptServiceStandard.DataBind();
                    }
                }
                else//快速发布
                {
                    pnlServiceStandard.Visible   = false;
                    Tr_CollectionContect.Visible = false;

                    Tr_Traffic.Visible = false;
                    QuickPlanContent   = model.QuickPlan;
                }
                #endregion
            }
            Ibll  = null;
            model = null;
        }
Пример #2
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                TemplateTourID = model.ParentTourID;
                #region 获取所属公司信息
                if (this.IsLogin)
                {
                    TourContactTel = this.SiteUserInfo.ContactInfo.Tel;
                    TourContact    = this.SiteUserInfo.ContactInfo.ContactName;
                    EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(this.SiteUserInfo.CompanyID);
                    CompanyName      = companyInfoModel.CompanyName;
                    CompanyAddress   = companyInfoModel.CompanyAddress;
                    License          = companyInfoModel.License;
                    ICompanyInfobll  = null;
                    companyInfoModel = null;
                }
                else
                {
                    tbl_Header.Visible = false;
                    //EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    //EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                    //CompanyName = companyInfoModel.CompanyName;
                    //CompanyAddress = companyInfoModel.CompanyAddress;
                    //License = companyInfoModel.License;
                    //TourContactTel = companyInfoModel.ContactInfo.Tel;
                    //TourContact = companyInfoModel.ContactInfo.ContactName;
                    //ICompanyInfobll = null;
                    //companyInfoModel = null;
                }
                #endregion

                #region 获取地接社信息
                if (model.LocalTravelAgency != null && model.LocalTravelAgency.Count > 0)
                {
                    rptTourLocalityInfo.DataSource = model.LocalTravelAgency;
                    rptTourLocalityInfo.DataBind();
                }
                else
                {
                    HasLocalCompanyInfo = false;
                }

                #endregion

                #region 价格等级信息
                IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TemplateTourID);
                List <UserBackCenter.RouteAgency.CompanyPriceDetail> newLists   = new List <UserBackCenter.RouteAgency.CompanyPriceDetail>();
                UserBackCenter.RouteAgency.CompanyPriceDetail        cpModel    = null;
                if (PriceLists != null && PriceLists.Count > 0)
                {
                    ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item =>
                    {
                        cpModel = new UserBackCenter.RouteAgency.CompanyPriceDetail();
                        cpModel.PriceStandName = item.PriceStandName;
                        ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem =>
                        {
                            switch (childItem.CustomerLevelType)
                            {
                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.行:
                                cpModel.AdultPrice1    = childItem.AdultPrice;
                                cpModel.ChildrenPrice1 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市:
                                cpModel.AdultPrice2    = childItem.AdultPrice;
                                cpModel.ChildrenPrice2 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                                cpModel.SingleRoom1 = childItem.AdultPrice;
                                cpModel.SingleRoom2 = childItem.ChildrenPrice;
                                break;
                            }
                        });
                        newLists.Add(cpModel);
                        cpModel = null;
                    });
                    this.rptTourPriceDetail.DataSource = newLists;
                    this.rptTourPriceDetail.DataBind();
                    newLists = null;
                }
                PriceLists = null;
                #endregion

                #region 团队相关信息
                RouteName = model.RouteName;
                LeaveDate = model.LeaveDate;
                BackDate  = model.ComeBackDate;
                TourDays  = model.TourDays;
                TourCode  = model.TourNo;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    Traffic           = EyouSoft.Common.Function.StringValidate.TextToHtml(model.LeaveTraffic.Trim());
                    MeetTourContect   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect.Trim());
                    CollectionContect = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect.Trim());
                    //行程信息及相关
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                    //服务标准及说明
                    List <EyouSoft.Model.TourStructure.ServiceStandard> serviceList = new List <EyouSoft.Model.TourStructure.ServiceStandard>();
                    if (model.ServiceStandard != null)
                    {
                        serviceList.Add(model.ServiceStandard);
                        NotContainService = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);
                        SpeciallyNotice   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                        this.rptServiceStandard.DataSource = serviceList;
                        this.rptServiceStandard.DataBind();
                    }
                }
                else//快速发布
                {
                    isStadardType        = false;
                    pnlQuickPlan.Visible = true;
                    QuickPlanContent     = model.QuickPlan;
                }
                #endregion
            }
            Ibll  = null;
            model = null;
        }
Пример #3
0
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                TemplateTourID = model.ParentTourID;
                #region 新增浏览记录
                string currentCompanyId = string.Empty;
                if (this.IsLogin)
                {
                    currentCompanyId = SiteUserInfo.CompanyID;
                }
                if (model.CompanyID != currentCompanyId && !string.IsNullOrEmpty(currentCompanyId))
                {
                    EyouSoft.Model.TourStructure.TourVisitInfo TourModel = new EyouSoft.Model.TourStructure.TourVisitInfo();
                    TourModel.TourId             = TourID;
                    TourModel.VisitedCompanyId   = model.CompanyID;
                    TourModel.VisitedCompanyName = model.CompanyName;
                    TourModel.VisitedTime        = DateTime.Today;
                    TourModel.VisitTourCode      = model.TourNo;
                    TourModel.VisitTourRouteName = model.RouteName;
                    if (IsLogin)
                    {
                        TourModel.ClientCompanyId            = SiteUserInfo.CompanyID;
                        TourModel.ClientCompanyName          = SiteUserInfo.CompanyName;
                        TourModel.ClientUserContactMobile    = SiteUserInfo.ContactInfo.Mobile;
                        TourModel.ClientUserContactName      = SiteUserInfo.ContactInfo.ContactName;
                        TourModel.ClientUserContactTelephone = SiteUserInfo.ContactInfo.Tel;
                        TourModel.ClientUserId        = SiteUserInfo.ID;
                        TourModel.ClinetUserContactQQ = SiteUserInfo.ContactInfo.QQ;
                    }
                    else
                    {
                        TourModel.ClientCompanyId = "";
                    }
                    EyouSoft.BLL.TourStructure.Tour.CreateInstance().InsertTourVisitedInfo(TourModel);
                    TourModel = null;
                }
                else if (!IsLogin)
                {
                    EyouSoft.BLL.TourStructure.Tour.CreateInstance().IncreaseClicks(TourID);
                }
                #endregion

                #region 获取所属公司信息
                if (this.IsLogin)
                {
                    TourContactTel = this.SiteUserInfo.ContactInfo.Tel;
                    TourContact    = this.SiteUserInfo.ContactInfo.ContactName;
                    EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll  = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(this.SiteUserInfo.CompanyID);
                    CompanyName      = companyInfoModel.CompanyName;
                    CompanyAddress   = companyInfoModel.CompanyAddress;
                    License          = companyInfoModel.License;
                    ICompanyInfobll  = null;
                    companyInfoModel = null;
                }
                else
                {
                    tbl_Header.Visible = false;
                    //EyouSoft.IBLL.CompanyStructure.ICompanyInfo ICompanyInfobll = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance();
                    //EyouSoft.Model.CompanyStructure.CompanyInfo companyInfoModel = ICompanyInfobll.GetModel(model.CompanyID);
                    //CompanyName = companyInfoModel.CompanyName;
                    //CompanyAddress = companyInfoModel.CompanyAddress;
                    //License = companyInfoModel.License;
                    //TourContactTel = companyInfoModel.ContactInfo.Tel;
                    //TourContact = companyInfoModel.ContactInfo.ContactName;
                    //ICompanyInfobll = null;
                    //companyInfoModel = null;
                }
                #endregion

                #region 获取地接社信息
                rptTourLocalityInfo.DataSource = model.LocalTravelAgency;
                rptTourLocalityInfo.DataBind();
                if (rptTourLocalityInfo.Items.Count < 1)
                {
                    isNotLocalCompany = false;
                }
                #endregion

                #region 价格等级信息
                IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TemplateTourID);
                List <UserBackCenter.RouteAgency.CompanyPriceDetail> newLists   = new List <UserBackCenter.RouteAgency.CompanyPriceDetail>();
                UserBackCenter.RouteAgency.CompanyPriceDetail        cpModel    = null;
                if (PriceLists != null && PriceLists.Count > 0)
                {
                    ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item =>
                    {
                        cpModel = new UserBackCenter.RouteAgency.CompanyPriceDetail();
                        cpModel.PriceStandName = item.PriceStandName;
                        ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem =>
                        {
                            switch (childItem.CustomerLevelType)
                            {
                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.行:
                                cpModel.AdultPrice1    = childItem.AdultPrice;
                                cpModel.ChildrenPrice1 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市:
                                cpModel.AdultPrice2    = childItem.AdultPrice;
                                cpModel.ChildrenPrice2 = childItem.ChildrenPrice;
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                                cpModel.SingleRoom1 = childItem.AdultPrice;
                                cpModel.SingleRoom2 = childItem.ChildrenPrice;
                                break;
                            }
                        });
                        newLists.Add(cpModel);
                        cpModel = null;
                    });
                    this.rptTourPriceDetail.DataSource = newLists;
                    this.rptTourPriceDetail.DataBind();
                    newLists = null;
                }
                PriceLists = null;
                #endregion

                #region 团队相关信息
                RouteName = model.RouteName;
                LeaveDate = model.LeaveDate;
                BackDate  = model.ComeBackDate;
                TourDays  = model.TourDays;
                TourCode  = model.TourNo;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    if (!string.IsNullOrEmpty(model.LeaveTraffic))
                    {
                        ltrTraffic.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.LeaveTraffic);
                    }
                    else
                    {
                        Tr_Traffic.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.MeetTourContect))
                    {
                        ltrMeetTourContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect);
                    }
                    else
                    {
                        Tr_MeetTourContect.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.CollectionContect))
                    {
                        ltrCollectionContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect);
                    }
                    else
                    {
                        Tr_CollectionContect.Visible = false;
                    }

                    //行程信息及相关
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                    //服务标准及说明
                    if (model.ServiceStandard != null)
                    {
                        ResideContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.ResideContent);       //住宿
                        DinnerContent       = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.DinnerContent);       //用餐
                        SightContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SightContent);        //景点
                        CarContent          = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.CarContent);          //用车
                        GuideContent        = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.GuideContent);        //导游
                        TrafficContent      = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.TrafficContent);      //往返交通
                        IncludeOtherContent = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.IncludeOtherContent); //其它
                        if (!string.IsNullOrEmpty(model.ServiceStandard.NotContainService))
                        {
                            NotContainService = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);
                        }
                        else
                        {
                            Tr_NotContainService.Visible = false;
                        }
                        if (!string.IsNullOrEmpty(model.ServiceStandard.SpeciallyNotice))
                        {
                            SpeciallyNotice = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                        }
                        else
                        {
                            Tr_SpeciallyNotice.Visible = false;
                        }
                    }
                }
                else//快速发布
                {
                    pnlServiceStandard.Visible   = false;
                    Tr_CollectionContect.Visible = false;
                    Tr_MeetTourContect.Visible   = false;
                    Tr_Traffic.Visible           = false;
                    QuickPlanContent             = model.QuickPlan;
                }
                #endregion
            }
            Ibll  = null;
            model = null;
        }