예제 #1
0
        private bool InsertRouteInfo()
        {
            string RouteName = Utils.GetFormValue(this.LocalQuickRoute_RouteName.UniqueID);
            string TourDays  = Utils.GetFormValue(this.LocalQuickRoute_TourDays.UniqueID);
            string QuickPlan = Utils.EditInputText(Server.UrlDecode(Request.Form["LocalQuickRoute_divFCK"]));

            if (QuickPlan == string.Empty || QuickPlan == "点击添加行程信息")
            {
                QuickPlan = string.Empty;
            }
            string hidRouteID = Utils.GetFormValue(this.LocalQuickRoute_hidRouteID.UniqueID);

            EyouSoft.Model.TourStructure.RouteBasicInfo model = new EyouSoft.Model.TourStructure.RouteBasicInfo();
            model.RouteName       = RouteName;
            model.TourDays        = int.Parse(TourDays);
            model.CompanyID       = UserInfoModel.CompanyID;
            model.CompanyName     = UserInfoModel.CompanyName;
            model.ContactMQID     = ContactMQID;
            model.ContactName     = ContactName;
            model.ContactTel      = ContactTel;
            model.ContactUserName = UserInfoModel.UserName;
            model.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Quick;
            model.PriceDetails    = InsertRoutePriceDetail();
            model.AreaType        = EyouSoft.Model.SystemStructure.AreaType.地接线路;
            model.QuickPlan       = QuickPlan;
            model.IsAccept        = false;
            model.OperatorID      = UserInfoModel.ID;
            model.IssueTime       = DateTime.Now;
            model.AreaId          = 0;
            model.LeaveCityId     = 0;
            model.RouteTheme      = null;
            model.SaleCity        = null;
            model.ServiceStandard = null;
            model.StandardPlans   = null;
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            if (!String.IsNullOrEmpty(hidRouteID))
            {
                model.ID = hidRouteID;
                return(bll.UpdateRouteInfo(model));
            }
            else
            {
                model.ID = Guid.NewGuid().ToString();
                return(bll.InsertRouteInfo(model));
            }
        }
예제 #2
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);
        }
예제 #3
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);
        }
예제 #4
0
        private bool InsertRouteInfo()
        {
            string RouteName  = Utils.GetFormValue(this.LocalStandardRoute_RouteName.UniqueID);
            string TourDays   = Utils.GetFormValue(this.LocalStandardRoute_TourDays.UniqueID);
            string hidRouteID = Utils.GetFormValue(this.LocalStandardRoute_hidRouteID.UniqueID);
            // 线路负责人
            string ContactName     = Utils.GetFormValue("LocalStandardRoute_TourContact");
            string ContactTel      = Utils.GetFormValue("LocalStandardRoute_TourContactTel");
            string ContactMQID     = Utils.GetFormValue("LocalStandardRoute_TourContacMQ");
            string ContactUserName = Utils.GetFormValue("LocalStandardRoute_TourContactUserName");
            // 服务标准
            string ResideContent       = Utils.GetFormValue("LocalStandardRouteResideContent");
            string DinnerContent       = Utils.GetFormValue("LocalStandardRouteDinnerContent");
            string SightContent        = Utils.GetFormValue("LocalStandardRouteSightContent");
            string CarContent          = Utils.GetFormValue("LocalStandardRouteCarContent");
            string GuideContent        = Utils.GetFormValue("LocalStandardRouteGuideContent");
            string TrafficContent      = Utils.GetFormValue("LocalStandardRouteTrafficContent");
            string IncludeOtherContent = Utils.GetFormValue("LocalStandardRouteIncludeOtherContent");
            string Service             = Utils.GetFormValue(this.LocalStandardRoute_Service.UniqueID);
            string Remark = Utils.GetFormValue(this.LocalStandardRoute_Remark.UniqueID);

            EyouSoft.Model.TourStructure.RouteBasicInfo model = new EyouSoft.Model.TourStructure.RouteBasicInfo();
            model.CompanyID       = UserInfoModel.CompanyID;
            model.OperatorID      = UserInfoModel.ID;
            model.CompanyName     = UserInfoModel.CompanyName;
            model.IssueTime       = DateTime.Now;
            model.RouteName       = RouteName;
            model.TourDays        = int.Parse(TourDays);
            model.ReleaseType     = EyouSoft.Model.TourStructure.ReleaseType.Standard;
            model.PriceDetails    = InsertRoutePriceDetail();
            model.AreaType        = EyouSoft.Model.SystemStructure.AreaType.地接线路;
            model.StandardPlans   = InsertRouteStandardPlan();
            model.ContactMQID     = ContactMQID;
            model.ContactName     = ContactName;
            model.ContactTel      = ContactTel;
            model.ContactUserName = ContactUserName;
            // 服务标准
            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;
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            if (!String.IsNullOrEmpty(hidRouteID))
            {
                model.ID = hidRouteID;
                return(bll.UpdateRouteInfo(model));
            }
            else
            {
                model.ID = Guid.NewGuid().ToString();
                return(bll.InsertRouteInfo(model));
            }
        }