Ejemplo n.º 1
0
 protected void InitQuoteBind(int RouteId)
 {
     EyouSoft.BLL.RouteStructure.Route       Bll_Route       = new EyouSoft.BLL.RouteStructure.Route();
     EyouSoft.Model.RouteStructure.RouteInfo Model_Routeinfo = new EyouSoft.Model.RouteStructure.RouteInfo();
     //根据线路区域编号获取线路信息
     Model_Routeinfo = Bll_Route.GetRouteInfo(RouteId);
     if (Model_Routeinfo != null)
     {
         //线路区域编号
         if (this.ddlLineType.Items.FindByValue(Model_Routeinfo.AreaId.ToString()) != null)
         {
             this.ddlLineType.Items.FindByValue(Model_Routeinfo.AreaId.ToString()).Selected = true;
         }
         //线路名称
         this.txt_LineName.Value = Model_Routeinfo.RouteName;
         //线路描述
         this.txt_Description.Value = Model_Routeinfo.RouteDepict;
         //旅游天数
         this.txt_Days.Value = Convert.ToString(Model_Routeinfo.RouteDays);
         if (Model_Routeinfo.RouteQuickInfo != null)
         {
             //行程安排
             this.txt_Travel.Value = Model_Routeinfo.RouteQuickInfo.QuickPlan;
             //服务标准
             this.txt_Services.Text = Model_Routeinfo.RouteQuickInfo.Service;
             //备注
             this.txt_Remarks.Value = Model_Routeinfo.RouteQuickInfo.Remark;
         }
         //附件
         Attach = Model_Routeinfo.Attachs;
     }
     Bll_Route       = null;
     Model_Routeinfo = null;
 }
