Beispiel #1
0
        /// <summary>
        /// 修改初始化线路信息
        /// </summary>
        /// <param name="TourID"></param>
        private void InitRouteInfo(string RouteID)
        {
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = bll.GetRouteInfo(RouteID);
            if (model != null)
            {
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
                {
                    this.TabLocalQuickRoute.Visible    = true;
                    this.TabLocalStandardRoute.Visible = false;
                }
                else
                {
                    this.TabLocalQuickRoute.Visible    = false;
                    this.TabLocalStandardRoute.Visible = true;
                }

                if (!String.IsNullOrEmpty(Utils.InputText(Request.QueryString["type"])) && Utils.InputText(Request.QueryString["type"]) == "edit")
                {
                    this.LocalQuickRoute_hidRouteID.Value = model.ID;
                }
                this.LocalQuickRoute_RouteName.Value = model.RouteName;
                this.LocalQuickRoute_TourDays.Value  = model.TourDays.ToString();

                // 报价等级
                this.LocalQuickRoute_tourpricestand.RoutePriceDetails = model.PriceDetails;
                QuickPlan = model.QuickPlan;
            }
            model = null;
            bll   = null;
        }
Beispiel #2
0
        /// <summary>
        /// 修改初始化线路信息
        /// </summary>
        /// <param name="TourID"></param>
        private void InitRouteInfo(string RouteID)
        {
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = bll.GetRouteInfo(RouteID);
            if (model != null)
            {
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
                {
                    this.TabAddQuickRoute.Visible    = true;
                    this.TabAddStandardRoute.Visible = false;
                }
                else
                {
                    this.TabAddQuickRoute.Visible    = false;
                    this.TabAddStandardRoute.Visible = true;
                }

                for (int i = 0; i < this.AddStandardRoute_RouteArea.Items.Count; i++)
                {
                    if (!String.IsNullOrEmpty(this.AddStandardRoute_RouteArea.Items[i].Value))
                    {
                        if (model.AreaId == int.Parse(this.AddStandardRoute_RouteArea.Items[i].Value.Split('|')[0].ToString()))
                        {
                            this.AddStandardRoute_RouteArea.Items[i].Selected = true;
                        }
                    }
                }
                if (!String.IsNullOrEmpty(Utils.InputText(Request.QueryString["type"])) && Utils.InputText(Request.QueryString["type"]) == "edit")
                {
                    this.AddStandardRoute_hidRouteID.Value = model.ID;
                }
                this.AddStandardRoute_RouteName.Value   = model.RouteName;
                this.AddStandardRoute_txtTourDays.Value = model.TourDays.ToString();

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

                // 报价等级
                this.AddStandardRoute_tourpricestand.RoutePriceDetails = model.PriceDetails;
                // 行程安排
                this.AddStandardRoute_StandardPlan.RouteStandardPlanInfo = model.StandardPlans;
                // 包含项目
                //this.AddStandardRoute_ServiceStandard.RouteServiceStandardInfo = model.ServiceStandard;
                // 服务标准
                this.AddStandardRoute_Remark.Value  = model.ServiceStandard.SpeciallyNotice;
                this.AddStandardRoute_Service.Value = model.ServiceStandard.NotContainService;

                // 线路负责人
                this.AddStandardRoute_TourContactInfo.ContactName = model.ContactName;
                this.AddStandardRoute_TourContactInfo.ContactTel  = model.ContactTel;
                this.AddStandardRoute_TourContactInfo.ContactMQID = model.ContactMQID;
                this.AddStandardRoute_TourContactInfo.CompanyID   = UserInfoModel.CompanyID;
            }
            model = null;
            bll   = null;
        }
