コード例 #1
0
        protected void LoadRouteOrder(string tourId)
        {
            tourModel = tourBll.GetTourInfo(tourId);

            if (tourModel != null)
            {
                //是否隐藏下订单按钮
                if (tourBll.IsDeleted(tourId))
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队不存在!');if(window.parent.Boxy.getIframeDialog){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>");
                    return;
                }
                if (tourModel.TourState == EyouSoft.Model.TourStructure.TourState.收客 && tourModel.RemnantNumber > 0)
                {
                    ro_SaveOrder.Visible = true;
                }
                else if (tourModel.TourState != EyouSoft.Model.TourStructure.TourState.收客)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队已停收!');</script>");
                }
                else if (tourModel.RemnantNumber == 0)
                {
                    Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队人数已满!');</script>");
                }
                parentId = tourModel.ParentTourID;//获取模板团编号
            }
            else
            {
                Page.ClientScript.RegisterClientScriptBlock(this.GetType(), Guid.NewGuid().ToString(), "<script>;alert('该团队不存在!');if(window.parent.Boxy.getIframeDialog){window.parent.Boxy.getIframeDialog('" + Request.QueryString["iframeId"] + "').hide();}else{window.close();}</script>");
                return;
            }

            routeName = tourModel.RouteName;//线路名称
            startDate = tourModel.LeaveDate.ToString("yyyy-MM-dd");
            weekDay   = EyouSoft.Common.Utils.ConvertWeekDayToChinese(tourModel.LeaveDate);
            remain    = tourModel.RemnantNumber; //剩余人数

            company = tourModel.CompanyName;     //公司名称
            contant = tourModel.TourContact;     //团队负责人
            tel     = tourModel.TourContactTel;
            MQ      = tourModel.TourContacMQ;
            int cityId = tourModel.LeaveCity;//出港城市ID

            ro_traffic.Value = tourModel.LeaveTraffic;
            EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(cityId);
            if (cityModel != null)
            {
                leaveCity = cityModel.CityName;//获取出港城市名
            }
            //绑定报价类型   leaveCity
            EyouSoft.IBLL.SystemStructure.ISysCity cityBll = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            ro_rpt_priceList.DataSource = tourModel.TourPriceDetail;
            ro_rpt_priceList.DataBind();
        }
コード例 #2
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void InitPage()
 {
     BindingPriceCustomerLeaveDetail();
     #region 预订
     EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
     EyouSoft.Model.TourStructure.TourInfo Model = new EyouSoft.Model.TourStructure.TourInfo();
     Model = Ibll.GetTourInfo(TourID);
     if (Model != null)
     {
         FromCompanyID = Model.CompanyID;
         RouteName     = Model.RouteName;
         LeaveDate     = Model.LeaveDate.ToShortDateString();
         leaveDateDay  = Utils.ConvertWeekDayToChinese(Model.LeaveDate);
         RemnantNumber = Model.RealRemnantNumber;
         Traffic       = Model.LeaveTraffic;
         if (Model.ServiceStandard != null)
         {
             SpecialContent = Model.ServiceStandard.SpeciallyNotice;
         }
         int HasIn = Model.CollectAdultNumber + Model.CollectChildrenNumber;
         if (HasIn >= Model.PlanPeopleCount)
         {
             EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, "alert('实收人数已经等于或者大于实际计划人数!');closeWin()");
             Ibll  = null;
             Model = null;
             return;
         }
     }
     Ibll  = null;
     Model = null;
     #endregion
 }