Ejemplo n.º 2
0
        void BindPublish(HttpContext context, UserInfo userInfo)
        {
            int companyId = EyouSoft.Common.Utils.GetInt(context.Request["companyId"]);

            EyouSoft.BLL.RouteStructure.Route       bll   = new EyouSoft.BLL.RouteStructure.Route();
            EyouSoft.Model.RouteStructure.RouteInfo model = bll.GetRouteInfo(EyouSoft.Common.Utils.GetInt(context.Request["id"]));

            xianlu xl = new xianlu();

            xl.xlArea      = model.AreaId;
            xl.xlDays      = model.RouteDays;
            xl.xlFuwu      = "";
            xl.xlId        = model.RouteId;
            xl.xlName      = model.RouteName;
            xl.xclist      = new List <XingCheng>();
            xl.projectList = model.RouteNormalInfo.Services;
            xl.noProject   = model.RouteNormalInfo.BuHanXiangMu;
            xl.buy         = model.RouteNormalInfo.GouWuAnPai;
            xl.child       = model.RouteNormalInfo.ErTongAnPai;
            xl.Notes       = model.RouteNormalInfo.ZhuYiShiXiang;
            xl.owner       = model.RouteNormalInfo.ZiFeiXIangMu;
            xl.Reminder    = model.RouteNormalInfo.WenXinTiXing;
            foreach (var l in model.RouteNormalInfo.Plans)
            {
                xl.xclist.Add(new XingCheng(l.Interval, l.Vehicle, l.Hotel, l.Dinner.Contains("1") ? 1 : 0, l.Dinner.Contains("2") ? 1 : 0, l.Dinner.Contains("3") ? 1 : 0, l.Dinner.Contains("4") ? 1 : 0, l.Plan, l.FilePath));
            }
            context.Response.Write(JsonConvert.SerializeObject(xl));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 写入线路库信息,正值时成功,负值或0时失败
        /// </summary>
        /// <param name="info">线路信息业务实体</param>
        /// <returns>正值:成功 负值或0:失败</returns>
        public int InsertRouteInfo(EyouSoft.Model.RouteStructure.RouteInfo info)
        {
            DbCommand dc = this._db.GetStoredProcCommand("proc_Route_InsertRouteInfo");

            this._db.AddInParameter(dc, "CompanyId", DbType.Int32, info.CompanyId);
            this._db.AddInParameter(dc, "OperatorId", DbType.Int32, info.OperatorId);
            this._db.AddInParameter(dc, "OperatorName", DbType.String, info.OperatorName);
            this._db.AddInParameter(dc, "AreaId", DbType.Int32, info.AreaId);
            this._db.AddInParameter(dc, "RouteName", DbType.String, info.RouteName);
            this._db.AddInParameter(dc, "RouteDays", DbType.Int32, info.RouteDays);
            this._db.AddInParameter(dc, "ReleaseType", DbType.Byte, (int)info.ReleaseType);
            this._db.AddInParameter(dc, "RouteDepict", DbType.String, info.RouteDepict);
            this._db.AddOutParameter(dc, "Result", DbType.Int32, 4);
            this._db.AddInParameter(dc, "Attachs", DbType.String, this.CreateAttachXML(info.Attachs));

            if (info.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
            {
                this._db.AddInParameter(dc, "QuickPrivate", DbType.String, DBNull.Value);
                if (info.RouteNormalInfo != null)
                {
                    this._db.AddInParameter(dc, "Service", DbType.String, this.CreateRouteServiceXml(info.RouteNormalInfo.Services));
                    this._db.AddInParameter(dc, "Plans", DbType.String, this.CreatePlanXml(info.RouteNormalInfo.Plans));
                }
                else
                {
                    this._db.AddInParameter(dc, "Service", DbType.String, DBNull.Value);
                    this._db.AddInParameter(dc, "Plans", DbType.String, DBNull.Value);
                }
                this._db.AddInParameter(dc, "OtherService", DbType.String, this.CreateOtherServiceXml(info.RouteNormalInfo));
            }
            else
            {
                this._db.AddInParameter(dc, "QuickPrivate", DbType.String, this.CreateQuickPrivateXml(info.RouteQuickInfo));
                this._db.AddInParameter(dc, "Service", DbType.String, DBNull.Value);
                this._db.AddInParameter(dc, "Plans", DbType.String, DBNull.Value);
                this._db.AddInParameter(dc, "OtherService", DbType.String, DBNull.Value);
            }
            DbHelper.RunProcedure(dc, this._db);
            int    Result = 0;
            object obj    = this._db.GetParameterValue(dc, "Result");

            if (obj != null)
            {
                Result       = 1;
                info.RouteId = int.Parse(obj.ToString());
            }
            return(Result);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 快速发布
        /// </summary>
        void BindQuickPublish(HttpContext context, UserInfo userInfo)
        {
            int companyId = EyouSoft.Common.Utils.GetInt(context.Request["companyId"]);

            EyouSoft.BLL.RouteStructure.Route       bll   = new EyouSoft.BLL.RouteStructure.Route();
            EyouSoft.Model.RouteStructure.RouteInfo model = bll.GetRouteInfo(EyouSoft.Common.Utils.GetInt(context.Request["id"]));

            xianlu xl = new xianlu();

            xl.xlArea     = model.AreaId;
            xl.xlDays     = model.RouteDays;
            xl.xlFuwu     = model.RouteQuickInfo.Service;
            xl.xlId       = model.RouteId;
            xl.xlName     = model.RouteName;
            xl.xlXianchen = model.RouteQuickInfo.QuickPlan;
            context.Response.Write(JsonConvert.SerializeObject(xl));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 页面初始化方法
        /// </summary>
        /// <param name="travelId">行程单ID</param>
        protected void DataInit(string RouteId)
        {
            //声明bll对象
            EyouSoft.BLL.RouteStructure.Route Route = new EyouSoft.BLL.RouteStructure.Route(SiteUserInfo);
            //声明团队计划对象
            EyouSoft.Model.RouteStructure.RouteInfo RouteInfo = (EyouSoft.Model.RouteStructure.RouteInfo)Route.GetRouteInfo(Convert.ToInt32(RouteId));
            if (RouteInfo != null)
            {
                //线路名称
                this.lblAreaName.Text = RouteInfo.RouteName;
                //天数
                this.lblDay.Text = RouteInfo.RouteDays.ToString();
                //发布人姓名
                this.lblAuthor.Text = RouteInfo.OperatorName;
                //上团数
                this.lblTourCount.Text = RouteInfo.TourCount.ToString();
                //收客数
                this.lblVisitorCount.Text = RouteInfo.VisitorCount.ToString();
                //不含项目
                this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(RouteInfo.RouteNormalInfo.BuHanXiangMu);
                //购物安排
                this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(RouteInfo.RouteNormalInfo.GouWuAnPai);
                //儿童安排
                this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(RouteInfo.RouteNormalInfo.ErTongAnPai);
                //自费项目
                this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(RouteInfo.RouteNormalInfo.ZiFeiXIangMu);
                //注意事项
                this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(RouteInfo.RouteNormalInfo.ZhuYiShiXiang);
                //温馨提示
                this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(RouteInfo.RouteNormalInfo.WenXinTiXing);
                //行程安排
                this.rptTravel.DataSource = RouteInfo.RouteNormalInfo.Plans;
                this.rptTravel.DataBind();

                if (RouteInfo.RouteNormalInfo.Plans != null)
                {
                    tdCount = RouteInfo.RouteNormalInfo.Plans.Count * 4;//获取td总数
                }
                //包含项目
                this.rptProject.DataSource = RouteInfo.RouteNormalInfo.Services;
                this.rptProject.DataBind();
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 更新线路库信息,正值时成功,负值或0时失败
        /// </summary>
        /// <param name="info">线路信息业务实体</param>
        /// <returns>正值:成功 负值或0:失败</returns>
        public int UpdateRouteInfo(EyouSoft.Model.RouteStructure.RouteInfo info)
        {
            if (info == null)
            {
                return(0);
            }
            int Result = dal.UpdateRouteInfo(info);

            if (Result > 0)
            {
                HandleLogsBll.Add(
                    new EyouSoft.Model.CompanyStructure.SysHandleLogs()
                {
                    ModuleId     = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.线路产品库_线路产品库,
                    EventCode    = Model.CompanyStructure.SysHandleLogsNO.EventCode,
                    EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + Model.EnumType.CompanyStructure.SysPermissionClass.线路产品库_线路产品库.ToString() + "修改线路!编号为:" + info.RouteId,
                    EventTitle   = "修改" + Model.EnumType.CompanyStructure.SysPermissionClass.线路产品库_线路产品库.ToString() + "数据"
                });
            }
            return(Result);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// 页面初始化方法
 /// </summary>
 /// <param name="RouteId">行程单ID</param>
 protected void DataInit(string RouteId)
 {
     //声明bll对象
     EyouSoft.BLL.RouteStructure.Route Route = new EyouSoft.BLL.RouteStructure.Route(SiteUserInfo);
     //声明团队计划对象
     EyouSoft.Model.RouteStructure.RouteInfo RouteInfo = (EyouSoft.Model.RouteStructure.RouteInfo)Route.GetRouteInfo(Convert.ToInt32(RouteId));
     if (RouteInfo != null)
     {
         //线路名称
         this.lblAreaName.Text = RouteInfo.RouteName;
         //天数
         this.lblDay.Text = RouteInfo.RouteDays.ToString();
         //发布人姓名
         this.lblAuthor.Text = RouteInfo.OperatorName;
         //上团数
         this.lblTourCount.Text = RouteInfo.TourCount.ToString();
         //收客数
         this.lblVisitorCount.Text = RouteInfo.VisitorCount.ToString();
         //行程安排
         this.litTravel.Text = RouteInfo.RouteQuickInfo.QuickPlan;
         //服务标准
         this.litService.Text = RouteInfo.RouteQuickInfo.Service;
     }
 }
Ejemplo n.º 8
0
        protected void InitLineInfo(int RouteId)
        {
            EyouSoft.BLL.RouteStructure.Route       Bll_Route       = new EyouSoft.BLL.RouteStructure.Route();
            EyouSoft.Model.RouteStructure.RouteInfo Model_Routeinfo = new EyouSoft.Model.RouteStructure.RouteInfo();
            //根据线路区域编号获取线路信息
            Model_Routeinfo = Bll_Route.GetRouteInfo(RouteId);
            if (Model_Routeinfo != null)
            {
                //线路区域编号
                if (this.ddlLineType.Items.FindByValue(Model_Routeinfo.AreaId.ToString()) != null)
                {
                    this.ddlLineType.Items.FindByValue(Model_Routeinfo.AreaId.ToString()).Selected = true;
                }
                //线路名称
                this.txt_LineName.Value = Model_Routeinfo.RouteName;
                //线路描述
                this.Txt_XianlDescript.Value = Model_Routeinfo.RouteDepict;
                //旅游天数
                this.Txt_Days.Value = Convert.ToString(Model_Routeinfo.RouteDays);
                //行程信息集合
                this.xingcheng1.Bind(Model_Routeinfo.RouteNormalInfo.Plans.ToList());

                //附件信息
                IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = Model_Routeinfo.Attachs;
                if (attachList.Count > 0 && attachList != null)
                {
                    EyouSoft.Model.TourStructure.TourAttachInfo fileModel = attachList[0];
                    hypFilePath.NavigateUrl   = fileModel.FilePath;
                    this.hidOldName.Value     = fileModel.Name;
                    this.hidOldFilePath.Value = fileModel.FilePath;
                    if (fileModel.Name.Trim() == "")
                    {
                        this.pnlFile.Visible = false;
                    }
                }
                else
                {
                    this.pnlFile.Visible = false;
                }

                //包含信息项目
                this.ProjectControl1.SetList = Model_Routeinfo.RouteNormalInfo.Services;
                this.ProjectControl1.SetDataList();
                //不包含项目
                this.Txt_XianlProjectNo.Value = Model_Routeinfo.RouteNormalInfo.BuHanXiangMu;
                //儿童安排
                this.Txt_ChildPlan.Value = Model_Routeinfo.RouteNormalInfo.ErTongAnPai;
                //购物安排
                this.Txt_ShoppPlan.Value = Model_Routeinfo.RouteNormalInfo.GouWuAnPai;
                //内部信息
                this.Txt_Reception.Value = Model_Routeinfo.RouteNormalInfo.NeiBuXingXi;
                //温馨提醒
                this.Txt_Remind.Value = Model_Routeinfo.RouteNormalInfo.WenXinTiXing;
                //主要事项
                this.Txt_Notes.Value = Model_Routeinfo.RouteNormalInfo.ZhuYiShiXiang;
                //自费项目
                this.Txt_expensce.Value = Model_Routeinfo.RouteNormalInfo.ZiFeiXIangMu;
            }
            Bll_Route       = null;
            Model_Routeinfo = null;
        }
Ejemplo n.º 9
0
        protected void InitBindLinePro()
        {
            //线路区域编号
            int LineTypeID = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.ddlLineType.UniqueID), ""));

            if (LineTypeID == 0)
            {
                SetErrorMsg(false, "请选择线路区域!");
                return;
            }
            //线路名称
            string LineName = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.txt_LineName.UniqueID.Trim()), "");

            if (LineName == "")
            {
                SetErrorMsg(false, "请填写线路名称!");
                return;
            }
            //线路描述
            string Desriptoin = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_XianlDescript.UniqueID.Trim()), "");
            //旅游天数
            int Days = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.Txt_Days.UniqueID.Trim()));

            if (Days == 0)
            {
                SetErrorMsg(false, "请填写旅游天数!");
                return;
            }

            //不包含项目
            string ProjectNo = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_XianlProjectNo.UniqueID.Trim()), "");
            //购物安排
            string ShoppPlan = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_ShoppPlan.UniqueID.Trim()), "");
            //儿童安排
            string ChildPlan = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_ChildPlan.UniqueID.Trim()), "");
            //自费项目
            string Expensce = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_expensce.UniqueID.Trim()), "");
            //注意事项
            string Notes = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_Notes.UniqueID.Trim()), "");
            //温馨提醒
            string Remind = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_Remind.UniqueID.Trim()), "");
            //内部信息
            string Reception = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.Txt_Reception.UniqueID.Trim()), "");

            //线路库业务逻辑类
            EyouSoft.BLL.RouteStructure.Route Route = new EyouSoft.BLL.RouteStructure.Route();
            //线路基本信息实体类
            EyouSoft.Model.RouteStructure.RouteInfo Routeinfo = new EyouSoft.Model.RouteStructure.RouteInfo();
            Routeinfo.AreaId      = LineTypeID;
            Routeinfo.RouteName   = LineName;
            Routeinfo.RouteDepict = Desriptoin;
            Routeinfo.RouteDays   = Days;
            Routeinfo.Attachs     = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();

            //标准发布团队行程信息业务实体
            Routeinfo.RouteNormalInfo = new EyouSoft.Model.TourStructure.TourNormalPrivateInfo();
            #region 包含项目
            Routeinfo.RouteNormalInfo.Services      = this.ProjectControl1.GetDataList();
            Routeinfo.RouteNormalInfo.WenXinTiXing  = Remind;
            Routeinfo.RouteNormalInfo.ZhuYiShiXiang = Notes;
            Routeinfo.RouteNormalInfo.ZiFeiXIangMu  = Expensce;
            #endregion

            #region 获取行程信息
            List <EyouSoft.Model.TourStructure.TourPlanInfo> PlanInfo = this.xingcheng1.GetValues();
            Routeinfo.RouteNormalInfo.Plans        = PlanInfo;
            Routeinfo.RouteNormalInfo.BuHanXiangMu = ProjectNo;
            Routeinfo.RouteNormalInfo.ErTongAnPai  = ChildPlan;
            Routeinfo.RouteNormalInfo.GouWuAnPai   = ShoppPlan;
            Routeinfo.RouteNormalInfo.NeiBuXingXi  = Reception;
            #endregion

            #region   附件
            //线路附件实体
            EyouSoft.Model.TourStructure.TourAttachInfo TourAttachInfo = new EyouSoft.Model.TourStructure.TourAttachInfo();
            //文件路径
            string filePath = string.Empty;
            //文件名
            string fileName = string.Empty;

            HttpPostedFile FileUpload = Request.Files["fileUpLoad"];
            if (!string.IsNullOrEmpty(FileUpload.FileName) && FileUpload.ContentLength > 0)
            {
                //文件上传
                if (EyouSoft.Common.Function.UploadFile.FileUpLoad(FileUpload, "LineListFile", out filePath, out fileName))
                {
                    if (filePath.Trim() != "" && fileName.Trim() != "")
                    {
                        //设置文件上传后的虚拟路劲
                        TourAttachInfo.FilePath = filePath;
                        //保存原文件名
                        TourAttachInfo.Name = fileName;
                        Routeinfo.Attachs.Add(TourAttachInfo);
                    }
                }
                else
                {
                    //上传失败提示
                    this.litMsg.Text = EyouSoft.Common.Utils.ShowMsg("文件上传失败!");
                    return;
                }
            }
            else
            {
                TourAttachInfo.FilePath = hidOldFilePath.Value;
                TourAttachInfo.Name     = hidOldName.Value;
                Routeinfo.Attachs.Add(TourAttachInfo);
            }
            #endregion

            //公司编号
            Routeinfo.CompanyId = SiteUserInfo.CompanyID;
            //当前操作员编号
            Routeinfo.OperatorId = SiteUserInfo.ID;
            //当前操作员姓名
            if (SiteUserInfo.ContactInfo != null)
            {
                Routeinfo.OperatorName = SiteUserInfo.ContactInfo.ContactName;
            }

            string hidType = EyouSoft.Common.Utils.GetFormValue(this.hideType.UniqueID);
            #region 列表线路数据修改
            if (hidType == "update")
            {
                //线路编号
                int RouteId = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hidRouteid.UniqueID));
                Routeinfo.RouteId = RouteId;
            }
            #endregion

            #region 导航菜单线路数据修改
            if (hidType == "UpdateT")
            {
                //线路编号
                int RouteID = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hidRouteid.UniqueID));
                Routeinfo.RouteId = RouteID;
            }
            #endregion

            #region  制线路信息
            if (hidType == "Copy")
            {
                //线路编号
                int RouteID = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hidRouteid.UniqueID));
                Routeinfo.RouteId = RouteID;
            }
            #endregion


            if (hidType == "Copy")
            {
                if (Route.InsertRouteInfo(Routeinfo) > 0)
                {
                    SetErrorMsg(true, "线路信息添加成功!");
                }
                else
                {
                    SetErrorMsg(false, "线路信息添加失败!");
                }
            }

            if (hidType == "update" || hidType == "UpdateT")
            {
                if (Route.UpdateRouteInfo(Routeinfo) > 0)
                {
                    SetErrorMsg(true, "线路信息修改成功!");
                }
                else
                {
                    SetErrorMsg(false, "线路信息修改失败!");
                }
            }
        }