Beispiel #3
0
        protected void rptLocalRouteView_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                EyouSoft.Model.TourStructure.RouteBasicInfo RouteModel = (EyouSoft.Model.TourStructure.RouteBasicInfo)e.Item.DataItem;
                if (RouteModel != null)
                {
                    IList <EyouSoft.Model.TourStructure.RoutePriceDetail> list = RouteModel.PriceDetails;
                    string strPriceStandName = string.Empty;
                    string strMarketPrice    = string.Empty;
                    string strPrice          = string.Empty;
                    if (list != null && list.Count > 0)
                    {
                        strPriceStandName = "<td class=\"typeprice\" align=\"center\">";
                        strMarketPrice    = "<td align=\"center\">";
                        strPrice          = "<td align=\"center\">";
                        foreach (EyouSoft.Model.TourStructure.RoutePriceDetail priceModel in list)
                        {
                            strPriceStandName += string.Format("{0}:<br/>", priceModel.PriceStandName);
                            IList <EyouSoft.Model.TourStructure.RoutePriceCustomerLeaveDetail> detailList = priceModel.PriceDetail;
                            if (detailList != null && detailList.Count > 0)
                            {
                                foreach (EyouSoft.Model.TourStructure.RoutePriceCustomerLeaveDetail detailModel in detailList)
                                {
                                    if (detailModel.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.门市)
                                    {
                                        strMarketPrice += string.Format("<span class=\"price2\">¥{0}</span>/<span class=\"price3\">{1}</span>", detailModel.AdultPrice.ToString("F0"), detailModel.ChildrenPrice.ToString("F0"));
                                    }
                                    else if (detailModel.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.行)
                                    {
                                        strPrice += string.Format("<span class=\"price2\">¥{0}</span>/<span class=\"price3\">{1}</span>", detailModel.AdultPrice.ToString("F0"), detailModel.ChildrenPrice.ToString("F0"));
                                    }
                                    else if (detailModel.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差)
                                    {
                                        strMarketPrice += string.Format("/<span class=\"price3\">{0}</span>元<br />", detailModel.ChildrenPrice.ToString("F0"));
                                        strPrice       += string.Format("/<span class=\"price3\">{0}</span>元<br />", detailModel.AdultPrice.ToString("F0"));
                                    }
                                }
                            }
                            detailList = null;
                        }
                        strPriceStandName += "</td>";
                        strMarketPrice    += "</td>";
                        strPrice          += "</td>";
                    }
                    list = null;

                    System.Web.UI.WebControls.Literal ltrPriceInfo = (System.Web.UI.WebControls.Literal)e.Item.FindControl("ltrPriceInfo");
                    ltrPriceInfo.Text = strPriceStandName + strMarketPrice + strPrice;
                }
            }
        }
Beispiel #4
0
        protected string SelectRoute()
        {
            string RouteID = Server.UrlDecode(Utils.InputText(Request.QueryString["RouteID"]));
            string str     = string.Empty;

            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = bll.GetRouteInfo(RouteID);    // 根据线路编号获取线路信息
            if (model != null)
            {
                str = JsonConvert.SerializeObject(model);
            }
            model = null;
            bll   = null;
            return(str);
        }
Beispiel #5
0
        /// <summary>
        /// 修改初始化线路信息
        /// </summary>
        /// <param name="TourID"></param>
        private void InitRouteInfo(string RouteID)
        {
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = bll.GetRouteInfo(RouteID);
            if (model != null)
            {
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
                {
                    this.TabAddQuickRoute.Visible    = true;
                    this.TabAddStandardRoute.Visible = false;
                }
                else
                {
                    this.TabAddQuickRoute.Visible    = false;
                    this.TabAddStandardRoute.Visible = true;
                }

                for (int i = 0; i < this.AddQuickRoute_RouteArea.Items.Count; i++)
                {
                    if (!String.IsNullOrEmpty(this.AddQuickRoute_RouteArea.Items[i].Value))
                    {
                        if (model.AreaId == int.Parse(this.AddQuickRoute_RouteArea.Items[i].Value.Split('|')[0].ToString()))
                        {
                            this.AddQuickRoute_RouteArea.Items[i].Selected = true;
                        }
                    }
                }
                if (!String.IsNullOrEmpty(Utils.InputText(Request.QueryString["type"])) && Utils.InputText(Request.QueryString["type"]) == "edit")
                {
                    this.AddQuickRoute_hidRouteID.Value = model.ID;
                }
                this.AddQuickRoute_RouteName.Value = model.RouteName;
                this.AddQuickRoute_TourDays.Value  = model.TourDays.ToString();
                strRouteTheme = InitRouteTopic(model.RouteTheme);
                strSaleCity   = InitSaleCity(model.SaleCity);
                strLeaveCity  = InitLeaveCity(model.LeaveCityId);

                // 报价等级
                this.AddQuickRoute_tourpricestand.RoutePriceDetails = model.PriceDetails;
                QuickPlan = model.QuickPlan;
                //this.td_AddFCK.Visible = false;
                //this.td_EditFCK.Visible = true;
                //this.AddQuickRoute_divFCK.Value = model.QuickPlan;
            }
            model = null;
            bll   = null;
        }