コード例 #3
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            if (!string.IsNullOrEmpty(TourID))
            {
                EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
                EyouSoft.Model.TourStructure.TourInfo model = new EyouSoft.Model.TourStructure.TourInfo();
                model = Ibll.GetTourInfo(TourID);
                if (model != null)
                {
                    TemplateTourID     = model.ParentTourID;
                    RouteName          = model.RouteName;
                    RouteArea          = model.AreaId;
                    AreaName           = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance().GetSysAreaModel(model.AreaId).AreaName;
                    LeaveDate          = model.LeaveDate.ToShortDateString();
                    LeaveTime          = model.LeaveDate;
                    LeaveDateDayOfWeek = model.LeaveDate.DayOfWeek.ToString();
                    PeerAdultPrice     = string.Format("{0:F2}", model.TravelAdultPrice);
                    PeerChildrenPrice  = string.Format("{0:F2}", model.TravelChildrenPrice);

                    StoreAdultPrice    = string.Format("{0:F2}", model.RetailAdultPrice);
                    StoreChildrenPrice = string.Format("{0:F2}", model.RetailChildrenPrice);
                    RemnantNumber      = model.RemnantNumber;
                    #region 报价等级
                    List <EyouSoft.Model.TourStructure.TourPriceDetail> priceList = new List <EyouSoft.Model.TourStructure.TourPriceDetail>();
                    priceList = (List <EyouSoft.Model.TourStructure.TourPriceDetail>)model.TourPriceDetail;
                    AddTourAgain_tourpricestand.TourPriceDetails = model.TourPriceDetail;

                    IList <EyouSoft.Model.TourStructure.ChildrenTourInfo> list = Ibll.GetChildrenTours(TemplateTourID);
                    if (list != null && list.Count > 0)
                    {
                        DateTime[] TimeList = new DateTime[list.Count];
                        TimeList = (from c in list where true select c.LeaveDate).ToArray();
                        string[] TourCodeList = new string[list.Count];
                        TourCodeList = (from c in list where true select c.TourCode).ToArray();
                        IsoDateTimeConverter iso = new IsoDateTimeConverter();
                        iso.DateTimeFormat = "yyyy-M-d";
                        this.AddTourAgain_hidChildLeaveDateList.Value = JsonConvert.SerializeObject(TimeList, iso);
                        this.AddTourAgain_hidChildTourCodeList.Value  = JsonConvert.SerializeObject(TourCodeList);
                    }
                    priceList = null;
                    #endregion
                    if (model.ReleaseType == 0)
                    {
                        ltrAddNewPlan.Text = string.Format("<a href=\"{0}\" rel='TapAddTourAgain'>增加发布{1}计划</a>", "/routeagency/addstandardtour.aspx", model.AreaName);
                    }
                    else
                    {
                        ltrAddNewPlan.Text = string.Format("<a href=\"{0}\" rel='TapAddTourAgain'>增加发布{1}计划</a>", "/routeagency/addquicktour.aspx", model.AreaName);
                    }
                }
                Ibll  = null;
                model = null;
            }
        }
コード例 #4
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;
        }
コード例 #5
0
        protected void btnWordPrint_Click(object sender, EventArgs e)
        {
            string PrintTopHtml    = Request.Form["hidPrintTopHTML"];
            string PrintFooterHtml = Request.Form["hidPrintFooterHTML"];
            string PrintMiddleHtml = string.Empty;
            string saveFileName    = HttpUtility.UrlEncode("行程单.doc");

            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                this.TemplateTourID = model.ParentTourID;
                #region 价格等级信息
                IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TemplateTourID);
                List <UserBackCenter.RouteAgency.CompanyPriceDetail> newLists   = new List <UserBackCenter.RouteAgency.CompanyPriceDetail>();
                if (PriceLists != null && PriceLists.Count > 0)
                {
                    PrintMiddleHtml += "<table width=\"720\" border=\"0\" align=\"center\" cellspacing=\"1\" bgcolor=\"#FFFFFF\">";
                    ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item =>
                    {
                        ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem =>
                        {
                            switch (childItem.CustomerLevelType)
                            {
                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市:
                                PrintMiddleHtml += "<tr><td width=\"70\" align=\"left\" bgcolor=\"#eeeeee\">" + item.PriceStandName + ":</td>";
                                PrintMiddleHtml += "<td  bgcolor=\"#eeeeee\">成人价:<span class=\"bottow_side2\">" + childItem.AdultPrice.ToString("F2") + "</span>元/人";
                                PrintMiddleHtml += " <td  align=\"right\" bgcolor=\"#eeeeee\">儿童价: ";
                                PrintMiddleHtml += "<span class=\"bottow_side2\">" + childItem.ChildrenPrice.ToString("F2") + "</span>元/人</td>";
                                break;

                            case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                                PrintMiddleHtml += "<td align=\"right\" bgcolor=\"#eeeeee\">单房差:";
                                PrintMiddleHtml += "<span class=\"bottow_side2\">" + childItem.AdultPrice.ToString("F2") + "</span>元/人</td></tr>";
                                break;
                            }
                        });
                    });
                    newLists         = null;
                    PrintMiddleHtml += "</table>";
                }
                PriceLists = null;
                #endregion
            }
            model = null;
            Ibll  = null;
            Response.ClearContent();
            Response.AddHeader("content-disposition", string.Format("attachment;filename={0}", saveFileName));
            Response.ContentType     = "application/ms-word";
            Response.Charset         = "utf-8";
            Response.ContentEncoding = System.Text.Encoding.UTF8;

            string wordTemplate = @"
                <html>
                <head>
                    <title>打印预览</title>
                    <style type=""text/css"">
                    body {{color:#000000;font-size:12px;font-family:""宋体"";background:#fff; margin:0px;}}
                    img {{border: thin none;}}
                    table {{border-collapse:collapse;width:720px;}}                     
                    .headertitle {{font-family:""黑体""; font-size:25px; line-height:120%; font-weight:bold;}}
                    .bottow_side2{{background: #EEEEEE none repeat scroll 0 0;
                                border-color: -moz-use-text-color -moz-use-text-color #000000;
                                border-style: none none solid;
                                border-width: 0 0 1px;
                        }}
                    </style>
                </head>
                <body>
                    <div id=""divPrintPreview"">{0}{1}{2}</div>
                </body>
                </html>";

            Response.Write(string.Format(wordTemplate, PrintTopHtml, PrintMiddleHtml, PrintFooterHtml));
            Response.End();
        }
コード例 #6
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;
        }