Ejemplo n.º 10
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //操作类型
            string type = context.Request.QueryString["type"];
            //计划ID
            string id = context.Request.QueryString["id"];
            //线路区域ID
            string areaId = context.Request.QueryString["areaId"];
            //团号
            string teamNum = context.Request.QueryString["teamNum"];

            //登录公司ID
            EyouSoft.SSOComponent.Entity.UserInfo userModel = EyouSoft.Security.Membership.UserProvider.GetUser();
            //如果公司ID为0表示没有公司登录 并返回false
            if (userModel == null)
            {
                context.Response.Write("{Islogin:false}");
                return;
            }
            if (type != null)
            {
                if (id != null && id != "" && type != null && type.Trim() != "")
                {
                    string str = "";
                    //GetModel
                    //线路库业务逻辑类
                    EyouSoft.BLL.RouteStructure.Route RouteBll = new EyouSoft.BLL.RouteStructure.Route();
                    //线路基本信息实体类
                    EyouSoft.Model.RouteStructure.RouteInfo Routeinfo = RouteBll.GetRouteInfo(Utils.GetInt(id));
                    if (Routeinfo != null)
                    {
                        //快速版
                        if (type == "Fast")
                        {
                            //0天数 1行程安排 2服务标准
                            var obj = new { dayCount = Routeinfo.RouteDays.ToString(), travel = Routeinfo.RouteQuickInfo.QuickPlan, services = Routeinfo.RouteQuickInfo.Service };
                            str = Newtonsoft.Json.JsonConvert.SerializeObject(obj);
                        }
                        //标准版
                        if (type == "Standard")
                        {
                            //0天数  1行程安排  2添加附件  3包含项目 4不包含项目  5购物安排  6儿童安排 7自费项目 8注意事项  9温馨提示
                            str = "≮dayCount:\"{0}\",travel:{1},filePath:\"{2}\",project:{3},noPro:\"{4}\",buyPlan:\"{5}\",childPlan:\"{6}\",selfPro:\"{7}\",note:\"{8}\",tips:\"{9}\"≯";

                            //行程安排JSON
                            StringBuilder travel = new StringBuilder();
                            //判断是否有行程信息数据
                            if (Routeinfo.RouteNormalInfo.Plans != null && Routeinfo.RouteNormalInfo.Plans.Count > 0)
                            {
                                travel.Append("[");
                                for (int i = 0; i < Routeinfo.RouteNormalInfo.Plans.Count; i++)
                                {
                                    //添加行程信息数据
                                    travel.Append("{qujian:\"" + Routeinfo.RouteNormalInfo.Plans[i].Interval + "\",jiaotong:\"" + Routeinfo.RouteNormalInfo.Plans[i].Vehicle + "\",zhushu:\"" + Routeinfo.RouteNormalInfo.Plans[i].Hotel + "\",eatOne:\"" + (Routeinfo.RouteNormalInfo.Plans[i].Dinner.Contains("1") ? "1" : "0") + "\",eatTwo:\"" + (Routeinfo.RouteNormalInfo.Plans[i].Dinner.Contains("2") ? "2" : "0") + "\",eatThree:\"" + (Routeinfo.RouteNormalInfo.Plans[i].Dinner.Contains("3") ? "3" : "0") + "\",eatFour:\"" + (Routeinfo.RouteNormalInfo.Plans[i].Dinner.Contains("4") ? "4" : "0") + "\",content:\"" + Routeinfo.RouteNormalInfo.Plans[i].Plan + "\",fileField:\"" + Routeinfo.RouteNormalInfo.Plans[i].FilePath + "\",img:\"" + Routeinfo.RouteNormalInfo.Plans[i].FilePath + "\"},");
                                }
                                //移除最后一个 ,
                                travel.Remove(travel.Length - 1, 1);
                                travel.Append("]");
                            }
                            else
                            {
                                travel.Append("[]");
                            }

                            //包含项目
                            StringBuilder project = new StringBuilder();
                            if (Routeinfo.RouteNormalInfo.Services != null && Routeinfo.RouteNormalInfo.Services.Count > 0)
                            {
                                project.Append("[");
                                for (int i = 0; i < Routeinfo.RouteNormalInfo.Services.Count; i++)
                                {
                                    //添加包含项目数据
                                    project.Append("{selectPro:\"" + Convert.ToInt16(Routeinfo.RouteNormalInfo.Services[i].ServiceType) + "\",standard:\"" + Routeinfo.RouteNormalInfo.Services[i].Service + "\"},");
                                }
                                project.Remove(project.Length - 1, 1);
                                project.Append("]");
                            }
                            else
                            {
                                project.Append("[]");
                            }
                            string attach = "";
                            //如果附件存在 则取第一个显示
                            if (Routeinfo.Attachs != null && Routeinfo.Attachs.Count > 0)
                            {
                                attach = Routeinfo.Attachs[0].Name;
                            }
                            str = GetNewString(string.Format(str, Routeinfo.RouteDays.ToString(), travel.ToString(), attach, project.ToString(), Routeinfo.RouteNormalInfo.BuHanXiangMu, Routeinfo.RouteNormalInfo.GouWuAnPai, Routeinfo.RouteNormalInfo.ErTongAnPai, Routeinfo.RouteNormalInfo.ZiFeiXIangMu, Routeinfo.RouteNormalInfo.ZhuYiShiXiang, Routeinfo.RouteNormalInfo.WenXinTiXing));
                            str = str.Replace('≮', '{');
                            str = str.Replace('≯', '}');
                        }
                        context.Response.Write(str);
                        return;
                    }
                    else
                    {
                        context.Response.Write("");
                        return;
                    }
                }

                //验证团号是否存在
                if (type == "CheckTeamNum" && teamNum != null && teamNum.Trim() != "")
                {
                    //将团号加入数组
                    string[] tourCode = new string[] { teamNum };
                    //获得重复的数据集合
                    IList <string> count = new EyouSoft.BLL.TourStructure.Tour().ExistsTourCodes(userModel.CompanyID, null, tourCode);
                    if (count != null && count.Count > 0)
                    {
                        //如果该团号存在返回false
                        context.Response.Write("NO");
                    }
                    else
                    {
                        //如果团号不存在返回true
                        context.Response.Write("OK");
                    }
                }

                if (type == "GetAreaUser" && areaId != null && areaId.Trim() != "")
                {
                    string str = "";
                    EyouSoft.Model.CompanyStructure.Area             model = new EyouSoft.BLL.CompanyStructure.Area().GetModel(Utils.GetInt(areaId));
                    IList <EyouSoft.Model.CompanyStructure.UserArea> list  = null;
                    if (model != null)
                    {
                        list = model.AreaUserList;
                        for (int i = 0; i < list.Count; i++)
                        {
                            str += "{uid:\"" + list[i].UserId + "\",uName:\"" + list[i].ContactName + "\"}|||";
                        }
                    }

                    context.Response.Write(str);
                }
            }
        }
