Esempio n. 1
0
        /// <summary>
        /// 返回经营范围
        /// </summary>
        /// <returns></returns>
        protected string GetRoundInfo()
        {
            StringBuilder str = new StringBuilder();

            EyouSoft.IBLL.SystemStructure.ISysArea areaBLL = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();

            return(str.ToString());
        }
Esempio n. 2
0
        /// <summary>
        /// 初始化线路区域
        /// </summary>
        private void InitRouteArea()
        {
            EyouSoft.IBLL.SystemStructure.ISysArea         bll  = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.SysArea> list = bll.GetSysAreaList(UserInfoModel.AreaId);

            if (list != null && list.Count > 0)
            {
                this.rptRouteArea.DataSource = list;
                this.rptRouteArea.DataBind();
            }
            list = null;
            bll  = null;
        }
Esempio n. 3
0
        /// <summary>
        /// 初始化线路区域
        /// </summary>
        private void InitRouteArea()
        {
            int[] AreaIds = { 0 };
            AreaIds[0] = Utils.GetInt(AreaId);
            EyouSoft.IBLL.SystemStructure.ISysArea         bll  = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.SysArea> list = bll.GetSysAreaList(AreaIds);

            if (list != null && list.Count > 0)
            {
                this.rptRouteArea.DataSource = list;
                this.rptRouteArea.DataBind();
            }
            list = null;
            bll  = null;
        }
Esempio n. 4
0
 private void InitRouteArea()
 {
     // 用户信息
     if (UserInfoModel != null)
     {
         EyouSoft.IBLL.SystemStructure.ISysArea         bll  = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
         IList <EyouSoft.Model.SystemStructure.SysArea> list = bll.GetSysAreaList(UserInfoModel.AreaId);
         if (list != null && list.Count > 0)
         {
             foreach (EyouSoft.Model.SystemStructure.SysArea model in list)
             {
                 this.AddQuickRoute_RouteArea.Items.Add(new ListItem(model.AreaName, model.AreaId.ToString()));
             }
         }
         list = null;
         bll  = null;
     }
 }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsLogin)//是否登录
            {
                EyouSoft.Security.Membership.UserProvider.RedirectLoginOpenTopPage("/Default.aspx");
                return;
            }
            //if (!CheckGrant(TravelPermission.客户管理_管理栏目))
            //{
            //    Utils.ResponseNoPermit();
            //    return;
            //}
            EyouSoft.Model.CompanyStructure.CompanyDetailInfo companyModel1 = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID);
            //是否开通收费MQ
            //if (!companyModel1.StateMore.CompanyService.IsServiceAvailable(EyouSoft.Model.CompanyStructure.SysService.MQ))
            //{
            //    Server.Transfer("/SystemSet/ApplyMQ.aspx?iscustomer=yes&urltype=tab", false);
            //    return;
            //}
            companyId = Utils.GetQueryStringValue("companyid");//专线商
            EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(companyId);
            companyName = companyModel.CompanyName;
            cer         = companyModel.License;
            admin       = companyModel.ContactInfo.ContactName;
            //获取当前页
            pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            EyouSoft.IBLL.TourStructure.ITour tourBll = EyouSoft.BLL.TourStructure.Tour.CreateInstance();
            areaBll = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
            //绑定产品列表
            IList <EyouSoft.Model.TourStructure.TourBasicInfo> tourInfoList = tourBll.GetNotStartingTours(pageSize, pageIndex, ref recordCount, companyId, null);

            if (tourInfoList != null && tourInfoList.Count > 0)
            {
                tl_rpt_TourList.DataSource = tourInfoList;
                tl_rpt_TourList.DataBind();
                BindPage();
            }
            else
            {
                tl_rpt_TourList.EmptyText    = "暂无团队信息";
                this.ExportPageInfo1.Visible = false;
            }
            tourInfoList = null;
        }