コード例 #7
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;
        }
コード例 #8
0
        /// <summary>
        /// 修改初始化团队信息
        /// </summary>
        /// <param name="TourID"></param>
        private void InitTourInfo(string TourID)
        {
            EyouSoft.IBLL.TourStructure.ITour     bll   = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = bll.GetTourInfo(TourID);
            if (model != null)
            {
                if (!String.IsNullOrEmpty(Utils.GetQueryStringValue("type")) && Utils.GetQueryStringValue("type") == "edit")
                {
                    //初始化当前计划的模板团ID
                    templateTourId = model.ParentTourID;

                    this.spanSelectDate.Visible = false;

                    this.spanSetTourNo.Visible = false;

                    if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
                    {
                        this.TabAddStandardTour.Visible = false;
                        this.TabAddQuickTour.Visible    = true;
                    }
                    else
                    {
                        this.TabAddStandardTour.Visible = true;
                        this.TabAddQuickTour.Visible    = false;
                    }

                    if (model.ParentTourID.Trim() == string.Empty)
                    {
                        this.AddQuickTour_TemplateTourID.Value = TourID;
                        this.spanAlreadyDate.Visible           = true;
                        this.lblEditText.Text = "<a href=\"javascript:void(0);\" onclick=\"TourModule.OpenDateDialog('" + tblID + "');return false;\">点此查看</a> ";
                    }
                    else
                    {
                        this.AddQuickTour_hidTourID.Value = TourID;
                        this.spanAlreadyDate.Visible      = false;
                        this.lblEditText.Text             = model.LeaveDate.ToString("yyyy-MM-dd");
                    }

                    IList <EyouSoft.Model.TourStructure.ChildrenTourInfo> list = bll.GetChildrenTours(TourID);
                    if (list != null && list.Count > 0)
                    {
                        this.AddQuickTour_ChildTourCount.Text = list.Count.ToString();
                        DateTime[] TimeList = new DateTime[list.Count];
                        TimeList = (from c in list where true select c.LeaveDate).ToArray();
                        string[] TourCodeList = new string[list.Count];
                        TourCodeList = (from c in list where true select c.TourCode).ToArray();
                        IsoDateTimeConverter iso = new IsoDateTimeConverter();
                        iso.DateTimeFormat = "yyyy-M-d";
                        this.AddQuickTour_hidChildLeaveDateList.Value = JsonConvert.SerializeObject(TimeList, iso);
                        this.AddQuickTour_hidChildTourCodeList.Value  = JsonConvert.SerializeObject(TourCodeList);
                        this.hidTourLeaveDate.Value = JsonConvert.SerializeObject(TimeList, iso);
                    }
                    else
                    {
                        this.hidTourLeaveDate.Value = "0";
                    }
                }
                for (int i = 0; i < this.AddQuickTour_RouteArea.Items.Count; i++)
                {
                    if (!String.IsNullOrEmpty(this.AddQuickTour_RouteArea.Items[i].Value))
                    {
                        if (model.AreaId == int.Parse(this.AddQuickTour_RouteArea.Items[i].Value.Split('|')[0].ToString()))
                        {
                            this.AddQuickTour_RouteArea.Items[i].Selected = true;
                        }
                    }
                }
                this.AddQuickTour_RouteName.Value    = model.RouteName;
                this.AddQuickTour_TourDays.Value     = model.TourDays.ToString();
                this.AddQuickTour_PeopleNumber.Value = model.PlanPeopleCount.ToString();

                strRouteTheme = InitRouteTopic(model.RouteTheme);
                strSaleCity   = InitSaleCity(model.SaleCity);
                strLeaveCity  = InitLeaveCity(model.LeaveCity);

                // 报价等级
                this.AddQuickTour_tourpricestand.TourPriceDetails = model.TourPriceDetail;
                QuickPlan = model.QuickPlan;
                this.AddQuickTour_AutoOffDays.Value = model.AutoOffDays.ToString();
            }
            model = null;
            bll   = null;
        }