Ejemplo n.º 11
0
        protected void CreatQuicklyTeam()
        {
            int id = Convert.ToInt32(Utils.GetQueryStringValue("id"));

            EyouSoft.Model.TourStructure.LineInquireQuoteInfo lineInfo = SaveInfo(id);                                    //生成页面上取值后的lineInfo
            EyouSoft.Model.RouteStructure.RouteInfo           route    = new EyouSoft.Model.RouteStructure.RouteInfo();   //生成线路信息
            EyouSoft.BLL.RouteStructure.Route         routeBll         = new EyouSoft.BLL.RouteStructure.Route();         //routeBll类
            EyouSoft.Model.TourStructure.TourTeamInfo tourTeamInfo     = new EyouSoft.Model.TourStructure.TourTeamInfo(); //生成团队计划类
            //获取线路
            route = routeBll.GetRouteInfo(lineInfo.RouteId);
            //客户单位编号
            tourTeamInfo.BuyerCId = lineInfo.CustomerId;
            //客户单位名称
            tourTeamInfo.BuyerCName = lineInfo.CustomerName;
            //公司编号
            tourTeamInfo.CompanyId = lineInfo.CompanyId;
            //出团日期
            tourTeamInfo.LDate = (DateTime)lineInfo.LeaveDate;
            //线路编号
            tourTeamInfo.RouteId = lineInfo.RouteId;
            //线路名称
            tourTeamInfo.RouteName = lineInfo.RouteName;
            //客户单位编号
            tourTeamInfo.BuyerCId = lineInfo.CustomerId;
            //客户单位名称
            tourTeamInfo.BuyerCName = lineInfo.CustomerName;
            //公司编号
            tourTeamInfo.CompanyId = lineInfo.CompanyId;
            //发布人编号
            tourTeamInfo.OperatorId = SiteUserInfo.ID;
            //总人数
            tourTeamInfo.PlanPeopleNumber = lineInfo.PeopleNum;
            //团队计划发布类型
            tourTeamInfo.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick;

            if (new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(SiteUserInfo.CompanyID) == EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.PartNumber)
            {
                tourTeamInfo.TourTeamUnit = new EyouSoft.Model.TourStructure.MTourTeamUnitInfo()
                {
                    NumberCr     = tourTeamInfo.PlanPeopleNumber,
                    NumberEt     = 0,
                    NumberQp     = 0,
                    UnitAmountCr = 0,
                    UnitAmountEt = 0,
                    UnitAmountQp = 0
                };
            }
            else
            {
                tourTeamInfo.TourTeamUnit = null;
            }


            //生成快速发布信息实体
            tourTeamInfo.TourQuickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo();
            if (lineInfo.XingCheng != null)
            {
                //快速发布——行程内容
                tourTeamInfo.TourQuickInfo.QuickPlan = lineInfo.XingCheng.QuotePlan;
            }
            //快速发布——备注
            tourTeamInfo.TourQuickInfo.Remark = lineInfo.Remark;
            //快速发布——服务标准
            tourTeamInfo.TourQuickInfo.Service = lineInfo.SpecialClaim;



            //销售员ID
            tourTeamInfo.SellerId = SiteUserInfo.ID;
            //我社报价
            tourTeamInfo.TotalAmount = PriceControl1.TotalAmount;
            //团号
            tourTeamInfo.TourCode = this.hid_tourCode.Value;
            //天数
            tourTeamInfo.TourDays = Utils.GetInt(this.hid_dayCount.Value, 1);
            //计调员
            tourTeamInfo.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo();
            tourTeamInfo.Coordinator.CoordinatorId = Utils.GetInt(this.hid_peopleId.Value, 0);
            tourTeamInfo.Coordinator.Name          = this.hid_peopleName.Value;
            //包含项目集合
            tourTeamInfo.Services = this.PriceControl1.GetList;
            //区域路线编号
            tourTeamInfo.AreaId = Utils.GetInt(this.hid_areaId.Value, 0);
            TheResult(lineQuoteBll.AddQuote(tourTeamInfo, lineInfo), "Submit");
        }
