/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit(string id) { EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourBaseInfo baseModel = bll.GetTourInfo(id); if (baseModel != null && (baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.出境团队 || baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.地接团队 || baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.组团团队)) { EyouSoft.Model.TourStructure.MTourTeamInfo model = (EyouSoft.Model.TourStructure.MTourTeamInfo)baseModel; if (model.TourCode.Trim() != "") { this.lblTourCode.Text = model.TourCode; } BindAreaList(model.AreaId); this.hideRouteID.Value = model.RouteId; this.txt_RouteName.Text = model.RouteName; this.txt_Days.Text = model.TourDays.ToString(); this.UC_CustomerUnitSelect.CustomerUnitId = model.CompanyInfo != null ? model.CompanyInfo.CompanyId : ""; this.UC_CustomerUnitSelect.CustomerUnitName = model.CompanyInfo != null ? model.CompanyInfo.CompanyName : ""; this.txt_Contact.Text = model.CompanyInfo != null ? model.CompanyInfo.Contact : ""; this.txt_ConTel.Text = model.CompanyInfo != null ? model.CompanyInfo.Phone : ""; this.hideContactDeptId.Value = model.ContactDepartId; if (act == "copy") { this.SellsSelect1.SellsID = SiteUserInfo.UserId; this.SellsSelect1.SellsName = SiteUserInfo.Name; lblTourCode.Text = ""; } else { this.SellsSelect1.SellsID = model.SaleInfo.SellerId; this.SellsSelect1.SellsName = model.SaleInfo.Name; } this.txt_Adult.Text = model.Adults.ToString(); this.txt_Child.Text = model.Childs.ToString(); this.txtPlanContent.Text = model.PlanFeature; this.txtAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.AdultPrice); this.txtChildPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.txtOtherPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.OtherCost); this.txtSumPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SumPrice); this.txtQuoteRemark.Text = model.QuoteRemark; this.CountryID = model.CountryId.ToString(); this.ProvinceID = model.ProvinceId.ToString(); if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项) { this.ForeignQuote1.IsTourOrSubentry = false; this.ForeignQuote1.StandardTourList = model.TourTeamPrice; } else { this.ForeignQuote1.IsTourOrSubentry = true; this.ForeignQuote1.GroupService = model.TourService != null ? model.TourService.ServiceStandard : ""; } this.Journey1.SetPlanList = model.TourPlan; CostAccounting1.CostCalculation = model.CostCalculation; if (model.TourService != null) { CostAccounting1.NoNeedItem = model.TourService.NoNeedItem; CostAccounting1.ShoppingItem = model.TourService.ShoppingItem; CostAccounting1.ChildServiceItem = model.TourService.ChildServiceItem; CostAccounting1.OwnExpense = model.TourService.OwnExpense; CostAccounting1.NeedAttention = model.TourService.NeedAttention; CostAccounting1.WarmRemind = model.TourService.WarmRemind; CostAccounting1.InsiderInfor = model.TourService.InsiderInfor; } this.txtLDate.Text = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : ""; this.txtSuccesssStraffBegin.Text = model.LTraffic; this.txtSuccesssStraffEnd.Text = model.RTraffic; this.txtSuccessGather.Text = model.Gather; this.txtSuccessAddPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SaleAddCost); this.txtSuccessAddPriceRemark.Text = model.AddCostRemark; this.txtSuccessReducePrice.Text = Utils.FilterEndOfTheZeroDecimal(model.SaleReduceCost); this.txtSuccessReducePriceRemark.Text = model.ReduceCostRemark; this.txtSuccessGuideIncome.Text = Utils.FilterEndOfTheZeroDecimal(model.GuideIncome); this.lblSuccessSalerIncome.Text = Utils.FilterEndOfTheZeroDecimal(model.SalerIncome); this.txtSuccessOrderRemark.Text = model.OrderRemark; if (act != "copy") { txtHeTongHao.HeTongId = model.HeTongId; txtHeTongHao.HeTongCode = model.HeTongCode; } //签证附件 if (model.VisaFileList != null && model.VisaFileList.Count > 0) { string visaStr = string.Empty; for (int i = 0; i < model.VisaFileList.Count; i++) { visaStr += "<span class='upload_filename'> <a href='" + model.VisaFileList[i].FilePath + "' target='_blank'>" + model.VisaFileList[i].Name + "</a><a href='javascript:void(0);' onclick='AddTeamPlan.RemoveVisaFile(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideVisaFile' value='" + model.VisaFileList[i].Name + "|" + model.VisaFileList[i].FilePath + "|" + model.VisaFileList[i].Downloads.ToString() + "'>;</span>"; } this.lblVisaFiles.Text = visaStr; } switch (model.TourType) { case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队: case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队: this.phdTravelControlS.Visible = false; this.TravelControl1.SetTravelList = model.Traveller; break; case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队: this.phdTravelControl.Visible = false; this.TravelControlS1.SetTravelList = model.Traveller; break; } #region 修改控制 this.phdSave.Visible = false; if (model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调未接收 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.计调配置完毕 || model.TourStatus == EyouSoft.Model.EnumType.TourStructure.TourStatus.资金超限 ) { this.phdSave.Visible = true; } if (act == "copy") { this.phdSave.Visible = true; } //按钮权限控制 BtnPowerControl(); //是否可以操作该数据 if (!SiteUserInfo.IsHandleElse && act != "copy") { if (model.OperatorInfo != null && model.OperatorInfo.OperatorId != SiteUserInfo.UserId && model.SaleInfo != null && model.SaleInfo.SellerId != SiteUserInfo.UserId) { this.phdSave.Visible = false; } } #endregion #region 变更控制 if (model.TourStatus != EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划) { this.hideIsChangeInput.Value = "true"; } else { this.hideIsChangeInput.Value = "false"; } #endregion switch (model.TourStatus) { case EyouSoft.Model.EnumType.TourStructure.TourStatus.垫付申请: this.hideOverrunState.Value = "3"; break; case EyouSoft.Model.EnumType.TourStructure.TourStatus.审核失败: this.hideOverrunState.Value = "4"; break; } } else { Utils.ResponseGoBack(); } }
/// <summary> /// 保存新的报价 /// </summary> /// <returns></returns> private string PageSave() { string msg = string.Empty; int type = Utils.GetInt(Utils.GetQueryStringValue("type")); #region 获取表单 //线路区域编号 int areaID = Utils.GetInt(Utils.GetFormValue("sltArea")); //线路编号 string routeID = Utils.GetFormValue(this.hideRouteID.UniqueID); //线路名称 string routeName = Utils.GetFormValue(this.txt_RouteName.UniqueID); //天数 int days = Utils.GetInt(Utils.GetFormValue(this.txt_Days.UniqueID)); //客源地 国家 int contryID = Utils.GetInt(Utils.GetFormValue("sltCountry")); //客源地 省份 int provinceID = Utils.GetInt(Utils.GetFormValue("sltProvince")); //询价单位 编号 string buyCompanyID = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHBH); //询价单位 名称 string buyCompanyName = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHMC); //联系人 string contactName = Utils.GetFormValue(this.txt_Contact.UniqueID); //联系电话 string contactTel = Utils.GetFormValue(this.txt_ConTel.UniqueID); //联系人部门编号 string contactDepartId = Utils.GetFormValue(this.hideContactDeptId.UniqueID); //销售员编号 string sellsID = Utils.GetFormValue(this.SellsSelect1.SellsIDClient); //销售员名称 string sellsName = Utils.GetFormValue(this.SellsSelect1.SellsNameClient); //报价员 取当前登录用户 EyouSoft.Model.TourStructure.MOperatorInfo operatorModel = new EyouSoft.Model.TourStructure.MOperatorInfo(); operatorModel.OperatorId = this.SiteUserInfo.UserId; operatorModel.Name = this.SiteUserInfo.Name; operatorModel.Phone = this.SiteUserInfo.Telephone; //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txt_Adult.UniqueID)); //成人价格 decimal adultPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtAdultPrice.UniqueID)); //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txt_Child.UniqueID)); //儿童价格 decimal childPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtChildPrice.UniqueID)); //其它价格 decimal otherPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtOtherPrice.UniqueID)); //行程特色 string planContent = Utils.EditInputText(Request.Form[this.txtPlanContent.UniqueID]); //价格备注 string quoteRemark = Utils.GetFormValue(this.txtQuoteRemark.UniqueID); //合计金额 decimal sumPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSumPrice.UniqueID)); //签字资料(附件) #region 表单获取 //出团时间 DateTime successDateBegin = Utils.GetDateTime(Utils.GetFormValue(this.txtLDate.UniqueID), DateTime.Now); //出发交通 string successsStraffBegin = Utils.GetFormValue(this.txtSuccesssStraffBegin.UniqueID); //返回交通 string successsStraffEnd = Utils.GetFormValue(this.txtSuccesssStraffEnd.UniqueID); //集合方式 string successGather = Utils.GetFormValue(this.txtSuccessGather.UniqueID); //增加费用 decimal successAddPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessAddPrice.UniqueID), 0); //增加费用备注 string successAddPriceRemark = Utils.GetFormValue(this.txtSuccessAddPriceRemark.UniqueID); //减少费用 decimal successReducePrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessReducePrice.UniqueID)); //减少费用备注 string successReducePriceRemark = Utils.GetFormValue(this.txtSuccessReducePriceRemark.UniqueID); //导游现收 decimal successGuideIncome = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessGuideIncome.UniqueID)); //订单备注 string successOrderRemark = Utils.GetFormValue(this.txtSuccessOrderRemark.UniqueID); #region 超限申请表单获取 //垫付金额 decimal applyPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtApplyPrice.UniqueID)); //超限备注 string applyRemarks = Utils.GetFormValue(this.txtApplyRemarks.UniqueID); //申请人编号 string applyManID = this.SiteUserInfo.UserId; //申请日期 DateTime applyDateTime = DateTime.Now; #endregion //变更标题 string changeTitle = Utils.GetFormValue("txt_ChangeTitle"); //变更备注 string changeRemark = Utils.GetFormValue("txt_ChangeRemark"); //签证附件(新) string[] visaUpload = Utils.GetFormValues(this.UploadControl1.ClientHideID); string[] oldVisaUpload = Utils.GetFormValues("hideVisaFile"); #endregion #endregion //1=保存 string saveType = Utils.GetQueryStringValue("saveType"); #region 表单后台验证 if (areaID == 0) { msg = "请选择线路区域!"; } if (routeName == "") { msg += "<br />请输入线路名称!"; } if (days == 0) { msg += "<br />请输入天数!"; } if (buyCompanyID == "") { msg += "<br />请选择客户单位!"; } if (sellsID == "") { msg += "<br />请输入销售员!"; } if (adultCount == 0) { msg += "<br />请输入成人数!"; } if (adultPrice == 0) { msg += "<br />请输入成人价!"; } if (msg != "") { return("{\"result\":\"0\",\"msg\":\"" + msg + "\"}"); } #endregion EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourTeamInfo model = new EyouSoft.Model.TourStructure.MTourTeamInfo(); act = Utils.GetQueryStringValue("act"); if (act == "update") { model.TourId = Utils.GetQueryStringValue("id"); } model.AddCostRemark = successAddPriceRemark; model.AdultPrice = adultPrice; model.Adults = adultCount; model.AdvanceApp = null; model.AreaId = areaID; //model.AreaName = ""; model.ChildPrice = childPrice; model.Childs = childCount; model.CompanyId = this.SiteUserInfo.CompanyId; model.CompanyInfo = new MCompanyInfo(); model.CompanyInfo.CompanyId = buyCompanyID; model.CompanyInfo.CompanyName = buyCompanyName; model.CompanyInfo.Contact = contactName; model.CompanyInfo.Phone = contactTel; model.ContactDepartId = contactDepartId; string costCalculation = string.Empty; EyouSoft.Model.TourStructure.MTourService tourService = UtilsCommons.GetTourService(out costCalculation); model.CostCalculation = costCalculation; model.CountryId = contryID; model.Gather = successGather; model.GuideIncome = successGuideIncome; model.LDate = successDateBegin; #region 签证附件 IList <EyouSoft.Model.ComStructure.MComAttach> visaList = null; if (visaUpload.Length > 0) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); for (int i = 0; i < visaUpload.Length; i++) { if (visaUpload[i].Trim() != "") { if (visaUpload[i].Split('|').Length > 1) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = 0; visaModel.FilePath = visaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.报价签证资料; visaModel.Name = visaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } } } if (oldVisaUpload.Length > 0) { if (visaList == null) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); } for (int i = 0; i < oldVisaUpload.Length; i++) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = Utils.GetInt(oldVisaUpload[i].Split('|')[2]); visaModel.FilePath = oldVisaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.计划签证资料; visaModel.Name = oldVisaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } model.VisaFileList = visaList; #endregion model.LTraffic = successsStraffBegin; model.OperatorInfo = new EyouSoft.Model.TourStructure.MOperatorInfo(); model.OperatorInfo.OperatorId = this.SiteUserInfo.UserId; model.OperatorInfo.Name = this.SiteUserInfo.Name; model.OperatorInfo.Phone = this.SiteUserInfo.Telephone; model.OrderRemark = successOrderRemark; model.OtherCost = otherPrice; Dictionary <string, object> quoteType = UtilsCommons.GetServiceType(); bool IsTourOrSubentry = (bool)quoteType["IsTourOrSubentry"]; if (IsTourOrSubentry) { //整团 tourService.ServiceStandard = quoteType["Service"].ToString(); model.OutQuoteType = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团; } else { //分项 model.TourTeamPrice = (IList <EyouSoft.Model.TourStructure.MTourTeamPrice>)quoteType["Service"]; model.OutQuoteType = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项; } model.PlanFeature = planContent; model.ProvinceId = provinceID; model.QuoteRemark = quoteRemark; model.ReduceCostRemark = successReducePriceRemark; model.RouteId = routeID; model.RouteName = routeName; model.RTraffic = successsStraffEnd; model.SaleAddCost = successAddPrice; model.TourChangeTitle = changeTitle; model.TourChangeContent = changeRemark; //获得销售员信息实体 EyouSoft.Model.ComStructure.MComUser sellsModel = new EyouSoft.BLL.ComStructure.BComUser().GetModel(sellsID, SiteUserInfo.CompanyId); if (sellsModel != null) { model.SaleInfo = new EyouSoft.Model.TourStructure.MSaleInfo(); model.SaleInfo.SellerId = sellsID; model.SaleInfo.Name = sellsName; model.SaleInfo.Phone = sellsModel.ContactMobile; model.SaleInfo.DeptId = sellsModel.DeptId; } model.SaleReduceCost = successReducePrice; model.SalerIncome = sumPrice - successGuideIncome; model.AdvanceApp = null; model.SumPrice = sumPrice; model.TourDays = days; model.TourPlan = UtilsCommons.GetPlanList(); model.TourService = tourService; #region 无需赋值 //model.PlanPeopleNumber //model.QuoteRemark //model.RealPeopleNumber //model.Review //model.ReviewTime //model.TourPlaner //model.TourPlanItem //model.TourPlanStatus //model.PeopleNumberLast //model.GuideList = null; //model.IsChange = false; //model.IsReview //model.IsSubmit //model.IsSure 列表 //model.LeavePeopleNumber #endregion model.HeTongCode = Utils.GetFormValue(txtHeTongHao.HeTongCodeClientID); model.HeTongId = Utils.GetFormValue(txtHeTongHao.HeTongIdClientID); //超限赋值 if (saveType == "2") { model.AdvanceApp = new EyouSoft.Model.TourStructure.MAdvanceApp(); model.AdvanceApp.Applier = this.SiteUserInfo.Name; model.AdvanceApp.ApplierId = this.SiteUserInfo.UserId; model.AdvanceApp.DisburseAmount = applyPrice; model.AdvanceApp.ApplyTime = applyDateTime; model.AdvanceApp.DeptId = this.SiteUserInfo.DeptId; model.AdvanceApp.Remark = applyRemarks; } //变更明细 switch (type) { case 1: model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.组团团队; model.Traveller = UtilsCommons.GetTravelList(); break; case 2: model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.地接团队; model.Traveller = UtilsCommons.GetTravelList(); break; case 3: model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.出境团队; model.Traveller = UtilsCommons.GetTravelListS(); break; } if (act == "add" || act == "copy") { model.TourStatus = EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划; int r = bll.AddTourTeam(model); switch (r) { case 0: msg = UtilsCommons.AjaxReturnJson("0", "新增计划 失败,请稍后再试!"); break; case 1: msg = UtilsCommons.AjaxReturnJson("1", "新增计划 成功,正在跳转.."); break; case 2: msg = UtilsCommons.AjaxReturnJson("1", "新增计划 成功,已提交垫付申请!"); break; case 3: msg = UtilsCommons.AjaxReturnJson("2", "操作成功! 销售员已超限,请收款或超限申请!", model.TourId); break; case 4: msg = UtilsCommons.AjaxReturnJson("2", "操作成功! 客户单位已超限,请收款或超限申请!", model.TourId); break; case 5: msg = UtilsCommons.AjaxReturnJson("2", "操作成功! 销售员和客户单位已超限,请收款或超限申请!", model.TourId); break; } } if (act == "update" && model.TourId != "") { model.UpdateTime = DateTime.Now; if (bll.UpdateTourTeam(model)) { msg = UtilsCommons.AjaxReturnJson("1", "修改计划 成功,正在跳转..", model.TourId); } else { msg = UtilsCommons.AjaxReturnJson("0", "修改计划 失败,请稍后再试!", model.TourId); } } return(msg); }
private void PageInit(string tourid, string quoteid, string type) { this.txtsourcename.Text = SiteUserInfo.CompanyName; /*this.txtname.Text = SiteUserInfo.Name; * this.txttel.Text = SiteUserInfo.Telephone; * this.txtfax.Text = SiteUserInfo.Fax;*/ //派团计划实体 if (!string.IsNullOrEmpty(tourid)) { EyouSoft.Model.TourStructure.MTourTeamInfo model = null; EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.EnumType.TourStructure.TourType tourtype = bll.GetTourType(tourid); switch (tourtype) { case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线: //跳转到散拼 EyouSoft.BLL.ComStructure.BComSetting bcom = new EyouSoft.BLL.ComStructure.BComSetting(); Response.Redirect(bcom.GetPrintUri(this.SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.散拼行程单) + "?tourId=" + tourid); break; case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务: this.TAll.Visible = false; this.TChildren.Visible = false; this.TNeedAttention.Visible = false; this.TNoService.Visible = false; this.TOption.Visible = false; this.TPlanFeature.Visible = false; this.TSelfProject.Visible = false; this.TService.Visible = false; this.TShopping.Visible = false; this.TTourPrice.Visible = false; this.TWarmRemind.Visible = false; return; } if (type == "") { model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetTourInfo(tourid); } else { model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetOldTourInfo(tourid, this.SiteUserInfo.CompanyId); } if (model != null) { this.lbTourCode.Text = model.TourCode; this.lbPeoNum.Text = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>"; this.lbAdultsNum.Text = model.Adults.ToString() + "人"; this.lbChildsNum.Text = model.Childs.ToString() + "人"; this.lbRouteName.Text = model.RouteName; if (model.CompanyInfo != null) { this.txtunitname.Text = model.CompanyInfo.CompanyName; this.txtunitContactname.Text = model.CompanyInfo.Contact; this.txtunittel.Text = model.CompanyInfo.Phone; } #region 行程 IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.TourPlan.OrderBy(m => m.Days).ToList(); if (planinfo != null && planinfo.Count > 0) { StringBuilder strAllDateInfo = new StringBuilder(); string Dinner = string.Empty;//包餐(早、中、晚) foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo) { if (Plan.Breakfast) { Dinner += "早、"; } if (Plan.Lunch) { Dinner += "中、"; } if (Plan.Supper) { Dinner += "晚、"; } string riQi = "第" + Plan.Days + "天 "; if (model.LDate.HasValue) { riQi += model.LDate.Value.AddDays(Plan.Days - 1).ToString("yyyy-MM-dd"); } strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>{0} {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", riQi, Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px"); Dinner = string.Empty; } this.lbtourplan.Text = strAllDateInfo.ToString(); } #endregion #region 线路特色 if (string.IsNullOrEmpty(model.PlanFeature)) { this.TPlanFeature.Visible = false; } else { this.lbPlanFeature.Text = model.PlanFeature; } #endregion #region 计划服务 if (model.TourService != null) { #region 务标准 /*if (string.IsNullOrEmpty(model.TourService.ServiceStandard)) * { * this.TService.Visible = false; * } * else * { * this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); * }*/ TService.Visible = false; #endregion #region 务不含 if (string.IsNullOrEmpty(model.TourService.NoNeedItem)) { this.TNoService.Visible = false; } else { this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem); } #endregion #region 购物安排 if (string.IsNullOrEmpty(model.TourService.ShoppingItem)) { this.TShopping.Visible = false; } else { this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem); } #endregion #region 儿童安排 if (string.IsNullOrEmpty(model.TourService.ChildServiceItem)) { this.TChildren.Visible = false; } else { this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem); } #endregion #region 自费项目 if (string.IsNullOrEmpty(model.TourService.OwnExpense)) { this.TSelfProject.Visible = false; } else { this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense); } #endregion #region 温馨提醒 if (string.IsNullOrEmpty(model.TourService.WarmRemind)) { this.TWarmRemind.Visible = false; } else { this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind); } #endregion #region 注意事项 if (string.IsNullOrEmpty(model.TourService.NeedAttention)) { this.TNeedAttention.Visible = false; } else { this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention); } #endregion } else { this.TPlanService.Visible = false; } #endregion #region 务标准 if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) { this.TOption.Visible = false; if (model.TourService != null) { this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); } } else { this.TAll.Visible = false; IList <MTourTeamPrice> TeamPrice = model.TourTeamPrice; StringBuilder strTeamPrice = new StringBuilder(); foreach (MTourTeamPrice teamprice in TeamPrice) { if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString())) { strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td align='center' width='13%'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString()); } } this.lboptionservice.Text = strTeamPrice.ToString(); } #endregion #region 团队报价 this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人"; this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人"; this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团"; this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SumPrice, ProviderToMoney); this.lbremark.Text = model.QuoteRemark; #endregion #region 销售员 if (model.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { this.txtname.Text = xiaoShouYuanInfo.ContactName; this.txttel.Text = xiaoShouYuanInfo.ContactTel; this.txtfax.Text = xiaoShouYuanInfo.ContactFax; } } #endregion } } else//团队报价实体 { EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = bll.GetQuoteInfo(quoteid); if (model != null) { this.lbRouteName.Text = model.RouteName; this.lbPeoNum.Text = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>"; this.lbAdultsNum.Text = model.Adults.ToString() + "人"; this.lbChildsNum.Text = model.Childs.ToString() + "人"; this.txtunitname.Text = model.BuyCompanyName; this.txtunitContactname.Text = model.Contact; this.txtunittel.Text = model.Phone; this.lbRouteName.Text = model.RouteName; #region 行程 IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.QuotePlan.OrderBy(m => m.Days).ToList(); if (planinfo != null && planinfo.Count > 0) { StringBuilder strAllDateInfo = new StringBuilder(); string Dinner = string.Empty;//包餐(早、中、晚) foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo) { if (Plan.Breakfast) { Dinner += "早、"; } if (Plan.Lunch) { Dinner += "中、"; } if (Plan.Supper) { Dinner += "晚、"; } strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>第{0}天 {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", Plan.Days.ToString(), Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px"); Dinner = string.Empty; } this.lbtourplan.Text = strAllDateInfo.ToString(); } #endregion #region 线路特色 if (string.IsNullOrEmpty(model.PlanFeature)) { this.TPlanFeature.Visible = false; } else { this.lbPlanFeature.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.PlanFeature); } #endregion #region 计划服务 if (model.TourService != null) { #region 务标准 if (string.IsNullOrEmpty(model.TourService.ServiceStandard)) { this.TService.Visible = false; } else { this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); } #endregion #region 务不含 if (string.IsNullOrEmpty(model.TourService.NoNeedItem)) { this.TNoService.Visible = false; } else { this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem); } #endregion #region 购物安排 if (string.IsNullOrEmpty(model.TourService.ShoppingItem)) { this.TShopping.Visible = false; } else { this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem); } #endregion #region 儿童安排 if (string.IsNullOrEmpty(model.TourService.ChildServiceItem)) { this.TChildren.Visible = false; } else { this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem); } #endregion #region 自费项目 if (string.IsNullOrEmpty(model.TourService.OwnExpense)) { this.TSelfProject.Visible = false; } else { this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense); } #endregion #region 温馨提醒 if (string.IsNullOrEmpty(model.TourService.WarmRemind)) { this.TWarmRemind.Visible = false; } else { this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind); } #endregion #region 注意事项 if (string.IsNullOrEmpty(model.TourService.NeedAttention)) { this.TNeedAttention.Visible = false; } else { this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention); } #endregion } else { this.TPlanService.Visible = false; } #endregion #region 务标准 if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) { this.TOption.Visible = false; this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard); } else { this.TAll.Visible = false; IList <MTourTeamPrice> TeamPrice = model.TourTeamPrice; StringBuilder strTeamPrice = new StringBuilder(); foreach (MTourTeamPrice teamprice in TeamPrice) { if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString())) { strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td width='13%' align='center'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString()); } } this.lboptionservice.Text = strTeamPrice.ToString(); } #endregion #region 团队报价 this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人"; this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人"; this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团"; this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.TotalPrice, ProviderToMoney); this.lbremark.Text = model.QuoteRemark; #endregion #region 销售员 if (model.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { this.txtname.Text = xiaoShouYuanInfo.ContactName; this.txttel.Text = xiaoShouYuanInfo.ContactTel; this.txtfax.Text = xiaoShouYuanInfo.ContactFax; } } #endregion } } }