コード例 #9
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage()
        {
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                #region 获取所属公司信息
                if (this.IsLogin)
                {
                    CompanyID      = this.SiteUserInfo.CompanyID;
                    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
                {
                    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
                {
                    localInfo.Visible = false;
                }
                #endregion

                #region 团队相关信息
                TourDays  = model.TourDays;
                RouteName = model.RouteName;
                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.CollectionContect))
                    {
                        ltrCollectionContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.CollectionContect);
                    }
                    else
                    {
                        CollectionContect.Visible = false;
                    }
                    if (!string.IsNullOrEmpty(model.MeetTourContect))
                    {
                        ltrMeetTourContect.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.MeetTourContect);
                    }
                    else
                    {
                        MeetTourContect.Visible = false;
                    }

                    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); //其它
                    NotContainService   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.IncludeOtherContent); //其它说明
                    //备注
                    SpeciallyNotice = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);

                    rptTeamNotice.DataSource = model.StandardPlan;
                    rptTeamNotice.DataBind();
                }
                else//快速发布
                {
                    pnlQuickPlan.Visible      = true;
                    Tr_Traffic.Visible        = false;
                    CollectionContect.Visible = false;
                    MeetTourContect.Visible   = false;
                    pnlNotQuickPlan.Visible   = false;
                    QuickPlanContent          = model.QuickPlan;
                }
                #region 盖章信息
                //if(this.SiteUserInfo.CompanyID==model.se)
                if (!string.IsNullOrEmpty(OrderID))
                {
                    string BuyCompanyID = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance().GetOrderModel(OrderID).BuyCompanyID;
                    if (this.SiteUserInfo.CompanyID == BuyCompanyID)
                    {
                        string imgPath = EyouSoft.BLL.TourStructure.CompanyContractSignet.CreateInstance().GetGroupAdviceSignet(OrderID);
                        if (!string.IsNullOrEmpty(imgPath))
                        {
                            imgBuyCompany.Visible  = true;
                            imgBuyCompany.ImageUrl = Domain.FileSystem + imgPath;
                            btnCancelStamp.Visible = true;
                            btnToStamp.Visible     = false;
                        }
                    }
                    else
                    {
                        this.btnCancelStamp.Visible = false;
                        this.btnToStamp.Visible     = false;
                    }
                }
                else
                {//无订单号传入时,盖章隐藏
                    this.btnCancelStamp.Visible = false;
                    this.btnToStamp.Visible     = false;
                }
                //if (!this.CheckGrant(EyouSoft.Common.TravelPermission.系统设置_盖章) && this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                if (this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团))
                {
                    this.btnCancelStamp.Visible = false;
                    this.btnToStamp.Visible     = false;
                }
                #endregion
                #endregion
            }
            Ibll  = null;
            model = null;
        }
コード例 #10
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)
            {
                #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;
                ICompanyInfobll  = null;
                companyInfoModel = null;
                #endregion
                List <EyouSoft.Model.TourStructure.TourPriceDetail> priceList = new List <EyouSoft.Model.TourStructure.TourPriceDetail>();
                priceList = (List <EyouSoft.Model.TourStructure.TourPriceDetail>)model.TourPriceDetail;
                #region 团队报价等级处理
                //用于数据绑定
                List <CPriceDetail> BindPriceList = new List <CPriceDetail>();
                CPriceDetail        cModel        = null;
                //该团队的报价等级明细
                priceList.ForEach(delegate(EyouSoft.Model.TourStructure.TourPriceDetail item)
                {
                    cModel = new CPriceDetail();
                    cModel.PriceStandName = item.PriceStandName;
                    ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>) item.PriceDetail).ForEach(delegate(EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail itemPriceLeave)
                    {
                        switch (itemPriceLeave.CustomerLevelType)
                        {
                        case EyouSoft.Model.CompanyStructure.CustomerLevelType.行:
                            cModel.AdultPrice    = itemPriceLeave.AdultPrice;
                            cModel.ChildrenPrice = itemPriceLeave.AdultPrice;
                            break;

                        case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差:
                            cModel.SingleRoom = itemPriceLeave.ChildrenPrice;
                            break;
                        }
                        ;
                    });
                    BindPriceList.Add(cModel);
                });
                BindPriceList = null;
                cModel        = null;
                this.rptTourPriceDetail.DataSource = BindPriceList;
                this.rptTourPriceDetail.DataBind();
                #endregion
                if (((int)model.ReleaseType) == 0)
                {
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                }
                else
                {
                    QuickPlanContent = model.QuickPlan;
                }
            }
            Ibll  = null;
            model = null;
        }