Ejemplo n.º 12
0
        void SaveInfo()
        {
            xlId = EyouSoft.Common.Utils.GetInt(Request.QueryString["id"]);
            EyouSoft.BLL.RouteStructure.Route       rout  = new EyouSoft.BLL.RouteStructure.Route();
            EyouSoft.Model.RouteStructure.RouteInfo model = rout.GetRouteInfo(xlId);
            EyouSoft.BLL.TourStructure.Tour         tour  = new EyouSoft.BLL.TourStructure.Tour();
            EyouSoft.Model.TourStructure.TourInfo   info  = new EyouSoft.Model.TourStructure.TourInfo();

            IList <EyouSoft.Model.CompanyStructure.CustomStand> listcus = new List <EyouSoft.Model.CompanyStructure.CustomStand>();

            EyouSoft.BLL.CompanyStructure.CompanyCustomStand bllCom = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();

            int kkk = 0;

            listcus        = bllCom.GetList(100, 1, ref kkk, CurrentUserCompanyID);
            info.AreaId    = model.AreaId;
            info.Attachs   = null;
            info.CompanyId = CurrentUserCompanyID;

            EyouSoft.Model.TourStructure.TourCreateRuleInfo rule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo();
            rule.Cycle = null;
            rule.SDate = null;
            rule.Rule  = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期;
            IList <EyouSoft.Model.TourStructure.TourChildrenInfo> childlist = new List <EyouSoft.Model.TourStructure.TourChildrenInfo>();

            string[] childteamnumber = EyouSoft.Common.Utils.GetFormValue("hidToursNumbers").Split(',');
            for (int i = 0; i < childteamnumber.Length; i++)
            {
                EyouSoft.Model.TourStructure.TourChildrenInfo cinfo = new EyouSoft.Model.TourStructure.TourChildrenInfo();
                cinfo.LDate    = EyouSoft.Common.Utils.GetDateTime(childteamnumber[i].Split('{')[0]);
                cinfo.TourCode = childteamnumber[i].Split('}')[1];
                childlist.Add(cinfo);
            }

            info.Childrens = childlist;

            info.LTraffic   = Txt_StartTraffic.Value;
            info.OperatorId = SiteUserInfo.ID;   //用户ID

            info.PlanPeopleNumber = EyouSoft.Common.Utils.GetInt(Txt_PreControlNumber.Value);

            info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo();
            info.Coordinator.CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator"));

            IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> pricelist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>();

            for (int k = 0; k < Utils.GetFormValues("ddl_price").Length; k++)
            {
                EyouSoft.Model.TourStructure.TourPriceStandardInfo price = new EyouSoft.Model.TourStructure.TourPriceStandardInfo();
                price.StandardId   = Utils.GetInt(Utils.GetFormValues("ddl_price")[k].Split('|')[0]);
                price.StandardName = Utils.GetFormValues("ddl_price")[k].Split('|')[1];
                IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listLevels = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>();


                string[] crPrice = Utils.GetFormValues("txt_cr_price");

                for (int i = 0; i < kkk; i++)
                {
                    EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo level = new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo();
                    level.AdultPrice    = Utils.GetDecimal(Utils.GetFormValues("txt_cr_price")[i + kkk * k]);
                    level.ChildrenPrice = Utils.GetDecimal(Utils.GetFormValues("txt_rt_price")[i + kkk * k]);
                    level.LevelType     = EyouSoft.Model.EnumType.CompanyStructure.CustomLevType.其他;
                    level.LevelName     = Utils.GetFormValues("hd_cusStandName")[i];
                    level.LevelId       = Utils.GetInt(Utils.GetFormValues("hd_cusStandId")[i]);
                    listLevels.Add(level);
                }
                price.CustomerLevels = listLevels;
                pricelist.Add(price);
            }
            info.PriceStandards = pricelist;
            info.RouteId        = Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("ID"));
            info.RouteName      = model.RouteName;
            info.RTraffic       = Txt_EndTraffic.Value;
            info.Status         = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客;

            info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None;

            model         = rout.GetRouteInfo(info.RouteId);
            info.TourDays = model.RouteDays;

            info.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划;
            if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal)
            {
                info.ReleaseType    = model.ReleaseType;
                info.TourNormalInfo = model.RouteNormalInfo;
            }
            else
            {
                info.ReleaseType   = model.ReleaseType;
                info.TourQuickInfo = model.RouteQuickInfo;
            }

            if (tour.InsertTourInfo(info) > 0)
            {
                Response.Write("<script>alert('添加成功!');window.parent.location.href=window.parent.location.href;</script>");
            }
            else
            {
                Response.Write("<script>alert('添加失败!');window.parent.location.href=window.parent.location.href;</script>");
            }
        }