Esempio n. 6
0
        /// <summary>
        /// 初始化线路区域
        /// </summary>
        private void InitRouteArea()
        {
            int tmpAreaId = Utils.GetInt(Request.QueryString["AreaID"]);//当前选择的线路区域
            // 根据公司ID获取线路区域
            string ReturnVal = "<a " + (tmpAreaId <= 0?"style='color:red;'":string.Empty) + " href=\"" + Request.ServerVariables["SCRIPT_NAME"] + "?ReleaseType=" + tmpReleaseType + "&ContainerID=" + ContainerID + "\">所有专线</a>&nbsp;&nbsp;|&nbsp;&nbsp;";

            EyouSoft.IBLL.SystemStructure.ISysArea         bll  = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.SysArea> list = bll.GetSysAreaList(UserInfoModel.AreaId);

            if (list != null && list.Count > 0)
            {
                foreach (EyouSoft.Model.SystemStructure.SysArea model in list)
                {
                    ReturnVal += "<a " + (tmpAreaId == model.AreaId?"style='color:red;'":string.Empty) + "  href=\"" + Request.ServerVariables["SCRIPT_NAME"].ToString() + "?AreaID=" + model.AreaId.ToString() + "&ReleaseType=" + tmpReleaseType + "&ContainerID=" + ContainerID + "\">" + model.AreaName + "</a>&nbsp;&nbsp;|&nbsp;&nbsp;";
                }
            }
            list = null;
            bll  = null;
            this.lblRouteClass.Text = ReturnVal;
        }
Esempio n. 7
0
        /// <summary>
        /// 获取批发商行为分析列表
        /// </summary>
        /// <param name="PageSize">每页条数</param>
        /// <param name="PageIndex">当前页数</param>
        /// <param name="RecordCount">总记录数</param>
        /// <param name="OrderIndex">排序索引(0/1:登录时间升/降序;2/3:成交订单升/降序;4/5:留位订单升/降序;6/7:留位过期订单升/降序;8/9:不受理订单升/降序;10/11:登录次数升/降序;12/13:被查看次数升/降序;)</param>
        /// <param name="SellCompanyName">批发商名称(为null不作条件)</param>
        /// <param name="ManagerUserCityIds">管理员用户城市区域Id集合(为null或者空不作条件)</param>
        /// <param name="SellCityId">销售城市ID(小于等于0不作条件,且售城市ID小于等于0,那么区域ID不论为何值均不作条件)</param>
        /// <param name="AreaId">区域ID(小于等于0不作条件,且售城市ID小于等于0,那么区域ID不论为何值均不作条件)</param>
        /// <param name="StartTime">下单开始时间(为null不作条件)</param>
        /// <param name="EndTime">下单结束时间(为null不作条件)</param>
        /// <returns>返回批发商行为分析实体集合</returns>
        public IList <Model.TourStructure.WholesalersStatistics> GetWholesalersStatistics(int PageSize, int PageIndex
                                                                                          , ref int RecordCount, int OrderIndex, string SellCompanyName, int[] ManagerUserCityIds, int SellCityId, int AreaId
                                                                                          , DateTime?StartTime, DateTime?EndTime)
        {
            string strIds = string.Empty;

            if (ManagerUserCityIds != null && ManagerUserCityIds.Length > 0)
            {
                foreach (int i in ManagerUserCityIds)
                {
                    strIds += i.ToString() + ",";
                }
            }
            strIds = strIds.TrimEnd(',');

            var stats = dal.GetWholesalersStatistics(PageSize, PageIndex, ref RecordCount, OrderIndex, SellCompanyName, strIds, SellCityId, AreaId, StartTime, EndTime);

            #region 线路区域名称处理
            if (stats != null && stats.Count > 0)
            {
                EyouSoft.IBLL.SystemStructure.ISysArea sysAreaBLL = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
                foreach (var tmp in stats)
                {
                    if (tmp.AreaStatinfo != null && tmp.AreaStatinfo.Count > 0)
                    {
                        foreach (var tmp1 in tmp.AreaStatinfo)
                        {
                            EyouSoft.Model.SystemStructure.SysArea sysAreaInfo = sysAreaBLL.GetSysAreaModel(tmp1.AreaId);

                            if (sysAreaInfo != null)
                            {
                                tmp1.AreaName = sysAreaInfo.AreaName;
                            }
                        }
                    }
                }
            }
            #endregion

            return(stats);
        }