コード例 #11
0
        /// <summary>
        /// 提交发布
        /// </summary>
        private void Update()
        {
            string hidTourNo = Utils.GetFormValue("hidTourLeaveDate").Trim(',');

            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = new EyouSoft.Model.TourStructure.TourInfo();
            model = Ibll.GetTourInfo(TourID);;
            EyouSoft.IBLL.TourStructure.ITour TourBll = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            IList <EyouSoft.Model.TourStructure.ChildrenTourInfo> ChildrensTourList = new List <EyouSoft.Model.TourStructure.ChildrenTourInfo>();

            string[] tmpLeaveDate = hidTourNo.Split(',');
            if (string.IsNullOrEmpty(hidTourNo.Trim(',')))
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'请选择出团日期!'}]");
                Response.End();
            }
            PlanPeopleCount = Utils.GetInt(Utils.GetFormValue("VistorNum"));
            if (PlanPeopleCount <= 0)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'计划人数必须大于0!'}]");
                Response.End();
            }
            DateTime[] LeaveDate = new DateTime[tmpLeaveDate.Length];

            if (!String.IsNullOrEmpty(hidTourNo))
            {
                for (int i = 0; i < tmpLeaveDate.Length; i++)
                {
                    LeaveDate[i] = Utils.GetDateTime(tmpLeaveDate[i]);
                }
            }
            //IList<EyouSoft.Model.TourStructure.TourPriceDetail> InputLists = InsertTourPriceDetail();

            if (model != null)
            {
                RouteArea = model.AreaId;
                #region 子团信息

                IList <EyouSoft.Model.TourStructure.AutoTourCodeInfo> TourCodeList = new List <EyouSoft.Model.TourStructure.AutoTourCodeInfo>();

                foreach (DateTime LeaveDateItem in LeaveDate)
                {
                    EyouSoft.Model.TourStructure.ChildrenTourInfo ChildTour = new EyouSoft.Model.TourStructure.ChildrenTourInfo();
                    ChildTour.TourCode   = "";
                    ChildTour.ChildrenId = "";
                    ChildTour.LeaveDate  = LeaveDateItem;
                    ChildrensTourList.Add(ChildTour);
                    ChildTour = null;
                }
                #endregion
                model.PlanPeopleCount = PlanPeopleCount;
                model.TourPriceDetail = InsertTourPriceDetail();
                model.Childrens       = ChildrensTourList;
                model.ID          = model.ParentTourID;
                model.CompanyID   = SiteUserInfo.CompanyID;
                model.CompanyName = SiteUserInfo.CompanyName;
                int RowEffect = Ibll.AppendTemplateTourInfo(model);
                LeaveDate         = null;
                model             = null;
                Ibll              = null;
                TourBll           = null;
                ChildrensTourList = null;
                if (RowEffect > 0)
                {
                    Response.Clear();
                    Response.Write("[{isSuccess:true,ErrorMessage:'发布成功!'}]");
                    Response.End();
                }
                else
                {
                    Response.Clear();
                    Response.Write("[{isSuccess:false,ErrorMessage:'发布失败!'}]");
                    Response.End();
                }
            }
        }