Ejemplo n.º 13
0
        /// <summary>
        /// 获取线路信息
        /// </summary>
        /// <param name="routeId">线路编号</param>
        /// <returns></returns>
        public EyouSoft.Model.RouteStructure.RouteInfo GetRouteInfo(int routeId)
        {
            EyouSoft.Model.RouteStructure.RouteInfo model = null;
            DbCommand dc = this._db.GetStoredProcCommand("proc_Route_GetRouteInfo");

            this._db.AddInParameter(dc, "RouteId", DbType.Int32, routeId);
            using (IDataReader dr = DbHelper.ExecuteReader(dc, this._db))
            {
                if (dr.Read())
                {
                    #region 线路基本信息
                    model              = new EyouSoft.Model.RouteStructure.RouteInfo();
                    model.AreaId       = dr.GetInt32(dr.GetOrdinal("AreaId"));
                    model.CompanyId    = dr.GetInt32(dr.GetOrdinal("CompanyId"));
                    model.OperatorId   = dr.GetInt32(dr.GetOrdinal("OperatorId"));
                    model.OperatorName = dr[dr.GetOrdinal("OperatorName")].ToString();
                    model.ReleaseType  = (EyouSoft.Model.EnumType.TourStructure.ReleaseType) int.Parse(dr[dr.GetOrdinal("RouteIssueTypeId")].ToString());
                    model.RouteDays    = dr.GetInt32(dr.GetOrdinal("RouteDays"));
                    model.RouteDepict  = dr[dr.GetOrdinal("RouteDepict")].ToString();
                    model.RouteId      = dr.GetInt32(dr.GetOrdinal("Id"));
                    model.RouteName    = dr[dr.GetOrdinal("RouteName")].ToString();
                    model.TourCount    = dr.GetInt32(dr.GetOrdinal("TourCount"));
                    model.VisitorCount = dr.GetInt32(dr.GetOrdinal("VisitorCount"));
                    #endregion

                    #region 标准线路的附件信息
                    dr.NextResult();
                    IList <EyouSoft.Model.TourStructure.TourAttachInfo> AttachList = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();
                    while (dr.Read())
                    {
                        EyouSoft.Model.TourStructure.TourAttachInfo attchModel = new EyouSoft.Model.TourStructure.TourAttachInfo();
                        attchModel.FilePath = dr[dr.GetOrdinal("FilePath")].ToString();
                        attchModel.Name     = dr[dr.GetOrdinal("FileName")].ToString();
                        AttachList.Add(attchModel);
                        attchModel = null;
                    }
                    model.Attachs = AttachList;
                    #endregion

                    #region 标准线路服务标准信息
                    model.RouteNormalInfo = new TourNormalPrivateInfo();
                    dr.NextResult();
                    IList <EyouSoft.Model.TourStructure.TourServiceInfo> ServiceList = new List <EyouSoft.Model.TourStructure.TourServiceInfo>();
                    while (dr.Read())
                    {
                        if (dr[dr.GetOrdinal("ServiceType")].ToString() == "BuHanXiangMu")
                        {
                            model.RouteNormalInfo.BuHanXiangMu = dr[dr.GetOrdinal("ServiceValue")].ToString();
                        }
                        else if (dr[dr.GetOrdinal("ServiceType")].ToString() == "ErTongAnPai")
                        {
                            model.RouteNormalInfo.ErTongAnPai = dr[dr.GetOrdinal("ServiceValue")].ToString();
                        }
                        else if (dr[dr.GetOrdinal("ServiceType")].ToString() == "GouWuAnPai")
                        {
                            model.RouteNormalInfo.GouWuAnPai = dr[dr.GetOrdinal("ServiceValue")].ToString();
                        }
                        else if (dr[dr.GetOrdinal("ServiceType")].ToString() == "NeiBuXingXi")
                        {
                            model.RouteNormalInfo.NeiBuXingXi = dr[dr.GetOrdinal("ServiceValue")].ToString();
                        }
                        else if (dr[dr.GetOrdinal("ServiceType")].ToString() == "WenXinTiXing")
                        {
                            model.RouteNormalInfo.WenXinTiXing = dr[dr.GetOrdinal("ServiceValue")].ToString();
                        }
                        else if (dr[dr.GetOrdinal("ServiceType")].ToString() == "ZhuYiShiXiang")
                        {
                            model.RouteNormalInfo.ZhuYiShiXiang = dr[dr.GetOrdinal("ServiceValue")].ToString();
                        }
                        else if (dr[dr.GetOrdinal("ServiceType")].ToString() == "ZiFeiXIangMu")
                        {
                            model.RouteNormalInfo.ZiFeiXIangMu = dr[dr.GetOrdinal("ServiceValue")].ToString();
                        }
                        else
                        {
                            EyouSoft.Model.TourStructure.TourServiceInfo ServiceModel = null;
                            switch (dr[dr.GetOrdinal("ServiceType")].ToString())
                            {
                            case "DiJie":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.地接;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "JiuDian":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.酒店;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "YongCan":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.用餐;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "JingDian":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.景点;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "BaoXian":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.保险;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "DaJiaoTong":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.大交通;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "DaoFu":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.导服;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "GouWu":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.购物;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "XiaoJiaoTong":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.小交通;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;

                            case "QiTa":
                                ServiceModel             = new TourServiceInfo();
                                ServiceModel.ServiceType = EyouSoft.Model.EnumType.TourStructure.ServiceType.其它;
                                ServiceModel.Service     = dr[dr.GetOrdinal("ServiceValue")].ToString();
                                ServiceList.Add(ServiceModel);
                                ServiceModel = null;
                                break;
                            }
                            model.RouteNormalInfo.Services = ServiceList;
                        }
                    }
                    #endregion

                    #region 标准线路行程安排信息
                    dr.NextResult();
                    IList <EyouSoft.Model.TourStructure.TourPlanInfo> PlanList = new List <EyouSoft.Model.TourStructure.TourPlanInfo>();
                    while (dr.Read())
                    {
                        EyouSoft.Model.TourStructure.TourPlanInfo PlanModel = new EyouSoft.Model.TourStructure.TourPlanInfo();
                        PlanModel.Dinner   = dr[dr.GetOrdinal("Dinner")].ToString();
                        PlanModel.FilePath = dr[dr.GetOrdinal("ImgPath")].ToString();
                        PlanModel.Hotel    = dr[dr.GetOrdinal("House")].ToString();
                        PlanModel.Interval = dr[dr.GetOrdinal("PlanInterval")].ToString();
                        PlanModel.Plan     = dr[dr.GetOrdinal("PlanContent")].ToString();
                        PlanModel.Vehicle  = dr[dr.GetOrdinal("Vehicle")].ToString();
                        PlanList.Add(PlanModel);
                        PlanModel = null;
                    }
                    model.RouteNormalInfo.Plans = PlanList;
                    #endregion

                    #region 快速线路行程安排信息
                    dr.NextResult();
                    if (dr.Read())
                    {
                        model.RouteQuickInfo           = new TourQuickPrivateInfo();
                        model.RouteQuickInfo.QuickPlan = dr[dr.GetOrdinal("RoutePlan")].ToString();
                        model.RouteQuickInfo.Service   = dr[dr.GetOrdinal("ServeRule")].ToString();
                        model.RouteQuickInfo.Remark    = dr[dr.GetOrdinal("Remark")].ToString();
                    }
                    #endregion
                }
            }
            return(model);
        }