Esempio n. 8
0
        /// <summary>
        /// 添加线路信息
        /// </summary>
        /// <returns></returns>
        private bool InsertRouteInfo()
        {
            bool IsResult = false;
            // 线路基本信息
            string hidRouteID = Utils.GetFormValue(this.AddQuickRoute_hidRouteID.UniqueID);    // 用于判断是添加还是修改

            string RouteArea  = Utils.GetFormValue(this.AddQuickRoute_RouteArea.UniqueID);
            string RouteName  = Utils.GetFormValue(this.AddQuickRoute_RouteName.UniqueID);
            string TourDays   = Utils.GetFormValue(this.AddQuickRoute_TourDays.UniqueID);
            string LeaveCity  = Utils.GetFormValue("AddQuickRoute_radPortCity");
            string RouteTheme = Utils.GetFormValue("AddQuickRoute_chkRouteTopic");
            string SaleCity   = Utils.GetFormValue("AddQuickRoute_chkSaleCity");

            if (LeaveCity == null || LeaveCity == string.Empty)
            {
                LeaveCity = "0";
            }

            // 快速发布线路行程信息
            string QuickPlan = Utils.EditInputText(Server.UrlDecode(Request.Form["AddQuickRoute_divFCK"]));

            if (QuickPlan == string.Empty || QuickPlan == "点击添加行程信息")
            {
                QuickPlan = string.Empty;
            }

            #region 线路区域处理
            string AreaName = string.Empty;
            int    AreaID   = 0;
            EyouSoft.Model.SystemStructure.AreaType Areatype = EyouSoft.Model.SystemStructure.AreaType.国内短线;
            if (!String.IsNullOrEmpty(RouteArea) && StringValidate.IsInteger(RouteArea))
            {
                EyouSoft.IBLL.SystemStructure.ISysArea AreaBll   = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
                EyouSoft.Model.SystemStructure.SysArea AreaModel = AreaBll.GetSysAreaModel(int.Parse(RouteArea));
                if (AreaModel != null)
                {
                    AreaID   = AreaModel.AreaId;
                    AreaName = AreaModel.AreaName;
                    Areatype = AreaModel.RouteType;
                }
                AreaModel = null;
                AreaBll   = null;
            }
            #endregion

            #region 线路主题
            IList <int> RouteThemeList = new List <int>();
            if (!String.IsNullOrEmpty(RouteTheme))
            {
                string[] strRouteTopic = RouteTheme.Split(',');
                foreach (string str in strRouteTopic)
                {
                    RouteThemeList.Add(int.Parse(str));
                }
            }
            #endregion

            #region 销售城市
            IList <int> SaleCityList = new List <int>();
            if (!String.IsNullOrEmpty(SaleCity))
            {
                string[] strSaleCity = SaleCity.Split(',');
                foreach (string str in strSaleCity)
                {
                    SaleCityList.Add(int.Parse(str));
                }
            }
            #endregion

            // 写入线路信息
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = new EyouSoft.Model.TourStructure.RouteBasicInfo();
            model.AreaId          = AreaID;
            model.AreaType        = Areatype;
            model.CompanyID       = UserInfoModel.CompanyID;
            model.CompanyName     = UserInfoModel.CompanyName;
            model.ContactMQID     = ContactMQID;
            model.ContactName     = ContactName;
            model.ContactTel      = ContactTel;
            model.ContactUserName = UserInfoModel.UserName;
            model.IsAccept        = false;
            model.IssueTime       = DateTime.Now;
            model.LeaveCityId     = int.Parse(LeaveCity);
            model.OperatorID      = UserInfoModel.ID;
            model.PriceDetails    = InsertPriceDetail();
            model.QuickPlan       = QuickPlan;
            model.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Quick;
            model.RouteName       = RouteName;
            model.RouteTheme      = RouteThemeList;
            model.SaleCity        = SaleCityList;
            model.ServiceStandard = null;
            model.StandardPlans   = null;
            model.TourDays        = int.Parse(TourDays);

            if (!String.IsNullOrEmpty(hidRouteID))   // 修改
            {
                model.ID = hidRouteID;
                IsResult = bll.UpdateRouteInfo(model);
            }
            else
            {
                model.ID = Guid.NewGuid().ToString();
                IsResult = bll.InsertRouteInfo(model);
            }
            return(IsResult);
        }