Beispiel #6
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));
            }
        }
Beispiel #7
0
        /// <summary>
        /// 修改初始化线路信息
        /// </summary>
        /// <param name="TourID"></param>
        private void InitRouteInfo(string RouteID)
        {
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = bll.GetRouteInfo(RouteID);
            if (model != null)
            {
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
                {
                    this.TabLocalQuickRoute.Visible    = true;
                    this.TabLocalStandardRoute.Visible = false;
                }
                else
                {
                    this.TabLocalQuickRoute.Visible    = false;
                    this.TabLocalStandardRoute.Visible = true;
                }

                if (!String.IsNullOrEmpty(Utils.InputText(Request.QueryString["type"])) && Utils.InputText(Request.QueryString["type"]) == "edit")
                {
                    this.LocalStandardRoute_hidRouteID.Value = model.ID;
                }
                this.LocalStandardRoute_RouteName.Value = model.RouteName;
                this.LocalStandardRoute_TourDays.Value  = model.TourDays.ToString();

                // 报价等级
                this.LocalStandardRoute_tourpricestand.RoutePriceDetails = model.PriceDetails;
                // 行程安排
                this.LocalStandardRoute_StandardPlan.RouteStandardPlanInfo = model.StandardPlans;
                // 包含项目
                //this.LocalStandardRoute_ServiceStandard.RouteServiceStandardInfo = model.ServiceStandard;
                // 服务标准
                this.LocalStandardRoute_Remark.Value  = model.ServiceStandard.SpeciallyNotice;
                this.LocalStandardRoute_Service.Value = model.ServiceStandard.NotContainService;

                // 线路负责人
                this.LocalStandardRoute_TourContactInfo.ContactName = model.ContactName;
                this.LocalStandardRoute_TourContactInfo.ContactTel  = model.ContactTel;
                this.LocalStandardRoute_TourContactInfo.ContactMQID = model.ContactMQID;
                this.LocalStandardRoute_TourContactInfo.CompanyID   = UserInfoModel.CompanyID;
            }
            model = null;
            bll   = null;
        }