Ejemplo n.º 14
0
        protected void OnSave()
        {
            bool result = true;

            //线路区域编号
            int LineTypeID = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(ddlLineType.UniqueID), ""));

            if (LineTypeID == 0)
            {
                result = false;
                MessageBox.Show(this, "请选择线路区域!");
                return;
            }
            //线路名称
            string LineName = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(this.txt_LineName.Name), "");

            if (LineName == "")
            {
                result = false;
                MessageBox.Show(this, "请填写线路名称!");
                return;
            }
            //线路描述
            string LineDesCription = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(txt_Description.UniqueID), "");
            //旅游天数
            int txtDays = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(txt_Days.UniqueID), ""));

            if (txtDays == 0)
            {
                result = false;
                MessageBox.Show(this, "请填写旅游天数!");
                return;
            }
            //行程安排
            string Arrange = EyouSoft.Common.Utils.EditInputText(Request.Form[txt_Travel.UniqueID]);
            //服务标准
            string Standard = EyouSoft.Common.Utils.EditInputText(Request.Form[txt_Services.UniqueID]);
            //备注
            string Remarks = EyouSoft.Common.Utils.GetString(EyouSoft.Common.Utils.GetFormValue(txt_Remarks.UniqueID), "");

            //线路库业务逻辑类
            EyouSoft.BLL.RouteStructure.Route Route = new EyouSoft.BLL.RouteStructure.Route();

            //线路信息实体类
            EyouSoft.Model.RouteStructure.RouteInfo Routeinfo = new EyouSoft.Model.RouteStructure.RouteInfo();
            Routeinfo.AreaId    = LineTypeID;
            Routeinfo.RouteName = LineName;


            //快速发布团队专有信息实体类
            EyouSoft.Model.TourStructure.TourQuickPrivateInfo TourQuickPrivateInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo();
            TourQuickPrivateInfo.QuickPlan = Arrange;
            TourQuickPrivateInfo.Remark    = Remarks;
            TourQuickPrivateInfo.Service   = Standard;

            Routeinfo.RouteQuickInfo = TourQuickPrivateInfo;
            Routeinfo.RouteDepict    = LineDesCription;
            Routeinfo.RouteDays      = txtDays;

            //设置线路的发布类型
            Routeinfo.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick;

            //公司编号
            Routeinfo.CompanyId = SiteUserInfo.CompanyID;
            //当前登录人编号
            Routeinfo.OperatorId = SiteUserInfo.ID;
            //当前登录人姓名
            if (SiteUserInfo.ContactInfo != null)
            {
                Routeinfo.OperatorName = SiteUserInfo.ContactInfo.ContactName;
            }

            if (EyouSoft.Common.Utils.GetFormValue("filehid") == "dele")
            {
                Routeinfo.Attachs = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();
                //线路附件实体
                EyouSoft.Model.TourStructure.TourAttachInfo TourAttachInfo = new EyouSoft.Model.TourStructure.TourAttachInfo();
                TourAttachInfo.FilePath = "";
                TourAttachInfo.Name     = "";
                Routeinfo.Attachs.Add(TourAttachInfo);
            }

            //附件
            if (Request.Files.Count > 0)
            {
                Routeinfo.Attachs = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();
                //线路附件实体
                EyouSoft.Model.TourStructure.TourAttachInfo TourAttachInfo = new EyouSoft.Model.TourStructure.TourAttachInfo();
                //文件路径
                string filePath = string.Empty;
                //文件名
                string fileName = string.Empty;
                //文件上传
                if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["fileUpLoad"], "LineListFile", out filePath, out fileName))
                {
                    if (filePath.Trim() != "" && fileName.Trim() != "")
                    {
                        //设置文件上传后的虚拟路劲
                        TourAttachInfo.FilePath = filePath;
                        //保存原文件名
                        TourAttachInfo.Name = fileName;
                        Routeinfo.Attachs.Add(TourAttachInfo);
                    }
                    else
                    {
                        //设置文件上传后的虚拟路劲
                        TourAttachInfo.FilePath = "";
                        //保存原文件名
                        TourAttachInfo.Name = "";
                        Routeinfo.Attachs.Add(TourAttachInfo);
                    }
                }
            }

            string hidType = EyouSoft.Common.Utils.GetFormValue(this.hideType.UniqueID);

            #region 列表线路数据修改
            if (hidType == "update")
            {
                //线路编号
                int RouteId = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hidRouteid.UniqueID));
                Routeinfo.RouteId = RouteId;
            }
            #endregion

            #region 导航菜单线路数据修改
            if (hidType == "UpdateT")
            {
                //线路编号
                int RouteID = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hidRouteid.UniqueID));
                Routeinfo.RouteId = RouteID;
            }
            #endregion

            #region  制线路信息
            if (hidType == "Copy")
            {
                //线路编号
                int RouteID = EyouSoft.Common.Utils.GetInt(EyouSoft.Common.Utils.GetFormValue(this.hidRouteid.UniqueID));
                Routeinfo.RouteId = RouteID;
            }
            #endregion

            if (hidType == "Copy")
            {
                if (result)
                {
                    if (Route.InsertRouteInfo(Routeinfo) > 0)
                    {
                        MessageBox.ShowAndRedirect(this, "线路信息添加成功!", "/xianlu/LineProducts.aspx");
                    }
                    else
                    {
                        MessageBox.ShowAndRedirect(this, "线路信息添加失败!", "/xianlu/LineProducts.aspx");
                    }
                }
            }

            if (hidType == "update" || hidType == "UpdateT")
            {
                if (result)
                {
                    if (Route.UpdateRouteInfo(Routeinfo) > 0)
                    {
                        MessageBox.ShowAndRedirect(this, "线路信息修改成功!", "/xianlu/LineProducts.aspx");
                    }
                    else
                    {
                        MessageBox.ShowAndRedirect(this, "线路信息修改失败!", "/xianlu/LineProducts.aspx");
                    }
                }
            }
            #region 释放资源
            Route                = null;
            Routeinfo            = null;
            TourQuickPrivateInfo = null;
            #endregion
        }