Esempio n. 9
0
        /// <summary>
        /// 添加线路信息
        /// </summary>
        /// <returns></returns>
        private bool InsertRouteInfo()
        {
            bool   IsResult = false;
            string strErr   = string.Empty;
            // 线路基本信息
            string hidRouteID = Utils.GetFormValue(this.AddStandardRoute_hidRouteID.UniqueID);    // 用于判断是添加还是修改

            string RouteArea  = Utils.GetFormValue(this.AddStandardRoute_RouteArea.UniqueID);
            string RouteName  = Utils.GetFormValue(this.AddStandardRoute_RouteName.UniqueID);
            string TourDays   = Utils.GetFormValue(this.AddStandardRoute_txtTourDays.UniqueID);
            string RouteTopic = Utils.GetFormValue("AddStandardRoute_chkRouteTopic");
            string LeaveCity  = Utils.GetFormValue("AddStandardRoute_radPortCity");
            string SaleCity   = Utils.GetFormValue("AddStandardRoute_chkSaleCity");
            string Service    = Utils.GetFormValue(this.AddStandardRoute_Service.UniqueID);
            string Remark     = Utils.GetFormValue(this.AddStandardRoute_Remark.UniqueID);

            // 标准发布线路行程信息
            string StandardPlan = Utils.GetFormValue(this.AddStandardRoute_Remark.UniqueID);

            // 服务标准
            string ResideContent       = Utils.GetFormValue("AddStandardRouteResideContent");
            string DinnerContent       = Utils.GetFormValue("AddStandardRouteDinnerContent");
            string SightContent        = Utils.GetFormValue("AddStandardRouteSightContent");
            string CarContent          = Utils.GetFormValue("AddStandardRouteCarContent");
            string GuideContent        = Utils.GetFormValue("AddStandardRouteGuideContent");
            string TrafficContent      = Utils.GetFormValue("AddStandardRouteTrafficContent");
            string IncludeOtherContent = Utils.GetFormValue("AddStandardRouteIncludeOtherContent");

            // 线路负责人
            string ContactName     = Utils.GetFormValue("AddStandardRoute_TourContact");
            string ContactTel      = Utils.GetFormValue("AddStandardRoute_TourContactTel");
            string ContactMQID     = Utils.GetFormValue("AddStandardRoute_TourContacMQ");
            string ContactUserName = Utils.GetFormValue("AddStandardRoute_TourContactUserName");

            if (LeaveCity == null || LeaveCity == string.Empty)
            {
                LeaveCity = "0";
            }
            #region 线路区域处理
            string AreaName = string.Empty;
            int    AreaID   = 0;
            EyouSoft.Model.SystemStructure.AreaType Areatype = EyouSoft.Model.SystemStructure.AreaType.国内短线;
            if (!String.IsNullOrEmpty(RouteArea) && StringValidate.IsInteger(RouteArea))
            {
                EyouSoft.IBLL.SystemStructure.ISysArea AreaBll   = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
                EyouSoft.Model.SystemStructure.SysArea AreaModel = AreaBll.GetSysAreaModel(int.Parse(RouteArea));
                if (AreaModel != null)
                {
                    AreaID   = AreaModel.AreaId;
                    AreaName = AreaModel.AreaName;
                    Areatype = AreaModel.RouteType;
                }
                AreaModel = null;
                AreaBll   = null;
            }
            #endregion

            #region 线路主题
            IList <int> RouteThemeList = new List <int>();
            if (!String.IsNullOrEmpty(RouteTopic))
            {
                string[] strRouteTopic = RouteTopic.Split(',');
                //string[] strRouteTopic = new string[] { "1","2","3"};
                foreach (string str in strRouteTopic)
                {
                    RouteThemeList.Add(int.Parse(str));
                }
            }
            #endregion

            #region 销售城市
            IList <int> SaleCityList = new List <int>();
            if (!String.IsNullOrEmpty(SaleCity))
            {
                string[] strSaleCity = SaleCity.Split(',');
                foreach (string str in strSaleCity)
                {
                    SaleCityList.Add(int.Parse(str));
                }
            }
            #endregion

            // 写入线路信息
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = new EyouSoft.Model.TourStructure.RouteBasicInfo();
            model.AreaId          = AreaID;
            model.AreaType        = Areatype;
            model.CompanyID       = UserInfoModel.CompanyID;
            model.CompanyName     = UserInfoModel.CompanyName;
            model.ContactMQID     = ContactMQID;
            model.ContactName     = ContactName;
            model.ContactTel      = ContactTel;
            model.ContactUserName = ContactUserName;
            model.IsAccept        = false;
            model.IssueTime       = DateTime.Now;
            model.LeaveCityId     = int.Parse(LeaveCity);
            model.OperatorID      = UserInfoModel.ID;
            model.PriceDetails    = InsertRoutePriceDetail();
            model.QuickPlan       = string.Empty;
            model.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Standard;
            model.RouteName       = RouteName;
            model.RouteTheme      = RouteThemeList;
            model.SaleCity        = SaleCityList;
            model.StandardPlans   = InsertRouteStandardPlan();
            model.TourDays        = int.Parse(TourDays);
            // 服务标准
            EyouSoft.Model.TourStructure.RouteServiceStandard RouteServiceModel = new EyouSoft.Model.TourStructure.RouteServiceStandard();
            if (!String.IsNullOrEmpty(ResideContent))
            {
                RouteServiceModel.ResideContent = ResideContent;
            }
            if (!String.IsNullOrEmpty(DinnerContent))
            {
                RouteServiceModel.DinnerContent = DinnerContent;
            }
            if (!String.IsNullOrEmpty(CarContent))
            {
                RouteServiceModel.CarContent = CarContent;
            }
            if (!String.IsNullOrEmpty(SightContent))
            {
                RouteServiceModel.SightContent = SightContent;
            }
            if (!String.IsNullOrEmpty(GuideContent))
            {
                RouteServiceModel.GuideContent = GuideContent;
            }
            if (!String.IsNullOrEmpty(TrafficContent))
            {
                RouteServiceModel.TrafficContent = TrafficContent;
            }
            if (!String.IsNullOrEmpty(IncludeOtherContent))
            {
                RouteServiceModel.IncludeOtherContent = IncludeOtherContent;
            }
            if (!String.IsNullOrEmpty(Service))
            {
                RouteServiceModel.NotContainService = Service;
            }
            if (!String.IsNullOrEmpty(Remark))
            {
                RouteServiceModel.SpeciallyNotice = Remark;
            }
            model.ServiceStandard = RouteServiceModel;

            if (!String.IsNullOrEmpty(hidRouteID))   // 修改
            {
                model.ID = hidRouteID;
                IsResult = bll.UpdateRouteInfo(model);
            }
            else
            {
                model.ID = Guid.NewGuid().ToString();
                IsResult = bll.InsertRouteInfo(model);
            }

            return(IsResult);
        }