Beispiel #8
0
        /// <summary>
        /// 更新标准发布的线路信息
        /// </summary>
        /// <param name="routeInfo">线路信息业务实体</param>
        /// <returns>false:失败 true:成功</returns>
        public bool UpdateRouteInfo(EyouSoft.Model.TourStructure.RouteBasicInfo routeInfo)
        {
            bool updateResult = false;

            if (routeInfo == null || string.IsNullOrEmpty(routeInfo.ID))
            {
                return(updateResult);
            }

            if (routeInfo.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
            {
                updateResult = dal.UpdateRouteInfoByQuick(routeInfo);
            }
            else
            {
                updateResult = dal.UpdateRouteInfoByStandard(routeInfo);
            }

            return(updateResult);
        }
Beispiel #9
0
        /// <summary>
        /// 写入标准发布线路信息
        /// </summary>
        /// <param name="routeInfo">线路信息业务实体</param>
        /// <returns>false:失败 true:成功</returns>
        public bool InsertRouteInfo(EyouSoft.Model.TourStructure.RouteBasicInfo routeInfo)
        {
            bool insertResult = false;

            if (routeInfo == null)
            {
                return(insertResult);
            }

            routeInfo.ID = Guid.NewGuid().ToString();

            if (routeInfo.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
            {
                insertResult = dal.InsertRouteInfoByQuick(routeInfo);
            }
            else
            {
                insertResult = dal.InsertRouteInfoByStandard(routeInfo);
            }

            return(insertResult);
        }
Beispiel #10
0
        /// <summary>
        /// 初始化线路信息

        /// </summary>
        private void InitRouteInfo(string RouteID)
        {
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = bll.GetRouteInfo(RouteID);
            if (model != null)
            {
                this.Page.Title        = model.RouteName;
                this.lblRouteName.Text = model.RouteName;
                this.lblTourDays.Text  = model.TourDays.ToString();

                #region 报价信息
                IList <EyouSoft.Model.TourStructure.RoutePriceDetail> priceList = model.PriceDetails;
                if (priceList != null && priceList.Count > 0)
                {
                    StringBuilder str = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.RoutePriceDetail priceModel in priceList)
                    {
                        string priceName = string.Empty;
                        IList <EyouSoft.Model.CompanyStructure.CompanyPriceStand> priceStandList = EyouSoft.BLL.CompanyStructure.CompanyPriceStand.CreateInstance().GetList(UserInfoModel.CompanyID);
                        if (priceStandList != null && priceStandList.Count > 0)
                        {
                            foreach (EyouSoft.Model.CompanyStructure.CompanyPriceStand priceStandModel in priceStandList)
                            {
                                if (priceStandModel.ID == priceModel.PriceStandId)
                                {
                                    priceName = priceStandModel.PriceStandName;
                                }
                            }
                        }
                        priceStandList = null;

                        str.Append("<tr>");
                        str.AppendFormat("<td width=\"120\" align=\"right\" bgcolor=\"#eeeeee\"> {0}:", priceName);
                        IList <EyouSoft.Model.TourStructure.RoutePriceCustomerLeaveDetail> detailList = priceModel.PriceDetail;
                        if (detailList != null && detailList.Count > 0)
                        {
                            foreach (EyouSoft.Model.TourStructure.RoutePriceCustomerLeaveDetail detailModel in detailList)
                            {
                                if (detailModel.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.门市)
                                {
                                    str.Append("成人价格:</td>");
                                    str.AppendFormat("<td width=\"155\" bgcolor=\"#eeeeee\"><input name=\"txtPeoplePrice\" type=\"text\" value=\"{0}\" id=\"txtPeoplePrice\" class=\"bottow_side2\" style=\"width:45px;\" />元/人 </td>", detailModel.AdultPrice.ToString("F0"));
                                    str.Append("<td width=\"92\" align=\"right\" bgcolor=\"#eeeeee\"> 儿童价格:</td>");
                                    str.AppendFormat("<td width=\"143\" bgcolor=\"#eeeeee\"><input name=\"txtChildPrice\" type=\"text\" value=\"{0}\" id=\"txtChildPrice\" class=\"bottow_side2\" style=\"width:45px;\" />元/人</td>", detailModel.ChildrenPrice.ToString("F0"));
                                }
                                else if (detailModel.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差)
                                {
                                    str.Append("<td width=\"83\" align=\"right\" bgcolor=\"#eeeeee\">单房差:</td>");
                                    str.AppendFormat("<td width=\"163\" bgcolor=\"#eeeeee\"><input name=\"txtChildPrice\" type=\"text\" value=\"{0}\" id=\"txtChildPrice\" class=\"bottow_side2\" style=\"width:45px;\" />元/人</td>", detailModel.ChildrenPrice.ToString("F0"));
                                }
                            }
                            str.Append("<td width=\"26\" bgcolor=\"#eeeeee\"><img src=\"" + ImageServerPath + "/images/deleiption.gif\" width=\"13\" height=\"13\" onclick=\"printConfig.deletePriceInfo(this);\" /></td>");
                        }
                        str.Append("</tr>");
                        detailList = null;
                    }
                    priceList = null;
                    this.ltrPriceDetail.Text = str.ToString();
                    str = null;
                }
                #endregion

                #region 行程安排
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
                {
                    if (!String.IsNullOrEmpty(model.QuickPlan))
                    {
                        this.plhItinerary.Visible = false;
                        this.plhPlan.Visible      = true;
                        this.pnlServeice.Visible  = false;
                        this.pnlRemark.Visible    = false;
                        this.ltrTourPlan1.Text    = "<tr><td align=\"left\" bgcolor=\"#E8FFFF\" style=\"line-height: 15px;\">" + model.QuickPlan + "</td></tr>";
                    }
                    else
                    {
                        //this.pnlPlan.Visible = false;
                    }
                }
                else
                {
                    IList <EyouSoft.Model.TourStructure.RouteStandardPlan> standardPlanList = model.StandardPlans;
                    if (standardPlanList != null && standardPlanList.Count > 0)
                    {
                        StringBuilder strPlan = new StringBuilder();
                        foreach (EyouSoft.Model.TourStructure.RouteStandardPlan standardPlanModel in standardPlanList)
                        {
                            strPlan.Append("<tr>");
                            strPlan.Append("<td width=\"61\" rowspan=\"2\" align=\"center\" bgcolor=\"#E8FFFF\" style=\"line-height: 15px;\">");
                            strPlan.AppendFormat("<strong>第{0}天&nbsp;<br /></strong><br /></td>", standardPlanModel.PlanDay.ToString().ToUpper());
                            strPlan.AppendFormat("<td width=\"649\" align=\"left\" valign=\"bottom\" bgcolor=\"#E8FFFF\"><img src=\"" + ImageServerPath + "/images/xing.gif\" width=\"8\" height=\"11\" />行:{0},{1}[{2}]", standardPlanModel.PlanInterval, standardPlanModel.Vehicle, standardPlanModel.TrafficNumber);
                            strPlan.AppendFormat("<img src=\"" + ImageServerPath + "/images/zhu.gif\" width=\"15\" height=\"11\" />住:{0}", standardPlanModel.House);
                            strPlan.AppendFormat("<img src=\"" + ImageServerPath + "/images/chi.gif\" width=\"10\" height=\"11\" />餐:{0}</td>", standardPlanModel.Dinner);
                            strPlan.Append("</tr>");
                            strPlan.Append("<tr>");
                            strPlan.AppendFormat("<td align=\"left\" class=\"padding30\" style=\"height:25px;\">{0}</td>", StringValidate.TextToHtml(standardPlanModel.PlanContent));
                            strPlan.Append("</tr>");
                        }
                        standardPlanList      = null;
                        this.ltrTourPlan.Text = strPlan.ToString();
                        strPlan = null;
                    }
                    else
                    {
                        //this.pnlPlan.Visible = false;
                    }
                }
                #endregion

                #region 包含项目及服务标准
                EyouSoft.Model.TourStructure.RouteServiceStandard ServiceStandard = model.ServiceStandard;
                StringBuilder strService = new StringBuilder();
                if (ServiceStandard != null)
                {
                    if (!String.IsNullOrEmpty(ServiceStandard.ResideContent))
                    {
                        strService.AppendFormat("住宿:{0};", StringValidate.TextToHtml(ServiceStandard.ResideContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.DinnerContent))
                    {
                        strService.AppendFormat("用餐:{0};", StringValidate.TextToHtml(ServiceStandard.DinnerContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.SightContent))
                    {
                        strService.AppendFormat("景点:{0};", StringValidate.TextToHtml(ServiceStandard.SightContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.CarContent))
                    {
                        strService.AppendFormat("用车:{0};", StringValidate.TextToHtml(ServiceStandard.CarContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.GuideContent))
                    {
                        strService.AppendFormat("导游:{0};>", StringValidate.TextToHtml(ServiceStandard.GuideContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.TrafficContent))
                    {
                        strService.AppendFormat("往返交通:{0};", StringValidate.TextToHtml(ServiceStandard.TrafficContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.IncludeOtherContent))
                    {
                        strService.AppendFormat("其它:{0};", StringValidate.TextToHtml(ServiceStandard.IncludeOtherContent));
                    }
                    this.ltrContainContent.Text  = strService.ToString();
                    this.ltrStandardService.Text = StringValidate.TextToHtml(ServiceStandard.NotContainService);
                    this.ltrRemark.Text          = StringValidate.TextToHtml(ServiceStandard.SpeciallyNotice);
                }
                if (strService.ToString() == string.Empty && (ServiceStandard.NotContainService == string.Empty || ServiceStandard.NotContainService == null) && (ServiceStandard.SpeciallyNotice == string.Empty || ServiceStandard.SpeciallyNotice == null))
                {
                    this.pnlServeice.Visible = false;
                }
                ServiceStandard = null;
                #endregion
            }
            model = null;
            bll   = null;
        }
Beispiel #11
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);
        }
Beispiel #12
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);
        }
Beispiel #13
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));
            }
        }
