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; }
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)); }
void Bind() { EyouSoft.BLL.RouteStructure.Route bll = new EyouSoft.BLL.RouteStructure.Route(SiteUserInfo); int count = 0; EyouSoft.Model.RouteStructure.RouteSearchInfo search = new EyouSoft.Model.RouteStructure.RouteSearchInfo(); if (Utils.GetQueryStringValue("xlid") != "") { search.AreaId = Utils.GetInt(Utils.GetQueryStringValue("xlid")); } search.RSDate = Utils.GetDateTimeNullable(Utils.GetFormValue(txt_date.UniqueID)); string xlname = Utils.GetFormValue(txt_xianluName.UniqueID); if (xlname != "") { search.RouteName = xlname; } IList <EyouSoft.Model.RouteStructure.RouteBaseInfo> list = new List <EyouSoft.Model.RouteStructure.RouteBaseInfo>(); if (Utils.GetQueryStringValue("publishtype") != "") { ///快速 if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 1) { list = bll.GetQuickRoutes(CurrentUserCompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search); } if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 2) { list = bll.GetNormalRoutes(CurrentUserCompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search); } if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 3) { list = bll.GetRoutes(CurrentUserCompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search); } if (Utils.GetInt(Utils.GetQueryStringValue("publishtype")) == 4) { list = bll.GetRoutes(SiteUserInfo.CompanyID, 20, EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1), ref count, search); } } rptList.DataSource = list; rptList.DataBind(); ExporPageInfoSelect1.intPageSize = 20; ExporPageInfoSelect1.intRecordCount = count; ExporPageInfoSelect1.PageLinkURL = Request.Path + "?"; ExporPageInfoSelect1.UrlParams = Request.QueryString; ExporPageInfoSelect1.CurrencyPage = EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1); }
/// <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)); }
protected void Dele(int[] Routeid) { bool IsTrue = false; EyouSoft.BLL.RouteStructure.Route Route = new EyouSoft.BLL.RouteStructure.Route(SiteUserInfo); if (Routeid.Length >= 0) { Route.Delete(Routeid); IsTrue = true; } if (IsTrue) { Response.Clear(); Response.Write("1"); Response.End(); } Route = null; }
/// <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(); } }
/// <summary> /// 绑定线路列表 /// </summary> protected void BindInitLineProducts(int?AreaID, string LineName, DateTime?StartTime, DateTime?EndTime, int?DateNumber, string Author) { EyouSoft.Model.RouteStructure.RouteSearchInfo ModelRouteSearch = new EyouSoft.Model.RouteStructure.RouteSearchInfo(); //线路区域编号 ModelRouteSearch.AreaId = AreaID; //线路名称 ModelRouteSearch.RouteName = LineName; //发布截止时间 ModelRouteSearch.REDate = EndTime; //线路天数 ModelRouteSearch.RouteDays = DateNumber; //发布起始时间 ModelRouteSearch.RSDate = StartTime; //发布人姓名 ModelRouteSearch.OperatorName = Author; //线路筛选 if (Request.QueryString["xlid"] != "" && Request.QueryString["xlid"] != null) { ModelRouteSearch.AreaId = Utils.GetInt(Utils.GetQueryStringValue("xlid")); } //线路库业务逻辑类 EyouSoft.BLL.RouteStructure.Route RouteList = new EyouSoft.BLL.RouteStructure.Route(SiteUserInfo); IList <EyouSoft.Model.RouteStructure.RouteBaseInfo> RouteLists = RouteList.GetRoutes(SiteUserInfo.CompanyID, PageSize, PageIndex, ref RecordCount, ModelRouteSearch); if (RouteLists != null && RouteLists.Count > 0) { this.LineProductList.DataSource = RouteLists; this.LineProductList.DataBind(); BinPage(); } else { this.LinePro_ExportPageInfo1.Visible = false; } RouteList = null; RouteLists = null; ModelRouteSearch = null; }
/// <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; } }
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; }
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, "线路信息修改失败!"); } } }
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); } } }
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"); }
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>"); } }
/// <summary> /// 提交事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtn_submit_Click(object sender, EventArgs e) { // DateTime date = DateTime.Parse(txt_date.Value); // string leg = txt_Leg.Value; // string gotime = txt_gotime.Value; // string backLeg = txt_backLeg.Value; // string backTime = txt_backTime.Value; // string company = ddl_Com.SelectedValue; // string PNG = txt_PNG.Value; // decimal PiaoKuang = decimal.Parse(txt_PiaoKuang.Value); // decimal dailifei = decimal.Parse( txt_DaiLiFei.Value); // int pepoleNum = int.Parse( txt_Pepole.Value ); // decimal sumPrice = decimal.Parse(txt_SumPrice.Value); // string Order = txt_Order.Value; // for (int i = 0; i < Utils.GetFormValues("txt_code").Length; i++) // { // //do something... // } EyouSoft.Model.TourStructure.TourBaseInfo mb = new EyouSoft.BLL.TourStructure.Tour().GetTourInfo(Utils.GetQueryStringValue("tourid")); if (mb != null) { if (!Utils.PlanIsUpdateOrDelete(mb.Status.ToString())) { Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>"); return; } } UserInfo userInfo = null; bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo); EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = new EyouSoft.Model.PlanStructure.TicketOutListInfo(); if (this.hideId.Value != "") { model = bll.GetTicketOutListModel(this.hideId.Value); } if (model != null) { model.CompanyID = cur_companyId; model.Notice = Utils.GetFormValue("txt_Order"); model.OperateID = userInfo.ID; model.Operator = userInfo.ContactInfo.ContactName; model.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValue("sel_paytype")); model.PNR = Utils.GetFormValue("txt_Pnr"); model.Remark = Utils.GetFormValue("textRemark"); model.State = EyouSoft.Model.EnumType.PlanStructure.TicketState.机票申请; model.TourId = this.hideTourId.Value; IList <EyouSoft.Model.PlanStructure.TicketFlight> ltf = new List <EyouSoft.Model.PlanStructure.TicketFlight>(); IList <EyouSoft.Model.PlanStructure.TicketKindInfo> ltki = new List <EyouSoft.Model.PlanStructure.TicketKindInfo>(); for (int i = 0; i < Utils.GetFormValues("txt_date").Length; i++) { EyouSoft.Model.PlanStructure.TicketFlight tf = new EyouSoft.Model.PlanStructure.TicketFlight(); tf.TicketTime = Utils.GetFormValues("txt_time")[i]; tf.AireLine = (EyouSoft.Model.EnumType.PlanStructure.FlightCompany)(Utils.GetInt(Utils.GetFormValues("sel_com")[i])); tf.DepartureTime = Utils.GetDateTime(Utils.GetFormValues("txt_date")[i]); tf.Discount = Utils.GetDecimal(Utils.GetFormValues("txt_Discount")[i]); tf.FligthSegment = Utils.GetFormValues("sel_Flight")[i]; ltf.Add(tf); } ////成人票款 EyouSoft.Model.PlanStructure.TicketKindInfo tki = new EyouSoft.Model.PlanStructure.TicketKindInfo(); tki.OilFee = Utils.GetDecimal(Utils.GetFormValue("txt_shui")); tki.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum")); tki.Price = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia")); tki.TotalMoney = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan")); tki.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.成人; if (config_Agency.HasValue && EyouSoft.Model.EnumType.CompanyStructure.AgencyFeeType.公式三 == config_Agency.Value) { tki.OtherPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei")); tki.Discount = Utils.GetDecimal(Utils.GetFormValue("txt_Percent"), 100) / 100; tki.AgencyPrice = 0; } else { tki.OtherPrice = 0; tki.Discount = 1; tki.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei")); } ltki.Add(tki); ///////儿童票款 EyouSoft.Model.PlanStructure.TicketKindInfo tkirt = new EyouSoft.Model.PlanStructure.TicketKindInfo(); tkirt.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2")); tkirt.OilFee = Utils.GetDecimal(Utils.GetFormValue("txt_shui2")); tkirt.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum2")); tkirt.Price = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia2")); tkirt.TotalMoney = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan2")); tkirt.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.儿童; tkirt.OtherPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2")); tkirt.Discount = Utils.GetDecimal(Utils.GetFormValue("txt_Percent2"), 100) / 100; ltki.Add(tkirt); //// model.Total = Utils.GetDecimal(Utils.GetFormValue("txt_SumPrice")); model.TicketKindInfoList = ltki; model.TicketFlightList = ltf; EyouSoft.BLL.RouteStructure.Route routbll = new EyouSoft.BLL.RouteStructure.Route(userInfo); EyouSoft.BLL.TourStructure.Tour tourbll = new EyouSoft.BLL.TourStructure.Tour(userInfo); model.RouteName = tourbll.GetTourInfo(Utils.GetQueryStringValue("tourId")).RouteName; IList <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo> listorder = new List <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo>(); if (Utils.GetFormValues("chk_md").Length == 0) { Utils.Show("请选择游客!"); return; } IList <EyouSoft.Model.TourStructure.TourOrderCustomer> listcus = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>(); //for (int i = 0; i < Utils.GetFormValues("chk_md").Length; i++) //{ // EyouSoft.Model.PlanStructure.TicketOutCustomerInfo m = new EyouSoft.Model.PlanStructure.TicketOutCustomerInfo(); // EyouSoft.Model.TourStructure.TourOrderCustomer c = new EyouSoft.Model.TourStructure.TourOrderCustomer(); // c.ID = Utils.GetFormValues("chk_md")[i]; // c.VisitorName = Utils.GetFormValues("txt_name")[i]; // c.CradType = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(Utils.GetFormValues("sel_cred")[i]); // c.CradNumber = Utils.GetFormValues("txt_code")[i]; // m.UserId = Utils.GetFormValues("chk_md")[i]; // listorder.Add(m); // listcus.Add(c); //} for (int i = 0; i < Utils.GetFormValues("chk_md").Length; i++) { EyouSoft.Model.PlanStructure.TicketOutCustomerInfo m = new EyouSoft.Model.PlanStructure.TicketOutCustomerInfo(); EyouSoft.Model.TourStructure.TourOrderCustomer c = new EyouSoft.Model.TourStructure.TourOrderCustomer(); c.ID = Utils.GetFormValues("chk_md")[i]; for (int j = 0; j < Utils.GetFormValues("txt_name").Length; j++) { if (c.ID == Utils.GetFormValues("hd_uid")[j]) { c.VisitorName = Utils.GetFormValues("txt_name")[j]; c.CradType = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(Utils.GetFormValues("sel_cred")[j]); c.CradNumber = Utils.GetFormValues("txt_code")[j]; break; } } m.UserId = Utils.GetFormValues("chk_md")[i]; listorder.Add(m); listcus.Add(c); } model.CustomerInfoList = listcus; model.TicketOutCustomerInfoList = listorder; //if (Utils.GetInt(Utils.GetQueryStringValue("type")) == 1) //{ // ///散拼计划机票计调 // model.TicketType = EyouSoft.Model.EnumType.PlanStructure.TicketType.订单申请机票; //} //else //{ ///团队计划机票计调 model.TicketType = EyouSoft.Model.EnumType.PlanStructure.TicketType.团队申请机票; //} //model.TicketOutId = "0"; model.RegisterOperatorId = userInfo.ID; //售票处 model.TicketOffice = this.txtSalePlace.Value; model.TicketOfficeId = Utils.GetInt(this.hd_PiaoWuSuppId.Value); if (this.hideId.Value != "") { //修改 model.TicketOutId = this.hideId.Value; if (bll.UpdateTicketOutListModel(model)) { Utils.ShowAndRedirect("修改成功!", Request.Url.ToString()); } else { Utils.ShowAndRedirect("修改失败!", Request.Url.ToString()); } } else { //添加 if (bll.addTicketOutListModel(model)) { Utils.ShowAndRedirect("添加成功!", Request.Url.ToString()); } else { Utils.ShowAndRedirect("添加失败!", Request.Url.ToString()); } } } }
protected void LinkButton2_Click(object sender, EventArgs e) { BllQuote = new EyouSoft.BLL.RouteStructure.Quote(); ModelRouteTeaminfo = new EyouSoft.Model.RouteStructure.QuoteTeamInfo(); #region 提交报价信息 SetQuoteTeamValues(); #endregion #region 报价写入团队计划 EyouSoft.BLL.TourStructure.Tour Tour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourTeamInfo TourInfo = new EyouSoft.Model.TourStructure.TourTeamInfo(); //计调员信息实体 TourInfo.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo(); //计调员编号 TourInfo.Coordinator.CoordinatorId = Utils.GetInt(Request.Form[ddl_Oprator.UniqueID]); //预计出团时间 if (Utils.GetDateTimeNullable(Utils.GetFormValue(this.Txt_GroupStarTime.UniqueID)) == null) { SetErrorMsg(false, "请填写预计出团时间!"); return; } TourInfo.LDate = Convert.ToDateTime(Utils.GetString(Utils.GetFormValue(this.Txt_GroupStarTime.UniqueID), "")); //人数 if (Utils.GetInt(Utils.GetFormValue(this.Txt_Numbers.UniqueID.Trim())) <= 0) { SetErrorMsg(false, "请填写大于0的整数!"); return; } else { TourInfo.PlanPeopleNumber = Utils.GetInt(Utils.GetFormValue(this.Txt_Numbers.UniqueID.Trim())); } //我社报价总金额 TourInfo.TotalAmount = this.PriceControl1.TotalAmount; //报价发布时间 TourInfo.CreateTime = System.DateTime.Now; if (new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(SiteUserInfo.CompanyID) == EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.PartNumber) { TourInfo.TourTeamUnit = new EyouSoft.Model.TourStructure.MTourTeamUnitInfo() { NumberCr = TourInfo.PlanPeopleNumber, NumberEt = 0, NumberQp = 0, UnitAmountCr = 0, UnitAmountEt = 0, UnitAmountQp = 0 }; } else { TourInfo.TourTeamUnit = null; } TourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.团队计划; int RouteID = Utils.GetInt(Request.QueryString["RouteId"]); var routeinfo = new EyouSoft.BLL.RouteStructure.Route().GetRouteInfo(RouteID); if (routeinfo != null) { TourInfo.ReleaseType = routeinfo.ReleaseType; TourInfo.AreaId = routeinfo.AreaId; TourInfo.RouteName = routeinfo.RouteName; TourInfo.CompanyId = SiteUserInfo.CompanyID; TourInfo.OperatorId = SiteUserInfo.ID; TourInfo.SellerId = SiteUserInfo.ID; TourInfo.RouteId = RouteID; TourInfo.BuyerCId = Utils.GetInt(Utils.GetFormValue(this.hidCustId.UniqueID)); TourInfo.BuyerCName = Utils.GetFormValue(this.Txt_Inquiry.UniqueID); //线路天数 TourInfo.TourDays = routeinfo.RouteDays; //团号 TourInfo.TourCode = TourCode.Value; //价格组成 TourInfo.Services = this.PriceControl1.GetList; if (TourInfo.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { TourInfo.TourQuickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo() { Remark = routeinfo.RouteQuickInfo.Remark, QuickPlan = routeinfo.RouteQuickInfo.QuickPlan, Service = routeinfo.RouteQuickInfo.Service }; } else { TourInfo.TourNormalInfo = new EyouSoft.Model.TourStructure.TourTeamNormalPrivateInfo(); TourInfo.TourNormalInfo.Plans = routeinfo.RouteNormalInfo.Plans; TourInfo.TourNormalInfo.BuHanXiangMu = routeinfo.RouteNormalInfo.BuHanXiangMu; TourInfo.TourNormalInfo.ErTongAnPai = routeinfo.RouteNormalInfo.ErTongAnPai; TourInfo.TourNormalInfo.GouWuAnPai = routeinfo.RouteNormalInfo.GouWuAnPai; TourInfo.TourNormalInfo.NeiBuXingXi = routeinfo.RouteNormalInfo.NeiBuXingXi; TourInfo.TourNormalInfo.Plans = routeinfo.RouteNormalInfo.Plans; TourInfo.TourNormalInfo.WenXinTiXing = routeinfo.RouteNormalInfo.WenXinTiXing; TourInfo.TourNormalInfo.ZhuYiShiXiang = routeinfo.RouteNormalInfo.ZhuYiShiXiang; TourInfo.TourNormalInfo.ZiFeiXIangMu = routeinfo.RouteNormalInfo.ZiFeiXIangMu; } } if (Utils.GetFormValue(this.hideType.UniqueID) == "update") { //报价编号 ModelRouteTeaminfo.QuoteId = Utils.GetInt(Utils.GetQueryStringValue("QuoteID")); int QuoteID = BllQuote.UpdateTourTeamQuote(ModelRouteTeaminfo); if (QuoteID > 0) { TourInfo.QuoteId = QuoteID; if (Tour.InsertTeamTourInfo(TourInfo) > 0) { Utils.ShowAndRedirect("报价信息提交成功!", "/xianlu/Quote.aspx?RouteID=" + Utils.GetQueryStringValue("RouteId") + "&Areaid=" + Utils.GetQueryStringValue("Areaid")); } } else { Utils.ShowAndRedirect("报价信息提交失败!", "/xianlu/Quote.aspx?RouteID=" + Utils.GetQueryStringValue("RouteId") + "&Areaid=" + Utils.GetQueryStringValue("Areaid")); } } else { int QuoteId = BllQuote.InsertTourTeamQuote(ModelRouteTeaminfo); if (QuoteId > 0) { TourInfo.QuoteId = QuoteId; int insertTourResult = Tour.InsertTeamTourInfo(TourInfo); if (insertTourResult > 0) { //提示报价完成操作成功 Utils.ShowAndRedirect("报价完成操作成功!", "/xianlu/Quote.aspx?areaid=" + Utils.GetQueryStringValue("areaid") + "&RouteID=" + Utils.GetQueryStringValue("RouteId")); } } else { //提示报价完成操作失败 Utils.ShowAndRedirect("报价完成操作失败!", "/xianlu/Quote.aspx?areaid=" + Utils.GetQueryStringValue("areaid") + "&RouteID=" + Utils.GetQueryStringValue("RouteId")); } } #endregion }
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; }
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 }