Esempio n. 10
0
        /// <summary>
        /// 添加团队信息
        /// </summary>
        /// <returns></returns>
        private bool InsertTourInfo()
        {
            bool IsResult = false;
            // 团队基本信息
            string hidTourID        = Utils.GetFormValue(this.AddQuickTour_hidTourID.UniqueID);      // 用于判断是添加还是修改
            string TemplateTourID   = Utils.GetFormValue(this.AddQuickTour_TemplateTourID.UniqueID); // 需要修改的模板团ID
            string hidTourLeaveDate = Utils.GetFormValue(this.hidTourLeaveDate.UniqueID);

            string RouteArea    = Utils.GetFormValue(this.AddQuickTour_RouteArea.UniqueID);
            string RouteName    = Utils.GetFormValue(this.AddQuickTour_RouteName.UniqueID);
            string TourDays     = Utils.GetFormValue(this.AddQuickTour_TourDays.UniqueID);
            string PeopleNumber = Utils.GetFormValue(this.AddQuickTour_PeopleNumber.UniqueID);
            string RouteTopic   = Utils.GetFormValue("AddQuickTour_chkRouteTopic");
            string LeaveCity    = Utils.GetFormValue("AddQuickTour_radPortCity");
            string SaleCity     = Utils.GetFormValue("AddQuickTour_chkSaleCity");

            if (LeaveCity == null || LeaveCity == string.Empty)
            {
                LeaveCity = "0";
            }
            // 快速发布团队行程信息
            string QuickPlan = Utils.EditInputText(Server.UrlDecode(Request.Form["AddQuickTour_divFCK"]));

            if (QuickPlan == string.Empty || QuickPlan == "点击添加行程信息")
            {
                QuickPlan = string.Empty;
            }
            // 自动停收时间
            string AutoOffDays = Utils.GetFormValue(this.AddQuickTour_AutoOffDays.UniqueID);

            #region 线路区域处理
            string AreaName = string.Empty;
            int    AreaID   = 0;
            EyouSoft.Model.SystemStructure.AreaType Areatype = EyouSoft.Model.SystemStructure.AreaType.国内短线;
            if (!String.IsNullOrEmpty(RouteArea))
            {
                EyouSoft.IBLL.SystemStructure.ISysArea AreaBll   = EyouSoft.BLL.SystemStructure.SysArea.CreateInstance();
                EyouSoft.Model.SystemStructure.SysArea AreaModel = AreaBll.GetSysAreaModel(int.Parse(RouteArea.Split('|')[0]));
                if (AreaModel != null)
                {
                    AreaID   = AreaModel.AreaId;
                    AreaName = AreaModel.AreaName;
                    Areatype = AreaModel.RouteType;
                }
                AreaModel = null;
                AreaBll   = null;
            }
            #endregion

            #region 线路主题
            IList <int> RouteThemeList = new List <int>();
            if (!String.IsNullOrEmpty(RouteTopic))
            {
                string[] strRouteTopic = RouteTopic.Split(',');
                foreach (string str in strRouteTopic)
                {
                    RouteThemeList.Add(int.Parse(str));
                }
            }
            #endregion

            #region 销售城市
            IList <int> SaleCityList = new List <int>();
            if (!String.IsNullOrEmpty(SaleCity))
            {
                string[] strSaleCity = SaleCity.Split(',');
                foreach (string str in strSaleCity)
                {
                    SaleCityList.Add(int.Parse(str));
                }
            }
            #endregion

            if (this.AddQuickTour_AddToRoute.Checked)
            {
                #region 回写线路信息
                try
                {
                    EyouSoft.Model.TourStructure.RouteBasicInfo RouteModel = new EyouSoft.Model.TourStructure.RouteBasicInfo();
                    RouteModel.ID              = Guid.NewGuid().ToString();
                    RouteModel.AreaId          = AreaID;
                    RouteModel.AreaType        = Areatype;
                    RouteModel.CompanyID       = UserInfoModel.CompanyID;
                    RouteModel.CompanyName     = UserInfoModel.CompanyName;
                    RouteModel.ContactMQID     = ContactMQID;
                    RouteModel.ContactName     = ContactName;
                    RouteModel.ContactTel      = ContactTel;
                    RouteModel.ContactUserName = UserInfoModel.UserName;
                    RouteModel.IsAccept        = false;
                    RouteModel.IssueTime       = DateTime.Now;
                    RouteModel.LeaveCityId     = int.Parse(LeaveCity);
                    RouteModel.OperatorID      = UserInfoModel.ID;
                    RouteModel.PriceDetails    = InsertRoutePriceDetail();
                    RouteModel.QuickPlan       = QuickPlan;
                    RouteModel.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Quick;
                    RouteModel.RouteName       = RouteName;
                    RouteModel.RouteTheme      = RouteThemeList;
                    RouteModel.SaleCity        = SaleCityList;
                    RouteModel.ServiceStandard = null;
                    RouteModel.StandardPlans   = null;
                    RouteModel.TourDays        = int.Parse(TourDays);
                    EyouSoft.IBLL.TourStructure.IRouteBasicInfo RouteBll = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
                    RouteBll.InsertRouteInfo(RouteModel);
                    RouteModel = null;
                    RouteBll   = null;
                }
                catch
                {
                    return(false);
                }
                #endregion
            }
            EyouSoft.IBLL.TourStructure.ITour TourBll = EyouSoft.BLL.TourStructure.Tour.CreateInstance();

            #region 写入团队信息
            if (!String.IsNullOrEmpty(hidTourID) || !String.IsNullOrEmpty(TemplateTourID)) // 修改
            {
                if (!String.IsNullOrEmpty(TemplateTourID))                                 // 修改模板团
                {
                    EyouSoft.Model.TourStructure.TourInfo TourModel = new EyouSoft.Model.TourStructure.TourInfo();
                    TourModel.ID              = TemplateTourID;
                    TourModel.AreaId          = AreaID;
                    TourModel.AreaName        = AreaName;
                    TourModel.AreaType        = Areatype;
                    TourModel.AutoOffDays     = int.Parse(AutoOffDays);
                    TourModel.CompanyID       = CompanyId;
                    TourModel.CompanyName     = UserInfoModel.CompanyName;
                    TourModel.LeaveCity       = int.Parse(LeaveCity);
                    TourModel.OperatorID      = UserID;
                    TourModel.PlanPeopleCount = int.Parse(PeopleNumber);
                    TourModel.QuickPlan       = QuickPlan;
                    TourModel.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Quick;
                    TourModel.RouteName       = RouteName;
                    TourModel.RouteTheme      = RouteThemeList;
                    TourModel.SaleCity        = SaleCityList;
                    // 服务标准
                    TourModel.ServiceStandard    = null;
                    TourModel.StandardPlan       = null;
                    TourModel.TourContacMQ       = ContactMQID;
                    TourModel.TourContact        = ContactName;
                    TourModel.TourContactTel     = ContactTel;
                    TourModel.TourContacUserName = UserInfoModel.UserName;
                    TourModel.TourDays           = int.Parse(TourDays);
                    TourModel.TourNo             = string.Empty;
                    TourModel.TourPriceDetail    = InsertTourPriceDetail();
                    TourModel.TourState          = EyouSoft.Model.TourStructure.TourState.收客;
                    TourModel.TourType           = EyouSoft.Model.TourStructure.TourType.组团散拼;
                    if (TourBll.UpdateTemplateTourInfo(TourModel) > 0)
                    {
                        IsResult = true;
                    }
                    TourModel = null;
                }
                else
                {    // 修改子团
                    #region
                    EyouSoft.Model.TourStructure.TourInfo TourModel = new EyouSoft.Model.TourStructure.TourInfo();
                    TourModel.ID              = hidTourID;
                    TourModel.AreaId          = AreaID;
                    TourModel.AreaName        = AreaName;
                    TourModel.AreaType        = Areatype;
                    TourModel.AutoOffDays     = int.Parse(AutoOffDays);
                    TourModel.CompanyID       = CompanyId;
                    TourModel.CompanyName     = UserInfoModel.CompanyName;
                    TourModel.LeaveCity       = int.Parse(LeaveCity);
                    TourModel.OperatorID      = UserID;
                    TourModel.ParentTourID    = TemplateTourID;
                    TourModel.PlanPeopleCount = int.Parse(PeopleNumber);
                    TourModel.QuickPlan       = QuickPlan;
                    TourModel.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Quick;
                    TourModel.RouteName       = RouteName;
                    TourModel.RouteTheme      = RouteThemeList;
                    TourModel.SaleCity        = SaleCityList;
                    // 服务标准
                    TourModel.ServiceStandard    = null;
                    TourModel.StandardPlan       = null;
                    TourModel.TourContacMQ       = ContactMQID;
                    TourModel.TourContact        = ContactName;
                    TourModel.TourContactTel     = ContactTel;
                    TourModel.TourContacUserName = UserInfoModel.UserName;
                    TourModel.TourDays           = int.Parse(TourDays);
                    TourModel.TourNo             = string.Empty;
                    TourModel.TourPriceDetail    = InsertTourPriceDetail();
                    TourModel.TourState          = EyouSoft.Model.TourStructure.TourState.收客;
                    TourModel.TourType           = EyouSoft.Model.TourStructure.TourType.组团散拼;
                    if (TourBll.UpdateTourInfo(TourModel) > 0)
                    {
                        IsResult = true;
                    }
                    TourModel = null;
                    #endregion
                }
            }
            else
            {   // 添加
                #region 添加团队

                #region 子团信息
                IList <EyouSoft.Model.TourStructure.ChildrenTourInfo> ChildrensTourList = new List <EyouSoft.Model.TourStructure.ChildrenTourInfo>();
                if (!String.IsNullOrEmpty(hidTourLeaveDate))
                {
                    string[] tmpLeaveDate = hidTourLeaveDate.Split(',');

                    for (int i = 0; i < tmpLeaveDate.Length; i++)
                    {
                        if (!String.IsNullOrEmpty(tmpLeaveDate[i]))
                        {
                            EyouSoft.Model.TourStructure.ChildrenTourInfo ChildTour = new EyouSoft.Model.TourStructure.ChildrenTourInfo();
                            ChildTour.ChildrenId = Guid.NewGuid().ToString();
                            ChildTour.LeaveDate  = Utils.GetDateTime(tmpLeaveDate[i]);
                            ChildTour.TourState  = EyouSoft.Model.TourStructure.TourState.收客;
                            ChildrensTourList.Add(ChildTour);
                            ChildTour = null;
                        }
                    }
                }
                #endregion

                EyouSoft.Model.TourStructure.TourInfo TourModel = new EyouSoft.Model.TourStructure.TourInfo();
                TourModel.ID              = Guid.NewGuid().ToString();
                TourModel.AreaId          = AreaID;
                TourModel.AreaName        = AreaName;
                TourModel.AreaType        = Areatype;
                TourModel.AutoOffDays     = int.Parse(AutoOffDays);
                TourModel.Childrens       = ChildrensTourList;
                TourModel.CompanyID       = CompanyId;
                TourModel.CompanyName     = UserInfoModel.CompanyName;
                TourModel.LeaveCity       = int.Parse(LeaveCity);
                TourModel.OperatorID      = UserID;
                TourModel.PlanPeopleCount = int.Parse(PeopleNumber);
                TourModel.QuickPlan       = QuickPlan;
                TourModel.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Quick;
                TourModel.RouteName       = RouteName;
                TourModel.RouteTheme      = RouteThemeList;
                TourModel.SaleCity        = SaleCityList;
                // 服务标准
                TourModel.ServiceStandard    = null;
                TourModel.StandardPlan       = null;
                TourModel.TourContacMQ       = ContactMQID;
                TourModel.TourContact        = ContactName;
                TourModel.TourContactTel     = ContactTel;
                TourModel.TourContacUserName = UserInfoModel.UserName;
                TourModel.TourDays           = int.Parse(TourDays);
                TourModel.TourNo             = string.Empty;
                TourModel.TourPriceDetail    = InsertTourPriceDetail();
                TourModel.TourState          = EyouSoft.Model.TourStructure.TourState.收客;
                TourModel.TourType           = EyouSoft.Model.TourStructure.TourType.组团散拼;
                if (TourBll.InsertTemplateTourInfo(TourModel) > 0)
                {
                    IsResult = true;
                }
                TourModel = null;
                #endregion
            }
            #endregion
            return(IsResult);
        }