Ejemplo n.º 15
0
        protected void OnSave()
        {
            bool result = true;

            //线路区域
            int lineTypeID = Utils.GetInt(Utils.GetString(Utils.GetFormValue(ddlLineType.UniqueID), ""));

            if (lineTypeID == 0)
            {
                result = false;
                MessageBox.Show(this, "请选择线路区域!");
                return;
            }
            //线路名称
            string lineName = Utils.GetString(Utils.GetFormValue(this.txt_LineName.Name), "");

            if (lineName == "")
            {
                result = false;
                MessageBox.Show(this, "请填写线路名称!");
                return;
            }
            //线路描述
            string Description = Utils.GetString(Utils.GetFormValue(this.txt_Description.UniqueID), "");
            //旅游天数
            int Days = Utils.GetInt(Utils.GetString(Utils.GetFormValue(this.txt_Days.UniqueID), ""));

            if (Days == 0)
            {
                result = false;
                MessageBox.Show(this, "请填写旅游天数!");
                return;
            }
            //不包含项目
            string ProjectNo = Utils.GetString(Utils.GetFormValue(this.txt_ProjectNo.UniqueID), "");
            //购物安排
            string ShoppingPlan = Utils.GetString(Utils.GetFormValue(this.txt_ShoppingPlan.UniqueID), "");
            //儿童安排
            string ChildrenPlan = Utils.GetString(Utils.GetFormValue(this.txt_ChildrenPlan.UniqueID), "");
            //自费项目
            string ExpenseProject = Utils.GetString(Utils.GetFormValue(this.txt_ExpenseProject.UniqueID), "");
            //注意事项
            string Notes = Utils.GetString(Utils.GetFormValue(this.txt_Notes.UniqueID), "");
            //温馨提示
            string reminder = Utils.GetString(Utils.GetFormValue(this.Txt_Reminder.UniqueID), "");
            //内部信息
            string Infromation = Utils.GetString(Utils.GetFormValue(this.Txt_Infromation.UniqueID), "");

            //线路库业务逻辑类
            EyouSoft.BLL.RouteStructure.Route Route = new EyouSoft.BLL.RouteStructure.Route();
            //线路基本信息实体类
            EyouSoft.Model.RouteStructure.RouteInfo Routeinfo = new EyouSoft.Model.RouteStructure.RouteInfo();
            Routeinfo.AreaId      = lineTypeID;
            Routeinfo.RouteName   = lineName;
            Routeinfo.RouteDepict = Description;
            Routeinfo.RouteDays   = Days;
            Routeinfo.Attachs     = new List <EyouSoft.Model.TourStructure.TourAttachInfo>();

            //标准发布团队行程信息业务实体
            Routeinfo.RouteNormalInfo = new EyouSoft.Model.TourStructure.TourNormalPrivateInfo();
            #region 获取行程信息
            Routeinfo.RouteNormalInfo.Plans        = this.xingcheng1.GetValues();
            Routeinfo.RouteNormalInfo.BuHanXiangMu = ProjectNo;
            Routeinfo.RouteNormalInfo.ErTongAnPai  = ChildrenPlan;
            Routeinfo.RouteNormalInfo.GouWuAnPai   = ShoppingPlan;
            Routeinfo.RouteNormalInfo.NeiBuXingXi  = Infromation;
            #endregion

            //包含项目
            Routeinfo.RouteNormalInfo.Services      = this.ConProjectControl1.GetDataList();
            Routeinfo.RouteNormalInfo.WenXinTiXing  = reminder;
            Routeinfo.RouteNormalInfo.ZhuYiShiXiang = Notes;
            Routeinfo.RouteNormalInfo.ZiFeiXIangMu  = ExpenseProject;

            //设置线路的发布类型
            Routeinfo.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal;

            //公司编号
            Routeinfo.CompanyId = SiteUserInfo.CompanyID;
            //当前操作员编号
            Routeinfo.OperatorId = SiteUserInfo.ID;
            //当前操作员姓名
            if (SiteUserInfo.ContactInfo != null)
            {
                Routeinfo.OperatorName = SiteUserInfo.ContactInfo.ContactName;
            }

            #region   附件
            //线路附件实体
            EyouSoft.Model.TourStructure.TourAttachInfo TourAttachInfo = new EyouSoft.Model.TourStructure.TourAttachInfo();
            //文件路径
            string filePath = string.Empty;
            //文件名
            string fileName = string.Empty;
            //文件上传
            if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["fileUpLoad"], "LineListFile", out filePath, out fileName))
            {
                if (filePath.Trim() != "" && fileName.Trim() != "")
                {
                    //设置文件上传后的虚拟路劲
                    TourAttachInfo.FilePath = filePath;
                    //保存原文件名
                    TourAttachInfo.Name = fileName;
                    Routeinfo.Attachs.Add(TourAttachInfo);
                }
            }
            else
            {
                //上传失败提示
                this.litMsg.Text = Utils.ShowMsg("文件上传失败!");
                return;
            }
            #endregion

            if (result)
            {
                if (Route.InsertRouteInfo(Routeinfo) > 0)
                {
                    MessageBox.ShowAndRedirect(this, "线路信息添加成功!", "/xianlu/LineProducts.aspx");
                }
                else
                {
                    MessageBox.ShowAndRedirect(this, "线路信息添加成功!", "/xianlu/Add_xl_Standard.aspx");
                }
            }
            Route     = null;
            Routeinfo = null;
        }