コード例 #12
0
        /// <summary>
        /// 代客预订
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LeaveBook()
        {
            if (!IsCompanyCheck)
            {
                Response.Clear();
                Response.Write("[{isSuccess:false,ErrorMessage:'对不起,你当前登录的账户还未审核,没有权限执行该操作!'}]");
                Response.End();
            }
            string ReturnString = string.Empty;

            EyouSoft.IBLL.TourStructure.ITour     Ibll      = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo tourModel = new EyouSoft.Model.TourStructure.TourInfo();
            tourModel    = Ibll.GetTourInfo(TourID);
            PriceStandId = Utils.GetFormValue("hidPriceStandId");
            EyouSoft.IBLL.TourStructure.ITourOrder Orderbll   = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.Model.TourStructure.TourOrder();
            if (Utils.GetQueryStringValue("action") == "LeaveBook")
            {
                orderModel.OrderState   = EyouSoft.Model.TourStructure.OrderState.已留位;
                orderModel.SaveSeatDate = Utils.GetDateTime(Utils.GetFormValue("txtEndTime$dateTextBox"));
                if (Utils.GetDateTime(Utils.GetFormValue("txtEndTime$dateTextBox")) < DateTime.Now)
                {
                    Response.Clear();
                    Response.Write("[{isSuccess:false,ErrorMessage:'留位时间不能小于当前时间!'}]");
                    Response.End();
                }
            }
            else
            {
                orderModel.SaveSeatDate = DateTime.Now;
                orderModel.OrderState   = EyouSoft.Model.TourStructure.OrderState.未处理;
            }
            orderModel.AreaId            = tourModel.AreaId;
            orderModel.SeatList          = SeatList.Trim(',');
            orderModel.LeaveTraffic      = Utils.GetFormValue("Traffic");
            orderModel.AdultNumber       = Utils.GetInt(Utils.GetFormValue(PriceStandId + "AdultNumber"));
            orderModel.ChildNumber       = Utils.GetInt(Utils.GetFormValue(PriceStandId + "ChildNumber"));
            orderModel.ChildPrice        = decimal.Parse(Utils.GetFormValue(PriceStandId + "ChildrenPrice1"));
            orderModel.MarketPrice       = Utils.GetDecimal(Utils.GetFormValue(PriceStandId + "MarketPrice"));
            orderModel.BuyCompanyID      = Utils.GetFormValue("BuyCompanyID");
            orderModel.BuyCompanyName    = Utils.GetFormValue("BuyCompanyName");
            orderModel.CompanyID         = SiteUserInfo.CompanyID;
            orderModel.ContactFax        = Utils.GetFormValue("BuyCompanyFax");
            orderModel.ContactMQ         = Utils.GetFormValue("BuyCompanyMQ");
            orderModel.ContactName       = Utils.GetFormValue("BuyCompanyContactName");
            orderModel.ContactQQ         = Utils.GetFormValue("BuyCompanyQQ");
            orderModel.ContactTel        = Utils.GetFormValue("BuyCompanyTel");
            orderModel.LastOperatorID    = SiteUserInfo.ID;
            orderModel.MarketNumber      = Utils.GetInt(Utils.GetFormValue(PriceStandId + "MarketNumber"));
            orderModel.OperatorID        = SiteUserInfo.ID;
            orderModel.OperatorName      = SiteUserInfo.ContactInfo.ContactName;
            orderModel.OrderType         = 1;
            orderModel.OtherPrice        = Utils.GetDecimal(Utils.GetFormValue(PriceStandId + "OtherPrice"));
            orderModel.PersonalPrice     = Utils.GetDecimal(Utils.GetFormValue(PriceStandId + "PersonalPrice"));
            orderModel.SumPrice          = orderModel.AdultNumber * orderModel.PersonalPrice + orderModel.ChildNumber * orderModel.ChildPrice + orderModel.MarketNumber * orderModel.MarketPrice + orderModel.OtherPrice;
            orderModel.PeopleNumber      = orderModel.ChildNumber + orderModel.AdultNumber;
            orderModel.PriceStandId      = PriceStandId;
            orderModel.RouteName         = Utils.GetFormValue("RouteName");
            orderModel.LeaveDate         = Utils.GetDateTime(Utils.GetFormValue("LeaveDate"));
            orderModel.SpecialContent    = Utils.GetFormValue("SpecialContent");
            orderModel.TourCompanyId     = SiteUserInfo.CompanyID;
            orderModel.TourCompanyName   = SiteUserInfo.CompanyName;
            orderModel.TourDays          = tourModel.TourDays;
            orderModel.TourId            = Utils.GetFormValue("TourId");
            orderModel.TourNo            = tourModel.TourNo;
            orderModel.TourType          = EyouSoft.Model.TourStructure.TourType.组团散拼;
            orderModel.IssueTime         = DateTime.Now;
            orderModel.OrderSource       = EyouSoft.Model.TourStructure.TourOrderOperateType.代客预定;
            orderModel.TourOrderCustomer = TourOrderCustomer();
            if (orderModel.TourOrderCustomer == null || orderModel.TourOrderCustomer.Count == 0)
            {
                ReturnString = "[{isSuccess:false,ErrorMessage:'游客总人数必须大于0,否则将不能保存,请填写正确的游客人数及信息!'}]";
                Response.Clear();
                Response.Write(ReturnString);
                Response.End();
            }
            if (orderModel.PeopleNumber > Utils.GetInt(Utils.GetFormValue("RemnantNumber")))
            {
                ReturnString = "[{isSuccess:false,ErrorMessage:'游客总人数大于剩余人数,不能保存请重新填写游客资料!'}]";
                Response.Clear();
                Response.Write(ReturnString);
                Response.End();
            }
            int ReturnValue = Orderbll.AddTourOrder(orderModel);

            Ibll       = null;
            tourModel  = null;
            Orderbll   = null;
            orderModel = null;
            switch (ReturnValue)
            {
            case -1:
                ReturnString = "[{isSuccess:false,ErrorMessage:'写入订单信息失败!'}]";
                break;

            case 0:
                ReturnString = "[{isSuccess:false,ErrorMessage:'订单实体为空!'}]";
                break;

            default:
                ReturnString = "[{isSuccess:true,ErrorMessage:'订单代客预订成功!'}]";
                break;
            }
            Response.Clear();
            Response.Write(ReturnString);
            Response.End();
        }