Beispiel #14
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);
        }
Beispiel #15
0
        /// <summary>
        /// 初始化线路信息
        /// </summary>
        private void InitRouteInfo(string RouteID)
        {
            EyouSoft.IBLL.TourStructure.IRouteBasicInfo bll   = EyouSoft.BLL.TourStructure.RouteBasicInfo.CreateInstance();
            EyouSoft.Model.TourStructure.RouteBasicInfo model = bll.GetRouteInfo(RouteID);
            if (model != null)
            {
                this.Page.Title        = model.RouteName;
                this.lblRouteName.Text = model.RouteName;
                this.lblTourDays.Text  = model.TourDays.ToString();

                #region 报价信息
                IList <EyouSoft.Model.TourStructure.RoutePriceDetail> priceList = model.PriceDetails;
                if (priceList != null && priceList.Count > 0)
                {
                    StringBuilder str = new StringBuilder();
                    foreach (EyouSoft.Model.TourStructure.RoutePriceDetail priceModel in priceList)
                    {
                        string priceName = string.Empty;
                        IList <EyouSoft.Model.CompanyStructure.CompanyPriceStand> priceStandList = EyouSoft.BLL.CompanyStructure.CompanyPriceStand.CreateInstance().GetList(UserInfoModel.CompanyID);
                        str.Append("<tr>");
                        if (priceStandList != null && priceStandList.Count > 0)
                        {
                            foreach (EyouSoft.Model.CompanyStructure.CompanyPriceStand priceStandModel in priceStandList)
                            {
                                if (priceStandModel.ID == priceModel.PriceStandId)
                                {
                                    priceName = priceStandModel.PriceStandName;
                                }
                            }
                        }
                        priceStandList = null;

                        str.AppendFormat("<td width=\"110\" align=\"right\" bgcolor=\"#eeeeee\"> {0}:", priceName);
                        IList <EyouSoft.Model.TourStructure.RoutePriceCustomerLeaveDetail> detailList = priceModel.PriceDetail;
                        if (detailList != null && detailList.Count > 0)
                        {
                            foreach (EyouSoft.Model.TourStructure.RoutePriceCustomerLeaveDetail detailModel in detailList)
                            {
                                if (detailModel.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.门市)
                                {
                                    str.Append("成人价格:</td>");
                                    str.AppendFormat("<td width=\"155\" bgcolor=\"#eeeeee\"><input name=\"txtPeoplePrice\" type=\"text\" value=\"{0}\" id=\"txtPeoplePrice\" class=\"bottow_side2\" style=\"width:45px;\" />元/人 </td>", detailModel.AdultPrice.ToString("F0"));
                                    str.Append("<td width=\"92\" align=\"right\" bgcolor=\"#eeeeee\"> 儿童价格:</td>");
                                    str.AppendFormat("<td width=\"143\" bgcolor=\"#eeeeee\"><input name=\"txtChildPrice\" type=\"text\" value=\"{0}\" id=\"txtChildPrice\" class=\"bottow_side2\" style=\"width:45px;\" />元/人</td>", detailModel.ChildrenPrice.ToString("F0"));
                                }
                                else if (detailModel.CustomerLevelType == EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差)
                                {
                                    str.Append("<td width=\"83\" align=\"right\" bgcolor=\"#eeeeee\">单房差:</td>");
                                    str.AppendFormat("<td width=\"163\" bgcolor=\"#eeeeee\"><input name=\"txtChildPrice\" type=\"text\" value=\"{0}\" id=\"txtChildPrice\" class=\"bottow_side2\" style=\"width:45px;\" />元/人</td>", detailModel.ChildrenPrice.ToString("F0"));
                                }
                            }
                        }
                        str.Append("</tr>");
                        detailList = null;
                    }
                    priceList = null;
                    this.ltrPriceDetail.Text = str.ToString();
                    str = null;
                }
                #endregion

                #region 行程安排
                if (model.ReleaseType == EyouSoft.Model.TourStructure.ReleaseType.Quick)
                {
                    if (!String.IsNullOrEmpty(model.QuickPlan))
                    {
                        this.ltrTourPlan.Text = "<tr><td align=\"left\" style=\"border-bottom:1px dashed #cccccc;\">" + model.QuickPlan + "</td></tr>";
                    }
                    else
                    {
                        this.pnlPlan.Visible = false;
                    }
                }
                else
                {
                    IList <EyouSoft.Model.TourStructure.RouteStandardPlan> standardPlanList = model.StandardPlans;
                    if (standardPlanList != null && standardPlanList.Count > 0)
                    {
                        StringBuilder strPlan = new StringBuilder();
                        foreach (EyouSoft.Model.TourStructure.RouteStandardPlan standardPlanModel in standardPlanList)
                        {
                            strPlan.Append("<tr>");
                            strPlan.Append("<td style=\"border-bottom:1px dashed #cccccc;\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\">");
                            strPlan.Append("<tr>");
                            strPlan.AppendFormat("<td width=\"30%\" height=\"20\" align=\"left\">第{0}天&nbsp;</td>", standardPlanModel.PlanDay.ToString().ToUpper());
                            strPlan.AppendFormat("<td width=\"30%\" align=\"left\" class=\"zi\">行:{0}[{1}]</td>", standardPlanModel.Vehicle, standardPlanModel.TrafficNumber);
                            strPlan.AppendFormat("<td width=\"19%\" align=\"left\" class=\"red\">住:{0}</td>", standardPlanModel.House);
                            strPlan.AppendFormat("<td width=\"21%\" align=\"left\" class=\"lv\">餐:{0}</td>", standardPlanModel.Dinner);
                            strPlan.Append("</tr>");
                            strPlan.Append("<tr>");
                            strPlan.AppendFormat("<td colspan=\"4\" align=\"left\" class=\"padding30\">{0}</td>", StringValidate.TextToHtml(standardPlanModel.PlanContent));
                            strPlan.Append("</tr></table></td></tr>");
                        }
                        standardPlanList      = null;
                        this.ltrTourPlan.Text = strPlan.ToString();
                        strPlan = null;
                    }
                    else
                    {
                        this.pnlPlan.Visible = false;
                    }
                }
                #endregion

                #region 包含项目及服务标准
                EyouSoft.Model.TourStructure.RouteServiceStandard ServiceStandard = model.ServiceStandard;
                StringBuilder strService = new StringBuilder();
                if (ServiceStandard != null)
                {
                    if (!String.IsNullOrEmpty(ServiceStandard.ResideContent))
                    {
                        strService.AppendFormat("住宿:{0};<br/>", StringValidate.TextToHtml(ServiceStandard.ResideContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.DinnerContent))
                    {
                        strService.AppendFormat("用餐:{0};<br/>", StringValidate.TextToHtml(ServiceStandard.DinnerContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.SightContent))
                    {
                        strService.AppendFormat("景点:{0};<br/>", StringValidate.TextToHtml(ServiceStandard.SightContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.CarContent))
                    {
                        strService.AppendFormat("用车:{0};<br/>", StringValidate.TextToHtml(ServiceStandard.CarContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.GuideContent))
                    {
                        strService.AppendFormat("导游:{0};<br/>", StringValidate.TextToHtml(ServiceStandard.GuideContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.TrafficContent))
                    {
                        strService.AppendFormat("往返交通:{0};<br/>", StringValidate.TextToHtml(ServiceStandard.TrafficContent));
                    }
                    if (!String.IsNullOrEmpty(ServiceStandard.IncludeOtherContent))
                    {
                        strService.AppendFormat("其它:{0};<br/>", StringValidate.TextToHtml(ServiceStandard.IncludeOtherContent));
                    }
                    this.ltrContainContent.Text  = strService.ToString();
                    this.ltrStandardService.Text = StringValidate.TextToHtml(ServiceStandard.NotContainService);
                    this.ltrRemark.Text          = StringValidate.TextToHtml(ServiceStandard.SpeciallyNotice);
                }
                if (strService.ToString() == string.Empty && (ServiceStandard.NotContainService == string.Empty || ServiceStandard.NotContainService == null) && (ServiceStandard.SpeciallyNotice == string.Empty || ServiceStandard.SpeciallyNotice == null))
                {
                    this.pnlServeice.Visible = false;
                }
                ServiceStandard = null;
                #endregion
            }
        }