コード例 #13
0
        /// <summary>
        /// 初始化
        /// </summary>
        private void InitPage(bool isShow)
        {
            #region 根据订单号获取相关信息
            //EyouSoft.Model.TourStructure.TourOrder
            EyouSoft.IBLL.TourStructure.ITourOrder IOrderbll  = EyouSoft.BLL.TourStructure.TourOrder.CreateInstance();
            EyouSoft.Model.TourStructure.TourOrder OrderModel = IOrderbll.GetOrderModel(OrderID);
            if (OrderModel != null)
            {
                BuyCompanyID  = OrderModel.BuyCompanyID;
                SellCompanyID = OrderModel.CompanyID;
                RouteName     = OrderModel.RouteName;

                if (!string.IsNullOrEmpty(OrderModel.LeaveTraffic))
                {
                    ltrTraffic.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(OrderModel.LeaveTraffic);
                }
                else
                {
                    Tr_Traffic.Visible = false;
                }

                ComfirmTime        = DateTime.Now.ToShortDateString();
                AdultPrice         = OrderModel.PersonalPrice.ToString("F2");
                this.ChildrenPrice = OrderModel.ChildPrice.ToString("F2");
                SumPrice           = OrderModel.SumPrice.ToString("F2");
                AdultNum           = OrderModel.AdultNumber;
                ChildrenNum        = OrderModel.ChildNumber;
            }
            else
            {
                return;
            }
            #endregion

            #region 游客信息
            if (OrderModel.TourOrderCustomer != null && OrderModel.TourOrderCustomer.Count > 0)
            {
                IList <EyouSoft.Model.TourStructure.TourOrderCustomer> OrderCustomerList = OrderModel.TourOrderCustomer;
                this.rptCustomers.DataSource = OrderCustomerList;
                this.rptCustomers.DataBind();
                if (rptCustomers.Items.Count < 1)
                {
                    this.tblCustomers.Visible = false;
                }
            }
            #endregion

            #region 专线公司信息
            EyouSoft.Model.CompanyStructure.CompanyInfo SellCompany = new EyouSoft.Model.CompanyStructure.CompanyInfo();
            SellCompany = this.GetCompanyInfo(SellCompanyID);
            if (SellCompany != null)
            {
                txtSellCompanyName.Value = SellCompany.CompanyName;
                txtSellConnectName.Value = SellCompany.ContactInfo.ContactName;
                txtSellConnectFax.Value  = SellCompany.ContactInfo.Fax;
                txtSellConnectTel.Value  = SellCompany.ContactInfo.Tel;
            }
            #endregion

            #region 组团公司信息
            EyouSoft.Model.CompanyStructure.CompanyInfo BuyCompany = new EyouSoft.Model.CompanyStructure.CompanyInfo();
            BuyCompany = this.GetCompanyInfo(BuyCompanyID);
            if (BuyCompany != null)
            {
                txtBuyCompanyName.Value = BuyCompany.CompanyName;
                txtBuyConnectName.Value = BuyCompany.ContactInfo.ContactName;
                txtBuyConnectFax.Value  = BuyCompany.ContactInfo.Fax;
                txtBuyConnectTel.Value  = BuyCompany.ContactInfo.Tel;
            }
            #endregion

            if (this.IsLogin)
            {
                CompanyID = this.SiteUserInfo.CompanyID;
                ltrSellCompanyName.Text = this.SiteUserInfo.CompanyName;
            }

            #region 银行帐号信息
            EyouSoft.IBLL.CompanyStructure.IBankAccount         IbankBll = EyouSoft.BLL.CompanyStructure.BankAccount.CreateInstance();
            IList <EyouSoft.Model.CompanyStructure.BankAccount> bankList = IbankBll.GetList(SellCompanyID);
            if (bankList != null && bankList.Count > 0)
            {
                EyouSoft.Model.CompanyStructure.BankAccount CompanyBankAccount = bankList.FirstOrDefault(BankItem =>
                {
                    return(BankItem.AccountType == EyouSoft.Model.CompanyStructure.BankAccountType.公司);
                });
                if (CompanyBankAccount != null)
                {
                    ltrSellCompanyName.Text    = CompanyBankAccount.BankAccountName;
                    ltrBuyComapnyBankName.Text = CompanyBankAccount.BankName;
                    ltrBuyComapnyBankNo.Text   = CompanyBankAccount.AccountNumber;
                }

                rptBankAccount.DataSource = ((List <EyouSoft.Model.CompanyStructure.BankAccount>)bankList).FindAll(BankItem =>
                {
                    return(BankItem.AccountType == EyouSoft.Model.CompanyStructure.BankAccountType.个人);
                });
                rptBankAccount.DataBind();
                IbankBll           = null;
                bankList           = null;
                CompanyBankAccount = null;
            }
            #endregion

            #region 团队信息
            EyouSoft.IBLL.TourStructure.ITour     Ibll  = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            EyouSoft.Model.TourStructure.TourInfo model = Ibll.GetTourInfo(TourID);
            if (model != null)
            {
                RouteName = model.RouteName;
                TourDays  = model.TourDays;
                LeaveDate = model.LeaveDate;
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Standard)//标准发布
                {
                    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;
                    }
                    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); //其它
                    NotContainService   = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.NotContainService);   //其它说明
                    //备注
                    SpeciallyNotice = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard.SpeciallyNotice);
                    //行程信息
                    rptStandardPlan.DataSource = model.StandardPlan;
                    rptStandardPlan.DataBind();
                }
                else//快速发布
                {
                    tr_MeetTourContect.Visible   = false;
                    tr_CollectionContect.Visible = false;
                    pnlQuickPlan.Visible         = true;
                    pnlNotQuickPlan.Visible      = false;
                    QuickPlanContent             = model.QuickPlan;
                }
            }
            Ibll       = null;
            model      = null;
            IOrderbll  = null;
            OrderModel = null;
            #endregion

            #region 公司盖章信息
            if (!string.IsNullOrEmpty(OrderID))
            {
                //判断是否属于该订单的专线商或组团社
                if (this.SiteUserInfo.CompanyID == BuyCompanyID || this.SiteUserInfo.CompanyID == SellCompanyID)
                {
                    string[] imgPath = EyouSoft.BLL.TourStructure.CompanyContractSignet.CreateInstance().GetConfirmationSignet(OrderID);
                    if (imgPath.Length > 0)
                    {
                        imgBuyCompany.ImageUrl = Domain.FileSystem + imgPath[0];
                        if (!string.IsNullOrEmpty(imgPath[0]))
                        {
                            imgBuyCompany.Visible = true;
                        }
                        if (!string.IsNullOrEmpty(imgPath[0]) && isTourCompany)
                        {
                            this.btnCancelStamp.Visible = true;
                            this.btnToStamp.Visible     = false;
                        }
                        if (imgPath.Length > 1)
                        {
                            imgSellCompany.ImageUrl = Domain.FileSystem + imgPath[1];
                            if (!string.IsNullOrEmpty(imgPath[1]))
                            {
                                imgSellCompany.Visible = true;
                            }
                            if (!string.IsNullOrEmpty(imgPath[1]) && !isTourCompany)
                            {
                                this.btnCancelStamp.Visible = true;
                                this.btnToStamp.Visible     = false;
                            }
                        }
                    }
                }
                else
                {
                    this.btnCancelStamp.Visible = false;
                    this.btnToStamp.Visible     = false;
                }
            }
            else
            {
                this.btnCancelStamp.Visible = false;
                this.btnToStamp.Visible     = false;
            }
            //if (!this.CheckGrant(EyouSoft.Common.TravelPermission.系统设置_盖章))
            //{
            this.btnCancelStamp.Visible = false;
            this.btnToStamp.Visible     = false;
            //}
            if (!isShow)
            {
                imgSellCompany.Visible = false;
                imgBuyCompany.Visible  = false;
            }
            #endregion
            IOrderbll   = null;
            OrderModel  = null;
            SellCompany = null;
            BuyCompany  = null;
        }