protected void Page_Load(object sender, EventArgs e) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明散拼计划对象 EyouSoft.Model.TourStructure.TourBaseInfo tModel = bll.GetTourInfo(Utils.GetQueryStringValue("tourId")); if (tModel != null) { if (tModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)tModel; Bind(model); } else { EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)tModel; Bind(model); } } else { Response.Clear(); Response.Write("未找到信息!"); Response.End(); } }
/// <summary> /// 绑定列表 /// </summary> void Bind() { txt_teamName.Value = ""; txt_teamNum.Value = ""; txt_teamStatus.Value = ""; txt_teamTraffic.Value = ""; txt_PaidMoney.Value = ""; string tourId = Utils.GetQueryStringValue("tourId"); EyouSoft.BLL.PlanStruture.TravelAgency bll = new EyouSoft.BLL.PlanStruture.TravelAgency(); EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourBaseInfo info = tour.GetTourInfo(tourId); txt_teamNum.Value = info.TourCode; txt_teamName.Value = info.RouteName; txt_teamStatus.Value = info.Status.ToString(); txt_teamTraffic.Value = Utils.FilterEndOfTheZeroDecimal(info.TotalExpenses); //txt_PaidMoney .Value=Utils.FilterEndOfTheZeroDecimal(info. //lt_seller.Text = info.SellerName; //lt_actor.Text = info.OperatorId.ToString(); EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); EyouSoft.Model.TourStructure.TourOrder ordermodel = new EyouSoft.Model.TourStructure.TourOrder(); IList <EyouSoft.Model.StatisticStructure.StatisticOperator> listSeller = orderbll.GetSalerInfo(tourId); IList <string> listOprator = tour.GetTourCoordinators(tourId); string sellers = ""; string oprator = ""; foreach (var v in listSeller) { sellers += v.OperatorName + ","; } if (sellers.Length > 0) { sellers = sellers.TrimEnd(','); } foreach (var v in listOprator) { oprator += v + ","; } if (oprator.Length > 0) { oprator = oprator.TrimEnd(','); } lt_seller.Text = sellers; lt_actor.Text = oprator; IList <EyouSoft.Model.PlanStructure.PaymentList> list = bll.GetSettleList(tourId); IList <EyouSoft.Model.PlanStructure.PaymentList> listPiaowu = list.Where(x => x.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.票务).ToList(); IList <EyouSoft.Model.PlanStructure.PaymentList> listDiJie = list.Where(x => x.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接).ToList(); rpt_dijie.DataSource = listDiJie; rpt_piaowu.DataSource = listPiaowu; rpt_dijie.DataBind(); rpt_piaowu.DataBind(); }
/// <summary> /// 绑定客户等级 /// </summary> void BindCustomers() { //List<Customers> list = new List<Customers>(); //list.Add(new Customers(3, "客户等级")); //rpt_Customer.DataSource = list; //rpt_Customer.DataBind(); EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourInfo binfo = new EyouSoft.Model.TourStructure.TourInfo(); binfo = (EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(Request.QueryString["tourId"]); EyouSoft.BLL.TourStructure.Tour bl = new EyouSoft.BLL.TourStructure.Tour(); IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = binfo.PriceStandards; IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> listCust = listStand.First().CustomerLevels; IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>(); EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand(); list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID); int kkk = list.Count; IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = binfo.PriceStandards; for (int i = 0; i < listStand.Count; i++) { for (int j = 0; j < list.Count; j++) { //if(listStand[i].CustomerLevels[i].LevelId == list.sel) if (listStand[i].CustomerLevels.Count > j) { var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault(); if (vn != null) { listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName; } else { listStand[i].CustomerLevels.RemoveAt(j); } } var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault(); if (xn == null) { listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo() { LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0 }); } } } sinfo = plist; }
/// <summary> /// 判断是否有传值 /// </summary> protected void InitRouteInfo() { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourTeamInfo tourInfo = bll.GetTourInfo(tourId) as EyouSoft.Model.TourStructure.TourTeamInfo; if (tourInfo == null) { Response.Clear(); Response.Write("未找到信息"); Response.End(); } }
protected void BindAreaInfo() { //计划中心业务逻辑类 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); //计划团队信息实体类 string TourId = Utils.GetQueryStringValue("tourId"); if (TourId != null && TourId != "") { model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(TourId); if (model != null) { this.lt_xianluName.Text = model.RouteName; this.lt_teamCode.Text = model.TourCode; this.lt_startDate.Text = model.LDate.ToShortDateString(); this.lt_shengyu.Text = (model.PlanPeopleNumber - model.VirtualPeopleNumber).ToString(); //计调员 this.litCoordinatorId.Text = model.Coordinator.Name.ToString(); //计调员编号 this.hidCoordinatorId.Value = model.Coordinator.CoordinatorId.ToString(); #region 线路区域 int Areaid = model.AreaId; EyouSoft.BLL.CompanyStructure.Area AreaBll = new EyouSoft.BLL.CompanyStructure.Area(); EyouSoft.Model.CompanyStructure.Area Area = new EyouSoft.Model.CompanyStructure.Area(); Area = AreaBll.GetModel(Areaid); //计调员 if (Area != null) { this.Area.Text = Area.AreaName; } #endregion //销售员 EyouSoft.Model.CompanyStructure.CustomerInfo Customer = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(SiteUserInfo.TourCompany.TourCompanyId); if (Customer != null) { this.litseller.Text = Customer.Saler; } } } //初始化联系人 this.txtContactName.Text = SiteUserInfo.ContactInfo.ContactName; //电话 this.txtContactPhone.Text = SiteUserInfo.ContactInfo.ContactTel; //手机 this.txtContactMobile.Text = SiteUserInfo.ContactInfo.ContactMobile; //传真 this.txtContactFax.Text = SiteUserInfo.ContactInfo.ContactFax; }
//同意留位 protected void btnYes_Click(object sender, EventArgs e) { //点同意留位,状态为已留位 EyouSoft.BLL.CompanyStructure.CompanySetting setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); EyouSoft.Model.CompanyStructure.CompanyFieldSetting setModel = setBll.GetSetting(SiteUserInfo.CompanyID); //留位时间 DateTime seatDate = Utils.GetDateTime(txtEndTime.Text); if (setModel != null) { if (seatDate != DateTime.MinValue) { if (seatDate > DateTime.Now.AddMinutes(Convert.ToDouble(setModel.ReservationTime))) { printFaiMsg(string.Format("留位时间最长到{0}", DateTime.Now.AddMinutes(setModel.ReservationTime))); return; } } else { printFaiMsg("留位时间输入错误!"); return; } } EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); string TourId = Utils.GetQueryStringValue("tourId"); model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(TourId); #region 提交财务后不允许操作 by txb 6.17 if (model != null) { if (!Utils.PlanIsUpdateOrDelete(model.Status.ToString())) { Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>"); return; } } #endregion if (model != null) { //EyouSoft.Model.EnumType.TourStructure.OrderState.已留位 Save(false, seatDate); } bll = null; model = null; }
/// <summary> /// 初始化线路信息 /// </summary> protected void InitRouteInfo() { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourInfo tourInfo = bll.GetTourInfo(tourId) as EyouSoft.Model.TourStructure.TourInfo; if (tourInfo == null) { Response.Clear(); Response.Write("未找到信息"); Response.End(); } ltrTourNumber.Text = tourInfo.TourCode; ltrRouteName.Text = tourInfo.RouteName; ltrDays.Text = tourInfo.TourDays.ToString(); }
/// <summary> /// 页面初始化方法 /// </summary> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo tourModel = tourBll.GetTourInfo(tourId); //声明bll对象 EyouSoft.BLL.CompanyStructure.CompanySetting bll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //声明保存打印URL 的集合 IList <PrintUrlModel> list = new List <PrintUrlModel>(); //声明临时对象 用来保存url 和显示文字 PrintUrlModel model = null; //判断该计划是散拼计划 if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { //团队计划打印名单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.组团线路打印名单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.组团线路打印名单.ToString(); list.Add(model); //行程单 if (tourModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { //散拼计划快速发布行程单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.组团线路快速发布行程单); model.ShowText = "组团线路行程单"; list.Add(model); } else { //散拼计划标准版发布行程单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.组团线路标准发布行程单); model.ShowText = "组团线路行程单"; list.Add(model); } } if (list != null && list.Count > 0) { this.rptUPrintUrl.DataSource = list; this.rptUPrintUrl.DataBind(); } }
protected string GetPrintUrl(string tourId) { string Url = string.Empty; //声明bll对象 EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo tourModel = tourBll.GetTourInfo(tourId); //声明bll对象 EyouSoft.BLL.CompanyStructure.CompanySetting bll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //判断该计划是团队计划 if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)tourModel; //行程单 if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { //团队计划快速发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划快速发布行程单); } else { //团队计划标准版发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划标准发布行程单); } } //判断该计划是散拼计划 if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo teamModel = (EyouSoft.Model.TourStructure.TourInfo)tourModel; if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { //散拼计划快速发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划标准发布行程单); } if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { //散拼计划标准发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划快速发布行程单); } } return(Url); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string tourId = Utils.GetQueryStringValue("tourId"); if (tourId != "") { DataInit(tourId); } } string type = Utils.GetQueryStringValue("type"); if (type == "save") { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); string tourId = Utils.GetFormValue(this.hideTourID.UniqueID); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null) { string txtNumFrist = Utils.GetFormValue(txtNum1.UniqueID); string txtNumSecound = Utils.GetFormValue(txtNum2.UniqueID); string txtNumThird = Utils.GetFormValue(txtNum3.UniqueID); string txtNumFourth = Utils.GetFormValue(txtNum4.UniqueID); IList <string> list = new List <string>(); list.Add(txtNumFrist); list.Add(txtNumSecound); list.Add(txtNumThird); bool result = bll.SetTourGuides(tourId, list, txtNumFourth); Response.Clear(); if (result) { Response.Write("Ok"); } else { Response.Write("Nk"); } Response.End(); } } }
/// <summary> /// 绑定线路信息 /// </summary> void BindXlInfo() { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(Request.QueryString["tourId"]); if (model != null) { lt_xianluName.Text = model.RouteName; lt_teamName.Text = model.TourCode; lt_startDate.Text = model.LDate.ToShortDateString(); hid_StartDate.Value = model.LDate.ToShortDateString(); lt_startBus.Text = model.LTraffic; lt_backBus.Text = model.RTraffic; //lt_shengyu.Text = (model.PlanPeopleNumber - model.PeopleNumberShiShou).ToString();//-model.PeopleNumberWeiChuLi-model.PeopleNumberLiuWei).ToString(); lbshengyu.Text = (model.PlanPeopleNumber - model.PeopleNumberShiShou).ToString(); lt_phone.Text = SiteUserInfo.ContactInfo.ContactTel; lb_username.Text = SiteUserInfo.ContactInfo.ContactName; lt_tel.Text = SiteUserInfo.ContactInfo.ContactMobile; lt_fax.Text = SiteUserInfo.ContactInfo.ContactFax; //lt_seller.Text = model.SellerName; lt_oprator.Text = model.Coordinator.Name; } }
/// <summary> /// 申请机票 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool addTicketOutListModel(TicketOutListInfo model) { if (string.IsNullOrEmpty(model.TourId)) { return(false); } model.State = EyouSoft.Model.EnumType.PlanStructure.TicketState.机票申请; model.TicketOutId = Guid.NewGuid().ToString(); EyouSoft.BLL.TourStructure.Tour bllTour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourBaseInfo modelTour = bllTour.GetTourInfo(model.TourId); if (modelTour != null) { model.Saler = modelTour.SellerName; } if (dal.addTicketOutListModel(model)) { //重新计算团队支出 EyouSoft.BLL.UtilityStructure.Utility u = new EyouSoft.BLL.UtilityStructure.Utility(); IList <EyouSoft.Model.StatisticStructure.ItemIdAndType> iList = new List <EyouSoft.Model.StatisticStructure.ItemIdAndType>(); iList.Add(new EyouSoft.Model.StatisticStructure.ItemIdAndType() { ItemId = model.TicketOutId, ItemType = EyouSoft.Model.EnumType.StatisticStructure.PaidType.机票支出 }); //价格维护 u.CalculationTourOut(model.TourId, iList); u.CalculationTourSettleStatus(model.TourId); //加日志 AddSysLog("新增"); //维护团队状态 EyouSoft.BLL.TourStructure.Tour tourDal = new EyouSoft.BLL.TourStructure.Tour(); tourDal.SetTourTicketStatus(model.TourId, model.State); return(true); } return(false); }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string travelId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(null, false); //声明团队计划对象 EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(travelId); if (model != null) { //线路名称 this.lblAreaName.Text = model.RouteName; //团号 this.lblTeamNum.Text = model.TourCode; this.lblTeamNum.Visible = true; this.txttourcode.Visible = false; //天数 this.lblDay.Text = model.TourDays.ToString(); //成人数 this.lblAdult.Text = model.PlanPeopleNumber.ToString(); this.lblAdult.Visible = true; this.TXTADULT.Visible = false; //儿童数 this.lblChild.Visible = true; this.TXTCHILD.Visible = false; //出发交通 this.lblBegin.Text = model.LTraffic; this.lblBegin.Visible = true; this.TXtBEGIN.Visible = false; //返程交通 this.lblEnd.Text = model.RTraffic; this.lblEnd.Visible = true; this.TXTEnd.Visible = false; //行程安排 this.litTravel.Text = model.TourQuickInfo.QuickPlan; //服务标准 this.litService.Text = model.TourQuickInfo.Service; //地接社信息 this.rptDjInfo.DataSource = model.LocalAgencys; this.rptDjInfo.DataBind(); this.pnedij.Visible = true; } //组团散客天天发行程单 if (EyouSoft.Common.Utils.GetQueryStringValue("action") == "tourevery") { string tourid = Utils.GetQueryStringValue("tourid"); EyouSoft.BLL.TourStructure.TourEveryday everybl = new EyouSoft.BLL.TourStructure.TourEveryday(null, false); EyouSoft.Model.TourStructure.TourEverydayInfo everymodel = new EyouSoft.Model.TourStructure.TourEverydayInfo(); everymodel = everybl.GetTourEverydayInfo(tourid); if (everymodel != null) { //线路名称 this.lblAreaName.Text = everymodel.RouteName; //团号 this.lblTeamNum.Visible = false; this.txttourcode.Visible = true; //天数 this.lblDay.Text = everymodel.TourDays.ToString(); //成人数 this.lblAdult.Visible = false; this.TXTADULT.Visible = true; this.TXTADULT.Attributes.Add("style", "width:30px;"); //儿童数 this.lblChild.Visible = false; this.TXTCHILD.Visible = true; //出发交通 this.lblBegin.Visible = false; this.TXtBEGIN.Visible = true; //返程交通 this.lblEnd.Visible = false; this.TXTEnd.Visible = true; //行程安排 this.litTravel.Text = everymodel.TourQuickInfo.QuickPlan; //服务标准 this.litService.Text = everymodel.TourQuickInfo.Service; //地接社信息 this.pnedij.Visible = false; } } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSubmit_Click(object sender, EventArgs e) { NumConfig = (int)(new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(CurrentUserCompanyID)); #region 将表单值 赋值给变量 //团号 string teamNum = Utils.InputText(this.txtTeamNum.Text); //线路区域名 string lineArea = Utils.GetFormValue(this.ddlLineArea.UniqueID); //计调员 string coordinatorId = Utils.GetFormValue(this.ddlSeller.UniqueID); //组团社ID int buyerCId = Utils.GetInt(this.hideGroupsId.Value); //组团社名称 string buyerCName = Utils.GetFormValue(this.txtGroupsName.UniqueID); //线路名称 string xianLuName = this.xianluWindow1.Name; //线路ID string routeId = this.xianluWindow1.Id; //天数 int dayCount = Utils.GetInt(this.txtDayCount.Text); //人数 int peopleCount = Utils.GetInt(this.txtPeopelCount.Text); //出发交通 string startTraffic = Utils.InputText(this.txtStartTraffic.Text); //返程交通 string endTraffic = Utils.InputText(this.txtEndTraffic.Text.Trim()); //出团日期 DateTime lDate = Convert.ToDateTime(this.txtLDate.Text); //回团日期 // DateTime rDate = Convert.ToDateTime(this.txtRDate.Text); //添加地接社信息 IList <EyouSoft.Model.TourStructure.TourLocalAgencyInfo> list = this.DiJieControl1.GetList; //添加价格组成 IList <EyouSoft.Model.TourStructure.TourTeamServiceInfo> listPrice = this.PriceControl1.GetList; //行程安排 string travel = Utils.EditInputText(this.txtTravel.Text); //服务标准 string services = Utils.EditInputText(this.txtServices.Text); //备注 string remarks = this.txtRemarks.Text; //常用城市 int tourCity = Utils.GetInt(Utils.GetFormValue(this.ddlCityList.UniqueID)); #endregion #region 验证 //判断线路区域不能为空 if (lineArea == "") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择线路区域")); return; } //判断是否选择组团社 if (buyerCId <= 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择组团社!")); return; } if (coordinatorId == "-1") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择计调员!")); return; } //判断线路名称不能为空 if (xianLuName == "") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入线路名称!")); return; } //判断天数不能为空 if (dayCount == 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入天数!")); return; } //判断人数不能为空 if ((peopleCount == null || peopleCount == 0) && NumConfig == (int)EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.OnlyTotalNumber) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入人数!")); return; } int crNum = Utils.GetInt(txt_crNum.Text); if (crNum == 0 && NumConfig == (int)EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.PartNumber) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入人数!")); return; } #endregion #region 验证上传文件的格式是否正确 string msg = ""; if (!EyouSoft.Common.Function.UploadFile.CheckFileType(Request.Files, "fileField", new[] { ".gif", ".jpeg", ".jpg", ".png", ".xls", ".doc", ".docx", ".rar", ".txt" }, null, out msg)) { this.litMsg.Text = Utils.ShowMsg(msg); return; } #endregion //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = new EyouSoft.Model.TourStructure.TourTeamInfo(); if (this.hideType.Value == "Update") { //如果是修改操作,那么先获的这个对象 model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(this.hideID.Value); } #region 对象属性赋值 //判断对象时候存在 if (model != null) { //对象属性赋值 model.TourCode = teamNum; model.AreaId = Convert.ToInt32(lineArea); model.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo(); model.Coordinator.CoordinatorId = Utils.GetInt(coordinatorId); //修改时原购买单位 if (model.BuyerCId > 0) { model.OBuyerCId = model.BuyerCId; } model.BuyerCId = buyerCId; model.BuyerCName = buyerCName; model.RouteName = xianLuName; if (model.RouteId > 0) { model.ORouteId = model.RouteId; } model.RouteId = Utils.GetInt(routeId); model.TourDays = dayCount; model.PlanPeopleNumber = peopleCount; model.LTraffic = startTraffic; model.RTraffic = endTraffic; model.LDate = lDate; model.LocalAgencys = list; model.Services = listPrice; model.CompanyId = SiteUserInfo.CompanyID; EyouSoft.Model.TourStructure.TourQuickPrivateInfo quickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo(); quickInfo.QuickPlan = travel; quickInfo.Service = services; quickInfo.Remark = remarks; model.TourQuickInfo = quickInfo; model.OperatorId = SiteUserInfo.ID; model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.团队计划; model.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick; model.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None; model.TotalAmount = PriceControl1.TotalAmount; model.TourCityId = tourCity; model.TourTraffic = new List <int>() { Utils.GetInt(Utils.GetFormValue("selectTraffic"), -1) }; ///人数、单价 by txb model.TourTeamUnit = new EyouSoft.Model.TourStructure.MTourTeamUnitInfo(); model.TourTeamUnit.NumberCr = Utils.GetInt(txt_crNum.Text); model.TourTeamUnit.NumberEt = Utils.GetInt(txt_rtNum.Text); model.TourTeamUnit.NumberQp = Utils.GetInt(txt_allNum.Text); model.TourTeamUnit.UnitAmountCr = PriceControl1.cr_price; model.TourTeamUnit.UnitAmountEt = PriceControl1.rt_price; model.TourTeamUnit.UnitAmountQp = PriceControl1.all_price; #endregion #region 单文件 //团队附件实体 EyouSoft.Model.TourStructure.TourAttachInfo attachModel = new EyouSoft.Model.TourStructure.TourAttachInfo(); //文件路径 string filePath = ""; //文件名 string fileName = ""; //文件上传 if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["fileField"], "TeamPlanFile", out filePath, out fileName)) { if (filePath.Trim() != "" && fileName.Trim() != "") { //设置文件上传后的虚拟路劲 attachModel.FilePath = filePath; //保存原文件名 attachModel.Name = fileName; IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = new List <EyouSoft.Model.TourStructure.TourAttachInfo>(); attachList.Add(attachModel); model.Attachs = attachList; } else if (Utils.GetFormValue(this.hideData.UniqueID).Trim() != "") { attachModel.FilePath = this.hideData.Value; IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = new List <EyouSoft.Model.TourStructure.TourAttachInfo>(); attachList.Add(attachModel); model.Attachs = attachList; } else { model.Attachs = null; } } else { //上传失败提示 this.litMsg.Text = Utils.ShowMsg("文件上传失败!"); return; } #endregion int count = 0; if (model.TourTraffic != null && model.TourTraffic.Count > 0) { EyouSoft.BLL.PlanStruture.PlanTrffic BLL = new EyouSoft.BLL.PlanStruture.PlanTrffic(); EyouSoft.Model.PlanStructure.TrafficPricesInfo TrafficPricesInfoModel = BLL.GetTrafficPriceModel(model.TourTraffic.First(), model.LDate); if (TrafficPricesInfoModel != null && TrafficPricesInfoModel.TicketNums > 0) { //如果是新增和复制 时 都做新增操作 if (this.hideType.Value == "Add" || this.hideType.Value == "Copy") { //数据库添加操作 count = bll.InsertTeamTourInfo(model); //新增成功 if (count > 0) { Utils.ShowAndRedirect("添加成功!", "/TeamPlan/TeamPlanList.aspx"); } else //失败时提示 if (count == -1) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("团号重复!")); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("添加失败!")); } } else { //数据库修改操作 count = bll.UpdateTeamTourInfo(model); //成功提示 if (count > 0) { Utils.ShowAndRedirect("修改成功!", "/TeamPlan/TeamPlanList.aspx"); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("修改失败!")); } } } else { Response.Write("<script type='text/javascript'>alert('提交失败,关联交通票数为零!');location.href=location.href;</script>"); } } else { Response.Write("<script type='text/javascript'>alert('提交失败,关联交通为空!');location.href=location.href;</script>"); } } else { Utils.ShowAndRedirect("该计划不存在!", "/TeamPlan/TeamPlanList.aspx"); } }
/// <summary> /// 初始化数据 /// </summary> /// <param name="tourId"></param> protected void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); EyouSoft.Model.TourStructure.TourInfo infoModel = null; EyouSoft.Model.TourStructure.TourTeamInfo teamModel = null; if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { infoModel = (EyouSoft.Model.TourStructure.TourInfo)model; if (infoModel != null) { //线路名称 this.litRouteName.Text = infoModel.RouteName; this.litLdate.Text = infoModel.LDate.ToString("yyyy-MM-dd"); //专线主要联系人 this.litContectName.Value = this.SiteUserInfo.ContactInfo.ContactName; this.litQuerenDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); } EyouSoft.Model.TourStructure.TourOrder customerList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderModel(SiteUserInfo.CompanyID, EyouSoft.Common.Utils.GetQueryStringValue("orderId")); if (customerList != null) { //组团社 buyCompanyName = customerList.BuyCompanyName; //组团社联系人 buyCompanyContentName = customerList.BuyerContactName; this.litbuyCompanyName.Text = customerList.BuyCompanyName; this.litPeopleCount.Text = customerList.PeopleNumber.ToString(); this.litCostDetail.Text = (customerList.AdultNumber) + "*" + (customerList.PersonalPrice.ToString("0.00")) + " + " + (customerList.ChildNumber) + " * " + (customerList.ChildPrice.ToString("0.00")); this.litCostSum.Text = customerList.SumPrice.ToString("0.00"); string vistors = string.Empty; if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { customerList.CustomerList = customerList.CustomerList.Where(p => p.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { for (int i = 0; i < customerList.CustomerList.Count; i++) { vistors += customerList.CustomerList[i].VisitorName + ","; } } } this.litVistors.Text = vistors.TrimEnd(','); //备注 if (customerList.AmountPlus != null) { this.litremark.Text = customerList.AmountPlus.Remark; } } } else { teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; if (teamModel != null) { //组团社 buyCompanyName = teamModel.BuyerCName; this.litbuyCompanyName.Text = teamModel.BuyerCName; //组团社联系人 EyouSoft.Model.CompanyStructure.CustomerInfo CustomerInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(teamModel.BuyerCId); if (CustomerInfo != null) { if (CustomerInfo.CustomerContactList != null && CustomerInfo.CustomerContactList.Count > 0) { buyCompanyContentName = CustomerInfo.CustomerContactList[0].Name; } } this.litRouteName.Text = teamModel.RouteName; this.litLdate.Text = teamModel.LDate.ToString("yyyy-MM-dd"); //专线主要联系人 this.litContectName.Value = this.SiteUserInfo.ContactInfo.ContactName; this.litQuerenDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); } EyouSoft.Model.TourStructure.TourOrder customerList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderModel (SiteUserInfo.CompanyID, EyouSoft.Common.Utils.GetQueryStringValue("orderId")); if (customerList != null) { this.litPeopleCount.Text = customerList.PeopleNumber.ToString(); if (customerList.TourTeamUnit != null) { this.litCostDetail.Text = customerList.TourTeamUnit.UnitAmountCr.ToString("0.00") + "+" + customerList.TourTeamUnit.UnitAmountEt.ToString("0.00") + "+" + customerList.TourTeamUnit.UnitAmountQp.ToString("0.00"); } this.litCostSum.Text = customerList.SumPrice.ToString("0.00"); string vistors = string.Empty; if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { customerList.CustomerList = customerList.CustomerList.Where(p => p.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { for (int i = 0; i < customerList.CustomerList.Count; i++) { vistors += customerList.CustomerList[i].VisitorName + ","; } } } this.litVistors.Text = vistors.TrimEnd(','); //备注 if (customerList.AmountPlus != null) { this.litremark.Text = customerList.AmountPlus.Remark; } } } //公司账户信息 EyouSoft.Model.CompanyStructure.CompanyInfo info = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(CurrentUserCompanyID, CurrentUserCompanyID); if (info != null) { if (info.CompanyAccountList != null && info.CompanyAccountList.Count > 0) { if (string.IsNullOrEmpty(info.CompanyAccountList[0].AccountName)) { this.trAccountNameView.Visible = false; } else { this.lithuming.Text = info.CompanyAccountList[0].AccountName; } if (string.IsNullOrEmpty(info.CompanyAccountList[0].BankName) && string.IsNullOrEmpty(info.CompanyAccountList[0].BankNo)) { this.trBankView.Visible = false; } else { this.litkaihuhang.Text = info.CompanyAccountList[0].BankName; this.litzhanghao.Text = info.CompanyAccountList[0].BankNo; } } else { this.trBankView.Visible = false; this.trAccountNameView.Visible = false; } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); //声明团队计划对象 EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId); if (model != null) { //线路名称 this.lblAreaName.Text = model.RouteName; //团号 this.lblTeamNum.Text = model.TourCode; //天数 this.lblDay.Text = model.TourDays.ToString(); //成人数 this.lblAdult.Text = model.PlanPeopleNumber.ToString(); //儿童数 //出发交通 this.lblBegin.Text = model.LTraffic; //返程交通 this.lblEnd.Text = model.RTraffic; //行程安排 this.litTravel.Text = model.TourQuickInfo.QuickPlan; //服务标准 this.litService.Text = model.TourQuickInfo.Service; //地接社信息 this.rptDjInfo.DataSource = model.LocalAgencys; this.rptDjInfo.DataBind(); } }
void Bind() { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); string tourId = Utils.GetQueryStringValue("tourId"); if (tourId == "") { Response.Write("未找到信息!"); return; } //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo basemodel = bll.GetTourInfo(tourId); LeaveDate = basemodel.LDate; lt_LDate.Text = basemodel.LDate.Month.ToString() + "月" + basemodel.LDate.Day.ToString() + "日" + basemodel.TourType.ToString(); lt_TourName.Text = basemodel.RouteName; #region 组团端 EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(basemodel.BuyerCId); if (cusModel != null) { txt_to_fax.Text = cusModel.Fax; txt_to_name.Text = cusModel.Name; txt_to_tel.Text = cusModel.Phone; txt_to_user.Text = cusModel.ContactName; } #endregion #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(basemodel.OperatorId); if (userInfoModel != null) { //主要联系人电话 this.txt_fr_tel.Text = userInfoModel.ContactTel; //专线FAX this.txt_fr_fax.Text = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(basemodel.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.txt_fr_user.Text = companyModel.ContactName; txt_fr_name.Text = companyModel.CompanyName; txt_fr_tel.Text = companyModel.ContactTel; txt_fr_tel.Text = companyModel.ContactFax; } } #endregion if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)basemodel; if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { tb_normal.Visible = true; rptTravel.DataSource = model.TourNormalInfo.Plans; rptTravel.DataBind(); rptProject.DataSource = model.TourNormalInfo.Services; rptProject.DataBind(); div_noproject.Visible = true; lblNoProject.Text = TextToHtml(model.TourNormalInfo.BuHanXiangMu); div_notice.Visible = true; lt_notice.Text = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); } else { tb_normal.Visible = false; tb_quick.Visible = true; tb_quickService.Visible = true; lb_Quick.Text = model.TourQuickInfo.QuickPlan; lt_service.Text = model.TourQuickInfo.Service; } } else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)basemodel; if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { tb_normal.Visible = true; if (model.TourNormalInfo != null) { rptTravel.DataSource = model.TourNormalInfo.Plans; rptTravel.DataBind(); rptProject.DataSource = model.Services; rptProject.DataBind(); div_noproject.Visible = true; lblNoProject.Text = TextToHtml(model.TourNormalInfo.BuHanXiangMu); div_notice.Visible = true; lt_notice.Text = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); } } else { if (model.TourQuickInfo != null) { tb_normal.Visible = false; tb_quick.Visible = true; tb_quickService.Visible = true; lb_Quick.Text = model.TourQuickInfo.QuickPlan; lt_service.Text = model.TourQuickInfo.Service; } } /*#region 结算价 * TourQuotePrint priantTQP = new TourQuotePrint(); * string number = string.Empty; * string money = string.Empty; * priantTQP.getPepoleNum(SiteUserInfo.CompanyID,model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money); * this.txt_Money.Text = money; #endregion*/ } else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { p_title.Visible = false; d_title.Visible = false; Title = "单项服务确认单"; tb_single.Visible = true; tb_normal.Visible = false; EyouSoft.Model.TourStructure.TourSingleInfo model = (EyouSoft.Model.TourStructure.TourSingleInfo)basemodel; rpt_single.DataSource = model.Plans; rpt_single.DataBind(); txt_Money.Text = model.TotalAmount.ToString("#,##0.00"); } if (basemodel.TourType != EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { phJieSuanJiaGe.Visible = true; EyouSoft.BLL.PlanStruture.TravelAgency planbll = new EyouSoft.BLL.PlanStruture.TravelAgency(); IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> agencys = planbll.GetList(tourId); planbll = null; if (agencys != null && agencys.Count > 0) { System.Text.StringBuilder s = new System.Text.StringBuilder(); foreach (var agency in agencys) { s.AppendFormat("单位名称:{0} 结算费用:{1} ", agency.LocalTravelAgency, Utils.FilterEndOfTheZeroDecimal(agency.Settlement)); } txt_Money.Text = s.ToString(); } } }
/// <summary> /// 提交事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void LinkButton1_Click(object sender, EventArgs e) { #region 基础数据读取 if (Request.QueryString["act"] == "update") { actType = 1; } if (Request.QueryString["act"] == "copy") { actType = 2; } IList <EyouSoft.Model.CompanyStructure.CustomStand> listcus = new List <EyouSoft.Model.CompanyStructure.CustomStand>(); EyouSoft.BLL.CompanyStructure.CompanyCustomStand bllCom = new CompanyCustomStand(); EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourInfo info = new EyouSoft.Model.TourStructure.TourInfo(); if (actType == 1) { info = (EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(Utils.GetQueryStringValue("id")); } listcus = bllCom.GetCustomStandByCompanyId(CurrentUserCompanyID); int kkk = listcus.Count; string[] st = Utils.GetFormValues("eat"); info.RouteId = Utils.GetInt(selectXl.Id); info.AreaId = Utils.GetInt(Utils.GetFormValue(ddl_area.UniqueID)); info.RouteName = selectXl.Name; info.TourDays = EyouSoft.Common.Utils.GetInt(Utils.GetFormValue(txt_Days.UniqueID)); info.PlanPeopleNumber = 1;//EyouSoft.Common.Utils.GetInt(Utils.GetFormValue(txt_pepoleNum.UniqueID)); info.TourTraffic = GetSelectTraffic(); EyouSoft.Model.TourStructure.TourCreateRuleInfo rule = new EyouSoft.Model.TourStructure.TourCreateRuleInfo(); #region 建团规则 if (actType == 0 || actType == 2) { string gz = createTea1.getGuiZe(); rule.EDate = EyouSoft.Common.Utils.GetDateTime(Utils.GetFromQueryStringByKey(gz, "end")); rule.SDate = EyouSoft.Common.Utils.GetDateTime(Utils.GetFromQueryStringByKey(gz, "start")); switch (Utils.GetFromQueryStringByKey(gz, "type")) { case "1": { rule.Cycle = Utils.GetFromQueryStringByKey(gz, "data"); rule.Rule = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.星期; } break; case "2": { rule.Cycle = Utils.GetFromQueryStringByKey(gz, "data"); rule.Rule = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.天数; } break; case "3": { rule.SDate = null; rule.EDate = null; rule.Cycle = null; rule.Rule = EyouSoft.Model.EnumType.TourStructure.CreateTourRule.日期; } break; } info.CreateRule = rule; } else { } #endregion info.LTraffic = txt_startTraffic.Text; info.RTraffic = txt_endTraffic.Text; IList <EyouSoft.Model.TourStructure.TourLocalAgencyInfo> local; local = DiJieControl1.GetList; info.LocalAgencys = local; info.CompanyId = CurrentUserCompanyID; info.TourQuickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo(); IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> pricelist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>(); string[] ddl_price = Utils.GetFormValues("ddl_price"); for (int k = 0; k < 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]; if (ddl_price[k] == "" || price.StandardId == 0) { continue; } 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++) { int levId = Utils.GetInt(Utils.GetFormValues("hd_cusStandId")[i]); if (levId == 0) { continue; } 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 = levId; listLevels.Add(level); } price.CustomerLevels = listLevels; pricelist.Add(price); } IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> levelList = new List <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo>(); info.OperatorId = SiteUserInfo.ID; info.PriceStandards = pricelist; EyouSoft.Model.TourStructure.TourQuickPrivateInfo qinfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo(); qinfo.QuickPlan = Utils.EditInputText(txt_xinchen.Text); qinfo.Service = Utils.EditInputText(txt_fuwu.Text); qinfo.Remark = Utils.GetFormValue(txt_remark.UniqueID); info.TourQuickInfo = qinfo; IList <EyouSoft.Model.TourStructure.TourAttachInfo> listAttachs = new List <EyouSoft.Model.TourStructure.TourAttachInfo>(); EyouSoft.Model.TourStructure.TourAttachInfo attInfo = new EyouSoft.Model.TourStructure.TourAttachInfo(); string fileAtt = ""; string oldfileAtt = ""; if (EyouSoft.Common.Function.UploadFile.FileUpLoad(FileUpload1.PostedFile, "sanping", out fileAtt, out oldfileAtt)) { attInfo.FilePath = fileAtt; } else { EyouSoft.Common.Function.MessageBox.Show(this.Page, "上传附件失败!"); return; } if (attInfo.FilePath.Length < 1) { attInfo.FilePath = hd_img.Value; } listAttachs.Add(attInfo); info.Attachs = listAttachs; //info.TourDays = createTea1.getDays(); info.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo(); info.Coordinator.CoordinatorId = Utils.GetInt(Utils.GetFormValue("sel_oprator")); info.TourCityId = Utils.GetInt(Utils.GetFormValue(ddl_city.UniqueID)); #endregion #region 添加 if (actType == 0 || actType == 2) { info.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick; info.Status = EyouSoft.Model.EnumType.TourStructure.TourStatus.正在收客; info.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划; info.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None; IList <EyouSoft.Model.TourStructure.TourChildrenInfo> listChild = new List <EyouSoft.Model.TourStructure.TourChildrenInfo>(); string[] childTeamNum = Utils.GetFormValue("hidToursNumbers").Split(','); string[] tourcodes = new string[childTeamNum.Length]; for (int i = 0; i < childTeamNum.Length; i++) { ///子团 EyouSoft.Model.TourStructure.TourChildrenInfo child = new EyouSoft.Model.TourStructure.TourChildrenInfo(); child.TourCode = childTeamNum[i].Split('}')[1]; child.LDate = Utils.GetDateTime(childTeamNum[i].Split('{')[0]); listChild.Add(child); tourcodes[i] = child.TourCode; } info.Childrens = listChild; if (!CheckGrant(TravelPermission.散拼计划_散拼计划_新增计划)) { Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_新增计划, false); } IList <string> list_tourCode = tour.ExistsTourCodes(SiteUserInfo.CompanyID, null, tourcodes); if (list_tourCode.Count > 0) { Response.Write("<script>alert('" + string.Join(",", list_tourCode.ToArray()) + "团号已经存在!');location.href=location.href;</script>"); return; } int ii = tour.InsertTourInfo(info); if (ii > 0) { Response.Write("<script>alert('添加成功!');location.href='default.aspx';</script>"); } } #endregion else #region 修改 { if (!Utils.PlanIsUpdateOrDelete(info.Status.ToString())) { Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>"); return; } info.TourId = Request.QueryString["id"]; info.Childrens = null; info.TourCode = txt_teamNum.Value; if (!CheckGrant(TravelPermission.散拼计划_散拼计划_修改计划)) { Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_修改计划, false); } IList <string> list_tourCode = tour.ExistsTourCodes(SiteUserInfo.CompanyID, info.TourId, info.TourCode); if (list_tourCode.Count > 0) { Response.Write("<script>alert('团号已经存在!');location.href=location.href;</script>"); return; } int ii = tour.UpdateTourInfo(info); if (ii > 0) { Response.Write("<script>alert('修改成功!');location.href='default.aspx';</script>"); } else { Response.Write("<script>alert('修改失败!');location.href=location.href;</script>"); } } #endregion }
protected bool IsChecked1; //团队状态是4 #region 页面加载 protected void Page_Load(object sender, EventArgs e) { #region 拉框添加点击事件 ddlSupperlierList.Attributes.Add("onchange", "ChecklocaCustomer(this)"); #endregion #region 修改权限验证 if (!CheckGrant(TravelPermission.单项服务_单项服务_修改服务)) { Utils.ResponseNoPermit(TravelPermission.单项服务_单项服务_修改服务, true); return; } #endregion #region 配置 EyouSoft.BLL.CompanyStructure.CompanySetting setBll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //初始化bll EyouSoft.Model.CompanyStructure.CompanyFieldSetting set = setBll.GetSetting(CurrentUserCompanyID); //配置实体 hd_IsRequiredTraveller.Value = set.IsRequiredTraveller.ToString(); //游客是否允许为空配置 #endregion // 绑定项目类型 BindPriceItem(); if (Request.QueryString["EditId"] != null)//修改ID { EditId = Request.QueryString["EditId"]; } #region 新增权限验证 if (!CheckGrant(TravelPermission.单项服务_单项服务_新增服务)) { Utils.ResponseNoPermit(TravelPermission.单项服务_单项服务_新增服务, true); return; } #endregion EyouSoft.BLL.TourStructure.TourOrder tourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(this.SiteUserInfo); this.txtOrderNo.Value = tourOrderBll.CreateOrderNo(); if (!Page.IsPostBack) { #region 栏目权限验证 if (!CheckGrant(TravelPermission.单项服务_单项服务_栏目)) { Utils.ResponseNoPermit(TravelPermission.单项服务_单项服务_栏目, true); return; } #endregion LoadVisitors1.CurrentPageIframeId = Request.QueryString["iframeId"]; if (EditId != "") { EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo); EditModel = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(EditId); if (EditModel == null) { Utils.ShowAndRedirect("未能找到您要修改的记录!", "/SingleServe/SingleServeList.aspx"); } IsUpdate = true; //确认修改操作 IsChecked = ((int)EditModel.Status) == 5; //判断团队状态是否核算结束 IsChecked1 = ((int)EditModel.Status) == 4; //判断团队状态是否是财务核算 #region 初始化表单值 txtContactName.Value = EditModel.ContacterName; //联系人 txtCustomerCompany.Value = EditModel.BuyerCName; //客户单位名称 this.TxtStartTime.Value = EditModel.LDate.ToString("yyyy-MM-dd"); //委托出团日期 this.txtTourCode.Value = EditModel.TourCode; //团号 this.hideOldTeamNum.Value = EditModel.TourCode; //团号 hfSelectCustId.Value = EditModel.BuyerCId.ToString(); //客户单位编号 selectOperator1.OperId = EditModel.SellerId.ToString(); //销售员编号 selectOperator1.OperName = EditModel.SellerName; //销售员名称 txtOrderNo.Value = EditModel.OrderCode; //订单号 txtPersonNum.Value = EditModel.PlanPeopleNumber.ToString(); txtTel.Value = EditModel.ContacterTelephone; //电话 txtTotalIncome.Value = Utils.FilterEndOfTheZeroDecimal(EditModel.TotalAmount); //合计收入 txtTotalOutlay.Value = Utils.FilterEndOfTheZeroDecimal(EditModel.TotalOutAmount); //合计支出 txtGrossProfit.Value = Utils.FilterEndOfTheZeroDecimal(EditModel.GrossProfit); //毛利 hfOBuyerId.Value = EditModel.BuyerCId.ToString(); #region 绑定游客信息 if (EditModel.Customers != null && EditModel.Customers.Count > 0) { StringBuilder VisitorBuilder = new StringBuilder(); VisitorBuilder.Append("["); foreach (var item in EditModel.Customers) { VisitorBuilder.Append("["); VisitorBuilder.AppendFormat("'{0}','{1}','{2}','{3}','{4}','{5}','{6}'", item.VisitorName, (int)item.VisitorType, (int)item.CradType, item.CradNumber, (int)item.Sex, item.ContactTel, FormatSpecialServe(item.SpecialServiceInfo), item.ID); VisitorBuilder.Append("],"); } VisitorBuilder.Append("]"); VisitorArr = VisitorBuilder.ToString().Substring(0, VisitorBuilder.Length - 2) + "]"; } else { VisitorArr = "[]"; } #endregion #region 客户要求 if (EditModel.Services != null && EditModel.Services.Count > 0) { GuestRequestJSON = Newtonsoft.Json.JsonConvert.SerializeObject(EditModel.Services); } else { GuestRequestJSON = "{}"; } #endregion #region 供应商安排 if (EditModel.Plans != null && EditModel.Plans.Count > 0) { SupplierJSON = Newtonsoft.Json.JsonConvert.SerializeObject(EditModel.Plans); } #endregion #region 附件信息 if (!string.IsNullOrEmpty(EditModel.CustomerFilePath)) { aFile.HRef = EditModel.CustomerFilePath; aFile.Target = "_blank"; hFileInfo.Value = EditModel.CustomerFilePath; } #endregion #endregion } } string type = Utils.GetQueryStringValue("type"); if (type == "getInfo") { int cid = Utils.GetInt(Utils.GetQueryStringValue("cid")); EyouSoft.BLL.CompanyStructure.Customer custBll = new EyouSoft.BLL.CompanyStructure.Customer(); EyouSoft.Model.CompanyStructure.CustomerInfo model = custBll.GetCustomerModel(cid); Response.Clear(); if (model != null) { Response.Write(model.ContactName + "|" + model.Phone); } else { Response.Write(" | "); } Response.End(); } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(tourId); if (model != null) { #region 页面控件赋值 //出团日期 LeaveDate = model.LDate.ToString("yyyy-MM-dd"); //出发交通 lblBegin = model.LTraffic; //组团社 this.txtZutuanName.Text = model.BuyerCName; //联系信息 EyouSoft.BLL.CompanyStructure.CompanySupplier supplierBll = new EyouSoft.BLL.CompanyStructure.CompanySupplier(); EyouSoft.Model.CompanyStructure.CompanySupplier companyModel = supplierBll.GetModel(model.BuyerCId, SiteUserInfo.CompanyID); if (companyModel != null) { if (companyModel.SupplierContact != null && companyModel.SupplierContact.Count > 0) { this.txtIncomeMan.Text = companyModel.SupplierContact[0].ContactName; this.txtFax.Text = companyModel.SupplierContact[0].ContactFax; } } //集合时间 lblGatheredDate.Text = model.GatheringTime; //送团人 if (model.SentPeoples != null && model.SentPeoples.Count > 0) { this.txtOffName.Text = model.SentPeoples[0].OperatorName; } this.txtAddress.Text = model.GatheringPlace; //返程交通 lblEnd = model.RTraffic; if (model.TourNormalInfo != null) { //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //行程安排 if (model.TourNormalInfo.Plans != null) { this.listCount = model.TourNormalInfo.Plans.Count; tdCount = model.TourNormalInfo.Plans.Count; this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); } } //人数 #region 人数And结算价 if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money); this.lblAdult.Text = number; } else { this.lblAdult.Text = model.PlanPeopleNumber.ToString(); } #endregion //团队类型 this.txtTourType.Text = model.TourType.ToString(); //包含项目 this.rptProject.DataSource = model.Services; this.rptProject.DataBind(); #endregion } }
/// <summary> /// 绑定数据 /// </summary> void BindXC() { tabxcquick.Visible = false; tabProject.Visible = false; tabProject20.Visible = false; //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明散拼计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(Utils.GetQueryStringValue("tourId")); if (model != null) { #region 标准,快速 公有数据 xcTime = model.LDate; lblGoTraffic.Text = model.LTraffic; lblEndTraffic.Text = model.RTraffic; lblTid.Text = model.TourCode; #endregion #region 组团社联系信息 this.lblSetMan.Text = model.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(model.BuyerCId); if (cusModel != null) { //组团 联系人电话 this.lblSetPhone.Text = cusModel.Phone; this.lblSetPhone2.Text = cusModel.Phone; //组团联系人Fax this.lblSetFAX.Text = cusModel.Fax; this.lblSetMan.Text = cusModel.Name; this.lblSetMan2.Text = cusModel.Name; this.lblSetName.Text = cusModel.ContactName; } #endregion #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(model.OperatorId); if (userInfoModel != null) { ////主要联系人电话 //this.lblGetMan.Text = userInfoModel.ContactTel; ////专线FAX //this.lblGetFAX.Text = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(model.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.lblGetPhone.Text = companyModel.ContactTel; this.lblGetPhone2.Text = companyModel.ContactTel; this.lblGetMan.Text = companyModel.CompanyName; this.lblGetMan2.Text = companyModel.CompanyName; this.lblGetName.Text = companyModel.ContactName; this.lblGetFAX.Text = companyModel.ContactFax; } } #endregion if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { #region 标准发布 if (model.TourNormalInfo != null) { this.lblLineName.Text = model.RouteName == "" ? "" : model.RouteName; this.lblDaySum.Text = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString(); this.lblGoTraffic.Text = model.LTraffic; this.lblEndTraffic.Text = model.RTraffic; this.lblManSum.Text = model.PlanPeopleNumber.ToString(); if (model.TourNormalInfo.Plans != null && model.TourNormalInfo.Plans.Count > 0) { xc_list.DataSource = model.TourNormalInfo.Plans; xc_list.DataBind(); } lblBuHanXiangMu.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); lblZiFeiXIangMu.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); lblErTongAnPai.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); lblGouWuAnPai.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); lblZhuYiShiXiang.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); lblTotalAmount.Text = model.TotalAmount.ToString("#0.00") + "元"; lblGatheringPlace.Text = model.GatheringPlace; lblGatheringTime.Text = model.GatheringTime; if (model.Services != null && model.Services.Count > 0) { rpt_sList.DataSource = model.Services; rpt_sList.DataBind(); sListRowsCount = model.Services.Count; } tabProject.Visible = true; tabProject20.Visible = true; } #endregion } else { #region 快速发布 tabxcquick.Visible = true; this.lblLineName.Text = model.RouteName == "" ? "" : model.RouteName; this.lblDaySum.Text = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString(); this.lblGoTraffic.Text = model.LTraffic; this.lblEndTraffic.Text = model.RTraffic; this.lblManSum.Text = model.PlanPeopleNumber.ToString(); if (model.TourQuickInfo != null) { lblKs.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourQuickInfo.Remark); lblQuickPlan.Text = model.TourQuickInfo.QuickPlan; } #endregion } } else { Response.Clear(); Response.Write("未找到信息"); Response.End(); } }
/// <summary> /// 初始化方法 /// </summary> void BindXC() { string tourId = Utils.GetQueryStringValue("tourId"); if (tourId == "") { Response.Write("未找到信息!"); return; } //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明散拼计划对象 EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId); if (model != null) { //设置出团时间 xcTime = model.LDate; //发送专线 this.txtFromCompany.Text = SiteUserInfo.CompanyName; this.txtCompany.Text = SiteUserInfo.CompanyName; if (SiteUserInfo.ContactInfo != null) { //联系人姓名 this.txtFromName.Text = SiteUserInfo.ContactInfo.ContactName; //联系人传真 this.txtFromFax.Text = SiteUserInfo.ContactInfo.ContactFax; //联系人电话 this.txtFromTel.Text = SiteUserInfo.ContactInfo.ContactTel; this.txtContactTel.Text = SiteUserInfo.ContactInfo.ContactTel; } //线路名称 this.txtAreaName.Text = model.RouteName; //天数 this.txtDayCount.Text = model.TourDays.ToString(); //出发交通 this.txtLTraffic.Text = model.LTraffic; //返程交通 this.txtRTraffic.Text = model.RTraffic; //人数 //this.txtPeopleCount.Text = model.PlanPeopleNumber.ToString(); //设置游客信息 IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customerList = new EyouSoft.BLL.TourStructure.TourOrder().GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); ; if (customerList != null && customerList.Count > 0) { visitorRowsCount = customerList.Count; //绑定旅客列表 this.rptCustomerList.DataSource = customerList; this.rptCustomerList.DataBind(); } //获取订单信息 EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(SiteUserInfo.CompanyID, Utils.GetQueryStringValue("orderId")); int buyCompanyID = orderModel.BuyCompanyID; #region 接收方信息 EyouSoft.Model.CompanyStructure.CustomerInfo cModel = new EyouSoft.Model.CompanyStructure.CustomerInfo(); EyouSoft.BLL.CompanyStructure.Customer cBLL = new EyouSoft.BLL.CompanyStructure.Customer(); cModel = cBLL.GetCustomerModel(buyCompanyID); txtToCompany.Text = cModel.Name; txtToName.Text = cModel.ContactName; txtToFax.Text = cModel.Fax; txtToTel.Text = cModel.Phone; #endregion //标准版 if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { //隐藏快速版行程安排 this.tblXCFast.Visible = false; //隐藏快速版服务标准 this.tblFastService.Visible = false; if (model.SentPeoples != null && model.SentPeoples.Count > 0) { //送团人信息 for (int i = 0; i < model.SentPeoples.Count; i++) { EyouSoft.Model.CompanyStructure.CompanyUser SendUserInfo = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(model.SentPeoples[i].OperatorId); if (SendUserInfo != null) { //送团人 this.txtSendMan.Text += SendUserInfo.PersonInfo.ContactName == null ? "" : SendUserInfo.PersonInfo.ContactName + ","; //送团电话 this.txtSendTel.Text += SendUserInfo.PersonInfo == null ? "" : SendUserInfo.PersonInfo.ContactTel + ","; } } this.txtSendMan.Text = this.txtSendMan.Text.TrimEnd(','); this.txtSendTel.Text = this.txtSendTel.Text.TrimEnd(','); } if (model.TourNormalInfo != null) { //行程安排 this.xc_list.DataSource = model.TourNormalInfo.Plans; this.xc_list.DataBind(); //包含项目 this.rptProject.DataSource = model.TourNormalInfo.Services; this.rptProject.DataBind(); //不包含项目 this.lblNoPriject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //儿童安排 this.lblChildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); //购物安排 this.lblShop.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //赠送项目 this.lblZiFei.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); //注意事项 this.lblZhuyi.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //温馨提醒 this.lblTiXing.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); } //获得报价说明 if (Utils.GetQueryStringValue("orderId") != "") { //EyouSoft.Model.TourStructure.TourOrder orderModel = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(SiteUserInfo.CompanyID, Utils.GetQueryStringValue("orderId")); if (orderModel != null) { //成人价格 this.lblManPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.PersonalPrice.ToString("0.00")); //成人数 this.lblManCount.Text = orderModel.AdultNumber.ToString(); //儿童价格 this.lblChildPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.ChildPrice.ToString("0.00")); //儿童数 this.lblChildCount.Text = orderModel.ChildNumber.ToString(); this.txtPeopleCount.Text = (orderModel.AdultNumber + orderModel.ChildNumber).ToString(); //总价格 this.lblAllPrice.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(orderModel.SumPrice.ToString("0.00")); } else { //成人价格 this.lblManPrice.Text = "0"; //成人数 this.lblManCount.Text = "0"; //儿童价格 this.lblChildPrice.Text = "0"; //儿童数 this.lblChildCount.Text = "0"; //总价格 this.lblAllPrice.Text = "0"; } } else { //成人价格 this.lblManPrice.Text = "0"; //成人数 this.lblManCount.Text = "0"; //儿童价格 this.lblChildPrice.Text = "0"; //儿童数 this.lblChildCount.Text = "0"; //总价格 this.lblAllPrice.Text = "0"; } } //快速版 else { this.txtPeopleCount.Text = (orderModel.AdultNumber + orderModel.ChildNumber).ToString(); //隐藏标准版 行程安排 this.tblXingCheng.Visible = false; //隐藏标准版 服务 this.tblNoService.Visible = false; if (model.TourQuickInfo != null) { //设置行程安排 this.lclXingCheng.Text = model.TourQuickInfo.QuickPlan; //设置服务标准 this.lclService.Text = model.TourQuickInfo.Service; } } } EyouSoft.Model.CompanyStructure.CompanyInfo infoModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(SiteUserInfo.CompanyID, SiteUserInfo.SysId); if (infoModel != null) { EyouSoft.Model.CompanyStructure.CompanyAccount account = null;//公司账户 if (infoModel.CompanyAccountList != null && infoModel.CompanyAccountList.Count > 0) { account = infoModel.CompanyAccountList[0]; this.lblCompanyName.Text = SiteUserInfo.CompanyName; this.lblBankName.Text = account.BankName; this.lblBankNum.Text = account.BankNo; this.lblBankUserName.Text = account.AccountName; } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> private void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); EyouSoft.Model.TourStructure.TourTeamInfo teamModel = null; if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; if (teamModel != null) { //组团社 this.txtGroups.Text = teamModel.BuyerCName; //联系人 this.txtContact.Text = ""; //电话 this.txtPhone.Text = ""; //预计出团日期 this.txtOutDate.Text = teamModel.LDate.ToString("yyyy-MM-dd"); //人数 string number = string.Empty; string money = string.Empty; getPepoleNum(SiteUserInfo.CompanyID, teamModel.PlanPeopleNumber, teamModel.TourTeamUnit, ref number, ref money); this.txtCount.Text = number; this.txtBaoJia.Text = money; //传真 this.txtFax.Text = ""; //线路名称 this.txtAreaName.Text = teamModel.RouteName; //出团日期 this.LeaveTime = teamModel.LDate; //地接总价 this.lblAllPrice.Text = teamModel.TotalAmount.ToString("0.00"); //判断时候有报价ID if (teamModel.QuoteId > 0) { //获得报价model EyouSoft.Model.RouteStructure.QuoteTeamInfo routeModel = new EyouSoft.BLL.RouteStructure.Quote().GetQuoteInfo(teamModel.QuoteId); if (routeModel != null) { //获得客户要求列表 if (routeModel.Requirements != null && routeModel.Requirements.Count > 0) { //绑定具体要求列表 this.rptRequire.DataSource = routeModel.Requirements; tdCount = routeModel.Requirements.Count; this.rptRequire.DataBind(); this.RecordSum = routeModel.Requirements.Count; } else { this.pnlContent.Visible = false; style = "padding: 0px; margin: 0px;border-bottom: none;"; this.pnlSpecific.Visible = false; } } } else { //如果不存在报价 那么隐藏具体要求 this.pnlContent.Visible = false; style = "padding: 0px; margin: 0px;border-bottom: none;"; this.pnlSpecific.Visible = false; } //行程安排 数据绑定 if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { if (teamModel.TourNormalInfo != null && teamModel.TourNormalInfo.Plans != null) { this.rptTravel.DataSource = teamModel.TourNormalInfo.Plans; this.rptTravel.DataBind(); tdCount = teamModel.TourNormalInfo.Plans.Count; this.pnlSecond.Visible = false; } } else { if (teamModel.TourQuickInfo != null) { this.lblSecond.Text = teamModel.TourQuickInfo.QuickPlan; } this.pnlFrist.Visible = false; } //地接信息 数据绑定 if (teamModel.Services != null && teamModel.Services.Count > 0) { this.RecordSumS = teamModel.Services.Count; this.rptDjList.DataSource = teamModel.Services; this.rptDjList.DataBind(); } } } }
protected void rpt_price_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (list == null) { list = new List <EyouSoft.Model.CompanyStructure.CustomStand>(); EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand(); int kkk = 0; list = bll.GetList(100, 1, ref kkk, CurrentUserCompanyID); } EyouSoft.Model.TourStructure.TourPriceStandardInfo mm = e.Item.DataItem as EyouSoft.Model.TourStructure.TourPriceStandardInfo; Repeater rpt = e.Item.FindControl("rpt_list") as Repeater; if (model != null) { //IList<EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> plist = model.PriceStandards[e.Item.ItemIndex].CustomerLevels; EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour(); IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = ((EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(Request.QueryString["tourId"])).PriceStandards; IList <EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo> plist = listStand[e.Item.ItemIndex].CustomerLevels; //for (int j = 0; j < ilist.Count; j++) //{ // //if(listStand[i].CustomerLevels[i].LevelId == list.sel) // if (list != null) // { // var vn = list.Where(x => x.Id == ilist[j].LevelId).FirstOrDefault(); // if (vn != null) // ilist[j].LevelName = vn.CustomStandName; // } //} for (int i = 0; i < listStand.Count; i++) { for (int j = 0; j < list.Count; j++) { //if(listStand[i].CustomerLevels[i].LevelId == list.sel) if (listStand[i].CustomerLevels.Count > j) { var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault(); if (vn != null) { listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName; } else { listStand[i].CustomerLevels.RemoveAt(j); } } var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault(); if (xn == null) { listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo() { LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0 }); } } } rpt.DataSource = plist; rpt.DataBind(); } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> protected void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null) { this.hideTourID.Value = tourId; //绑定地接社信息 this.rptDjList.DataSource = bll.GetTourLocalAgencys(tourId); this.rptDjList.DataBind(); //绑定旅客信息 this.rptCustomer.DataSource = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();; this.rptCustomer.DataBind(); //出团日期 this.txtOutDate.Text = model.LDate.ToString("yyyy-MM-dd"); //出发交通 this.lblBenginDate.Text = model.LTraffic; //回程交通 this.lblBackDate.Text = model.RTraffic; //线路名称 this.lblAreaName.Text = model.RouteName; //人数 this.lblCount.Text = model.PlanPeopleNumber.ToString(); //计划类型 this.lblTourType.Text = model.TourType.ToString(); if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { EyouSoft.Model.TourStructure.TourSingleInfo tsModel = (EyouSoft.Model.TourStructure.TourSingleInfo)model; //this.lblRemarks.Text =tsModel. } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model; if (tModel.TourNormalInfo != null) { //内部信息 this.lblRemarks.Text = tModel.TourNormalInfo.NeiBuXingXi; } //标志 this.txtNum4.Value = tModel.GatheringSign; //string gather = Utils.GetDateTimeNullable(tModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(tModel.GatheringTime).ToString(); //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点"); this.txtGather.Text = tModel.GatheringTime; IList <string> txtList = bll.GetTourGuides(tourId); if (txtList != null) { if (txtList.Count > 0) { this.txtNum1.Value = txtList[0]; } if (txtList.Count > 1) { this.txtNum2.Value = txtList[1]; } if (txtList.Count > 2) { this.txtNum3.Value = txtList[2]; } } } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; #region 人数And结算价 TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, ttModel.TourTeamUnit, ref number, ref money); this.lblCount.Text = number; #endregion //内部信息 if (ttModel.TourNormalInfo != null) { this.lblRemarks.Text = ttModel.TourNormalInfo.NeiBuXingXi; } //标志 this.txtNum4.Value = ttModel.GatheringSign; //string gather = Utils.GetDateTimeNullable(ttModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(ttModel.GatheringTime).ToString(); //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点"); this.txtGather.Text = ttModel.GatheringTime; IList <string> txtList = bll.GetTourGuides(tourId); if (txtList != null) { if (txtList.Count > 0) { this.txtNum1.Value = txtList[0]; } if (txtList.Count > 1) { this.txtNum2.Value = txtList[1]; } if (txtList.Count > 2) { this.txtNum3.Value = txtList[2]; } } } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> protected void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null) { if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model; if (tModel != null) { //线路名称 this.litRouteName.Text = tModel.RouteName; EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId")); if (order != null) { //组团社 this.litBuyCompanyName.Text = order.BuyCompanyName; //组团社联系人 this.litCustomName.Text = order.ContactName; this.litTel.Text = order.ContactTel; this.litFax.Text = order.ContactFax; //游客信息 string strVistors = string.Empty; if (order.CustomerList != null && order.CustomerList.Count > 0) { for (int i = 0; i < order.CustomerList.Count; i++) { strVistors += order.CustomerList[i].VisitorName + ","; } this.litVisitorsList.Text = strVistors.TrimEnd(','); } } //机场送团 if (tModel.SentPeoples != null && tModel.SentPeoples.Count > 0) { string strSongTuanName = string.Empty; for (int i = 0; i < tModel.SentPeoples.Count; i++) { strSongTuanName += tModel.SentPeoples[i].OperatorName + ","; } this.litSongTuanName.Text = strSongTuanName.TrimEnd(','); //手机 EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(tModel.SentPeoples[0].OperatorId); if (userModel != null) { this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile; } } //去程航班/时间 this.litLFilght.Text = tModel.LTraffic; //返程航班/时间 this.litRFilght.Text = tModel.RTraffic; //集合地点 this.litJihePlace.Text = tModel.GatheringPlace; if (tModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { this.litQplan.Visible = false; this.pnequick.Visible = false; if (tModel.TourNormalInfo != null) { //注意事项 this.litZhuYiShiXiang.Text = tModel.TourNormalInfo.ZhuYiShiXiang; //温馨提醒 this.litWenXinTiXing.Text = tModel.TourNormalInfo.WenXinTiXing; //行程安排 if (tModel.TourNormalInfo.Plans != null && tModel.TourNormalInfo.Plans.Count > 0) { for (int i = 0; i < tModel.TourNormalInfo.Plans.Count; i++) { TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>"; } } } } else { this.pnetab.Visible = false; this.tabView.Attributes.Add("style", "border: 1px #000000 solid"); this.pneStand.Visible = false; if (tModel.TourQuickInfo != null) { this.litQplan.Text = tModel.TourQuickInfo.QuickPlan; this.litServerStand.Text = tModel.TourQuickInfo.Service; } } } } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; if (ttModel != null) { //线路名称 this.litRouteName.Text = ttModel.RouteName; //组团社 this.litBuyCompanyName.Text = ttModel.BuyerCName; //组团社联系人 EyouSoft.Model.CompanyStructure.CustomerInfo CustomerInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(ttModel.BuyerCId); if (CustomerInfo != null) { this.litCustomName.Text = CustomerInfo.ContactName; this.litTel.Text = CustomerInfo.Phone; this.litFax.Text = CustomerInfo.Fax; } EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId")); if (order != null) { //组团社 this.litBuyCompanyName.Text = order.BuyCompanyName; //组团社联系人 this.litCustomName.Text = order.ContactName; this.litTel.Text = order.ContactTel; this.litFax.Text = order.ContactFax; //游客信息 string strVistors = string.Empty; if (order.CustomerList != null && order.CustomerList.Count > 0) { for (int i = 0; i < order.CustomerList.Count; i++) { strVistors += order.CustomerList[i].VisitorName + ","; } this.litVisitorsList.Text = strVistors.TrimEnd(','); } } //机场送团 if (ttModel.SentPeoples != null && ttModel.SentPeoples.Count > 0) { string strSongTuanName = string.Empty; for (int i = 0; i < ttModel.SentPeoples.Count; i++) { strSongTuanName += ttModel.SentPeoples[i].OperatorName + ","; } this.litSongTuanName.Text = strSongTuanName.TrimEnd(','); //手机 EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(ttModel.SentPeoples[0].OperatorId); if (userModel != null) { this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile; } } //去程航班/时间 this.litLFilght.Text = ttModel.LTraffic; //返程航班/时间 this.litRFilght.Text = ttModel.RTraffic; //集合地点 this.litJihePlace.Text = ttModel.GatheringPlace; if (ttModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { this.litQplan.Visible = false; this.pnequick.Visible = false; if (ttModel.TourNormalInfo != null) { //注意事项 this.litZhuYiShiXiang.Text = ttModel.TourNormalInfo.ZhuYiShiXiang; //温馨提醒 this.litWenXinTiXing.Text = ttModel.TourNormalInfo.WenXinTiXing; //行程安排 if (ttModel.TourNormalInfo.Plans != null && ttModel.TourNormalInfo.Plans.Count > 0) { for (int i = 0; i < ttModel.TourNormalInfo.Plans.Count; i++) { TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>"; } } } } else { this.pnetab.Visible = false; this.pneStand.Visible = false; this.tabView.Attributes.Add("style", "border: 1px #000000 solid"); if (ttModel.TourQuickInfo != null) { this.litQplan.Text = ttModel.TourQuickInfo.QuickPlan; this.litServerStand.Text = ttModel.TourQuickInfo.Service; } } } } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(null, false); //声明团队计划对象 EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(tourId); if (model != null && model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { //出团日期 LeaveDate = model.LDate; //旅游天数 lblDayCount.Text = model.TourDays.ToString(); #region 页面控件赋值 //线路名称 this.lblAreaName.Text = model.RouteName; //团号 this.lblTeamNum.Text = model.TourCode; this.lblTeamNum.Visible = true; this.txttourcode.Visible = false; //人数 this.lblAdult.Text = model.PlanPeopleNumber.ToString(); this.lblAdult.Visible = true; this.TXTADULT.Visible = false; //出发交通 this.lblBegin.Text = model.LTraffic; this.lblBegin.Visible = true; this.TXtBEGIN.Visible = false; //返程交通 this.lblEnd.Text = model.RTraffic; this.lblEnd.Visible = true; this.TXTEnd.Visible = false; if (model.TourNormalInfo != null) { //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //儿童安排 this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); //自费项目 this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //温馨提示 this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); //行程安排 this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); //包含项目 if (model.TourNormalInfo.Services != null) { tdCount = model.TourNormalInfo.Services.Count * 2; } this.rptProject.DataSource = model.TourNormalInfo.Services; this.rptProject.DataBind(); } //地接社信息 this.rptDjInfo.DataSource = model.LocalAgencys; this.rptDjInfo.DataBind(); this.Panel1.Visible = true; #endregion } //组团散客天天发行程单 if (EyouSoft.Common.Utils.GetQueryStringValue("action") == "tourevery") { string tourid = Utils.GetQueryStringValue("tourid"); EyouSoft.BLL.TourStructure.TourEveryday everybl = new EyouSoft.BLL.TourStructure.TourEveryday(null, false); EyouSoft.Model.TourStructure.TourEverydayInfo everymodel = new EyouSoft.Model.TourStructure.TourEverydayInfo(); everymodel = everybl.GetTourEverydayInfo(tourid); if (everymodel != null) { //线路名称 this.lblAreaName.Text = everymodel.RouteName; //团号 this.lblTeamNum.Visible = false; this.txttourcode.Visible = true; //天数 this.lblDayCount.Text = everymodel.TourDays.ToString(); //成人数 this.lblAdult.Visible = false; this.TXTADULT.Attributes.Add("style", "width:30px;"); //儿童数 //出发交通 this.lblBegin.Visible = false; //返程交通 this.lblEnd.Visible = false; if (everymodel.TourNormalInfo != null) { //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.GouWuAnPai); //儿童安排 this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ErTongAnPai); //自费项目 this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ZiFeiXIangMu); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.ZhuYiShiXiang); //温馨提示 this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(everymodel.TourNormalInfo.WenXinTiXing); //行程安排 this.rptTravel.DataSource = everymodel.TourNormalInfo.Plans; this.rptTravel.DataBind(); //包含项目 if (everymodel.TourNormalInfo.Services != null) { tdCount = everymodel.TourNormalInfo.Services.Count * 2; } this.rptProject.DataSource = everymodel.TourNormalInfo.Services; this.rptProject.DataBind(); } //地接社信息 this.Panel1.Visible = false; } } }
protected void GetSingleServer(string Tourid, string planId) { EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(this.SiteUserInfo); EyouSoft.Model.TourStructure.TourSingleInfo EditModel = null; EditModel = (EyouSoft.Model.TourStructure.TourSingleInfo)tourBll.GetTourInfo(Tourid); if (EditModel != null) { //计划人数 this.PelpeoNumber.Value = EditModel.PlanPeopleNumber.ToString(); //确认时间 this.ConfirmDate.Value = System.DateTime.Now.ToString("yyyy-MM-dd"); //供应商信息集合 IList <EyouSoft.Model.TourStructure.PlanSingleInfo> planlist = EditModel.Plans; if (planId != "") { EyouSoft.Model.TourStructure.PlanSingleInfo singleModel = new EyouSoft.BLL.TourStructure.Tour().GetSinglePlanInfo(planId); if (singleModel != null) { //获取供应商信息--供应商名称 this.txtTo.Value = singleModel.SupplierName; //获取供应商信息--供应商Id int supplierid = singleModel.SupplierId; //实例化供应商基础信息BLL EyouSoft.BLL.CompanyStructure.SupplierBaseHandle csBLL = new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle(); //实例化供应商基础信息Model EyouSoft.Model.CompanyStructure.SupplierBasic model = new EyouSoft.Model.CompanyStructure.SupplierBasic(); //根据供应商基础信息ID获取供应商实体 model = csBLL.GetSupplierBase(supplierid); //供应商基础信息不为空并且联系人不为空 if (model != null && model.SupplierContact != null) { //供应商 联系人电话 this.txtTel.Value = model.SupplierContact[0].ContactTel; //供应商联系人Fax this.txtFax.Value = model.SupplierContact[0].ContactFax; } this.lblServiceType.Text = "<strong>服务类别:</strong>" + singleModel.ServiceType.ToString(); this.lblSupplierName.Text = "<strong>供应商:</strong>" + singleModel.SupplierName; this.lblArrange.Text = "<strong>具体安排:</strong>" + singleModel.Arrange; } else { this.pnlIsShow.Visible = false; this.Repeaterlist.DataSource = planlist; this.Repeaterlist.DataBind(); } } else { //客户单位名称 this.txtTo.Value = EditModel.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(EditModel.BuyerCId); if (cusModel != null) { //组团 联系人电话 this.txtTel.Value = cusModel.Phone; //组团联系人Fax this.txtFax.Value = cusModel.Fax; } this.pnlIsShow.Visible = false; this.Repeaterlist.DataSource = planlist; this.Repeaterlist.DataBind(); } #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(EditModel.OperatorId); if (userInfoModel != null) { //主要联系人电话 this.txtTelS.Value = userInfoModel.ContactTel; //专线FAX this.txtFaxS.Value = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(EditModel.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.txtFr.Value = companyModel.CompanyName; } } #endregion //游客信息 IList <EyouSoft.Model.TourStructure.TourOrderCustomer> customer = EditModel.Customers.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); ; if (customer.Count > 0 && customer != null) { this.repCustomer.DataSource = customer; this.repCustomer.DataBind(); } } }
protected void LinkButton1_Click(object sender, EventArgs e) { LinkButton btn = sender as LinkButton; EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(Request.QueryString["tourId"]); if (model != null) { if (!Utils.PlanIsUpdateOrDelete(model.Status.ToString())) { Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>"); return; } } //结算标准 string jsbj = Request.Form["radio"]; int cr_num = Utils.GetInt(txt_crNum.Value); int et_num = Utils.GetInt(txt_rtNum.Value); decimal sum_money = Utils.GetDecimal(txt_sumMoney.Value); string special = txt_Special.Value; //散拼信息 //EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); //model = (EyouSoft.Model.TourStructure.TourInfo)bll.GetTourInfo(Request.QueryString["tourId"]); //model.PriceStandards EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.TourOrder ordermodel = new EyouSoft.Model.TourStructure.TourOrder(); int crNum = Utils.GetInt(txt_crNum.Value); if (crNum == 0) { EyouSoft.Common.Function.MessageBox.Show(this.Page, "请填写成人数!"); BindXlInfo(); BindPireList(); return; } ordermodel.AdultNumber = crNum; ordermodel.AreaId = model.AreaId; int teamId = Utils.GetInt(Utils.GetFormValue("hd_teamId")); if (teamId == 0) { EyouSoft.Common.Function.MessageBox.Show(this.Page, "请选择组团社!"); BindXlInfo(); BindPireList(); return; //Response.Write("<script>alert('请选择组团社');location.href=location.href;</script>"); } ordermodel.BuyCompanyID = teamId; ordermodel.BuyCompanyName = Utils.GetFormValue("txt_teamName"); ordermodel.ChildNumber = Utils.GetInt(txt_rtNum.Value); ordermodel.ChildPrice = Utils.GetDecimal(Utils.GetFormValue("hd_rt_price")); int cusLevel = Utils.GetInt(Utils.GetFormValue("hd_cuslevel")); if (cusLevel == 0) { EyouSoft.Common.Function.MessageBox.Show(this.Page, "请选择客户等级!"); BindXlInfo(); BindPireList(); return; } ordermodel.CustomerLevId = cusLevel; IList <EyouSoft.Model.TourStructure.TourOrderCustomer> cus_list = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>(); string[] cus_arr = Utils.GetFormValues("txtVisitorName"); string[] uri = Utils.GetFormValues("tefu"); string[] cradType = Utils.GetFormValues("ddlCardType"); decimal orderprice = 0; for (int k = 0; k < cus_arr.Length; k++) { if (cus_arr[k] == "") { break; } EyouSoft.Model.TourStructure.TourOrderCustomer item = new EyouSoft.Model.TourStructure.TourOrderCustomer(); item.VisitorName = cus_arr[k]; item.VisitorType = Utils.GetFormValues("ddlVisitorType")[k] == "1" ? EyouSoft.Model.EnumType.TourStructure.VisitorType.成人 : EyouSoft.Model.EnumType.TourStructure.VisitorType.儿童; //switch (Utils.GetFormValues("ddlCardType")[k]) //{ // case "1": // { // item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.身份证; // } break; // case "2": // { // item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.护照; // } break; // case "3": // { // item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.军官证; // } break; // case "4": // { // item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.台胞证; // } break; // case "5": // { // item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.港澳通行证; // } break; // default: // { // item.CradType = EyouSoft.Model.EnumType.TourStructure.CradType.未知; // } break; //} item.CradType = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(cradType[k]); item.CradNumber = Utils.GetFormValues("txtCardNo")[k]; switch (Utils.GetFormValues("ddlSex")[k]) { case "2": { item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.男; } break; case "1": { item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.女; } break; default: { item.Sex = EyouSoft.Model.EnumType.CompanyStructure.Sex.未知; } break; } item.ContactTel = Utils.GetFormValues("txtContactTel")[k]; EyouSoft.Model.TourStructure.CustomerSpecialService css = new EyouSoft.Model.TourStructure.CustomerSpecialService(); css.Fee = Utils.GetDecimal(Utils.GetFromQueryStringByKey(uri[k], "txtCost")); css.IsAdd = Utils.GetFromQueryStringByKey(uri[k], "ddlOperate") == "0" ? true : false; css.IssueTime = DateTime.Now; css.ProjectName = Utils.GetFromQueryStringByKey(uri[k], "txtItem"); css.ServiceDetail = Utils.GetFromQueryStringByKey(uri[k], "txtServiceContent"); item.SpecialServiceInfo = css; item.IssueTime = DateTime.Now; item.CompanyID = CurrentUserCompanyID; cus_list.Add(item); orderprice += Utils.GetDecimal(Utils.GetFromQueryStringByKey(uri[k], "txtCost")); } ordermodel.IssueTime = DateTime.Now; ordermodel.OperatorContent = Utils.GetFormValue("txt_actMsg"); ordermodel.SpecialContent = Utils.GetFormValue("txt_Special"); ordermodel.CustomerList = cus_list; ordermodel.LastDate = DateTime.Now; ordermodel.LeaveDate = model.LDate; ordermodel.PriceStandId = Utils.GetInt(Utils.GetFormValue("hd_level")); ordermodel.PersonalPrice = Utils.GetDecimal(Utils.GetFormValue("hd_cr_price")); ordermodel.ChildPrice = Utils.GetDecimal(Utils.GetFormValue("hd_rt_price")); ordermodel.ID = Guid.NewGuid().ToString(); ordermodel.CustomerList = cus_list; ordermodel.TourId = model.TourId; ordermodel.OrderType = EyouSoft.Model.EnumType.TourStructure.OrderType.代客预定; ordermodel.SellCompanyId = CurrentUserCompanyID; ordermodel.SellCompanyName = SiteUserInfo.CompanyName; ordermodel.ViewOperatorId = SiteUserInfo.ID; ordermodel.TourNo = model.TourCode; ordermodel.Tourdays = model.TourDays; ordermodel.TourClassId = EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划; ordermodel.OperatorID = SiteUserInfo.ID; ordermodel.OperatorName = SiteUserInfo.ContactInfo.ContactName; ordermodel.OrderState = EyouSoft.Model.EnumType.TourStructure.OrderState.未处理; ordermodel.OtherPrice = orderprice; ordermodel.RouteId = model.RouteId; ordermodel.RouteName = model.RouteName; ordermodel.SumPrice = Utils.GetDecimal(Utils.GetFormValue(txt_sumMoney.UniqueID)) + orderprice; ordermodel.PeopleNumber = Utils.GetInt(Utils.GetFormValue("txt_crNum")) + Utils.GetInt(Utils.GetFormValue("txt_rtNum")); ordermodel.ContactTel = lt_phone.Text; ordermodel.ContactName = lb_username.Text; ordermodel.ContactMobile = lt_tel.Text; ordermodel.LeaveTraffic = lt_startBus.Text; ordermodel.ReturnTraffic = lt_backBus.Text; ordermodel.ContactFax = lt_fax.Text; EyouSoft.BLL.CompanyStructure.Customer csbll = new EyouSoft.BLL.CompanyStructure.Customer(); EyouSoft.Model.CompanyStructure.CustomerInfo cusmodel = csbll.GetCustomerModel(Utils.GetInt(Utils.GetFormValue("hd_teamId"))); // EyouSoft.Model.TourStructure.TourOrderAmountPlusInfo am = new EyouSoft.Model.TourStructure.TourOrderAmountPlusInfo(); am.AddAmount = Utils.GetDecimal(Utils.GetFormValue("txt_addmoney")); //增加费用 am.ReduceAmount = Utils.GetDecimal(Utils.GetFormValue("txt_minusmoney")); //减少费用 am.Remark = Utils.GetFormValue("txt_remark"); //备注 ordermodel.AmountPlus = am; if (cusmodel != null) { ordermodel.SalerId = cusmodel.SaleId; ordermodel.SalerName = cusmodel.Saler; } #region 返佣和对方操作员 ordermodel.BuyerContactId = Utils.GetInt(Utils.GetFormValue("otherOprator")); ordermodel.BuyerContactName = Utils.InputText(Utils.GetFormValue("hd_orderOprator")); ordermodel.CommissionType = (EyouSoft.Model.EnumType.CompanyStructure.CommissionType)Utils.GetInt(Utils.GetFormValue("hd_rebateType")); ordermodel.CommissionPrice = Utils.GetDecimal(Utils.GetFormValue("txt_Rebate")); #endregion switch (btn.CommandName) { ///提交 case "submit": { ordermodel.SaveSeatDate = DateTime.Now; ordermodel.OrderState = EyouSoft.Model.EnumType.TourStructure.OrderState.未处理; } break; case "Reservations": { ordermodel.OrderState = EyouSoft.Model.EnumType.TourStructure.OrderState.已留位; ordermodel.SaveSeatDate = Utils.GetDateTime(txtEndTime.Text, DateTime.Now); } break; //留位 } string fileAtt = ""; string oldfileAtt = ""; if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files[0], "VisitorInfoFile", out fileAtt, out oldfileAtt)) { ordermodel.CustomerFilePath = fileAtt; } else { EyouSoft.Common.Function.MessageBox.Show(this.Page, "上传附件失败!"); return; } ordermodel.BuyerTourCode = Utils.GetFormValue(txtBuyerTourCode.ClientID); ordermodel.OrderTrafficId = Utils.GetInt(Utils.GetFormValue("selectTraffic")); /// 0:失败; /// 1:成功; /// 2:该团队的订单总人数+当前订单人数大于团队计划人数总和; /// 3:该客户所欠金额大于最高欠款金额; int i = orderbll.AddOrder(ordermodel); switch (i) { case 1: { Response.Write("<script>alert('提交成功');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();parent.location.href=parent.location.href;</script>"); } break; case 2: { Response.Write("<script>alert('该团队的订单总人数+当前订单人数大于团队计划人数总和');location.href=location.href;</script>"); } break; case 3: { Response.Write("<script>alert('该客户所欠金额大于最高欠款金额');location.href=location.href;</script>"); } break; case 4: { Response.Write("<script>alert('订单人数加上交通出团日期当天已使用票数大于交通出团日期当天人数,添加失败!');location.href=location.href;</script>"); break; } default: { Response.Write("<script>alert('添加失败!');location.href=location.href;</script>"); } break; } }
/// <summary> /// 绑定所有信息 用于修改或复制 /// </summary> /// <returns></returns> void BindAllInfo(string id) { #region 基础信息绑定 selectXl.Id = "1"; selectXl.Name = ""; selectXl.Bind(); EyouSoft.BLL.TourStructure.Tour tour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourInfo binfo = new EyouSoft.Model.TourStructure.TourInfo(); binfo = (EyouSoft.Model.TourStructure.TourInfo)tour.GetTourInfo(id.ToString()); if (binfo.Coordinator != null) { hdOprator = binfo.Coordinator.CoordinatorId.ToString(); } if (ddl_area.Items.FindByValue(binfo.AreaId.ToString()) != null) { ddl_area.SelectedItem.Selected = false; ddl_area.Items.FindByValue(binfo.AreaId.ToString()).Selected = true; } selectXl.Name = binfo.RouteName; selectXl.Id = binfo.RouteId.ToString(); txt_Days.Text = binfo.TourDays.ToString(); //txt_pepoleNum.Text = binfo.PlanPeopleNumber.ToString(); TrafficStr = GetTrafficList(binfo.TourTraffic); if (actType == 1) { trgz.Visible = false; trteamNum.Visible = true; txt_teamNum.Value = binfo.TourCode; } txt_startTraffic.Text = binfo.LTraffic; txt_endTraffic.Text = binfo.RTraffic; txt_remark.Text = binfo.TourQuickInfo.Remark; DiJieControl1.SetList = binfo.LocalAgencys; #region 绑定价格信息 IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> listStand = binfo.PriceStandards; IList <EyouSoft.Model.CompanyStructure.CustomStand> list = new List <EyouSoft.Model.CompanyStructure.CustomStand>(); EyouSoft.BLL.CompanyStructure.CompanyCustomStand bll = new CompanyCustomStand(); list = bll.GetCustomStandByCompanyId(CurrentUserCompanyID); int kkk = list.Count; //for (int i = 0; i < listStand.Count; i++) //{ // for (int j = 0; j < listStand[i].CustomerLevels.Count; j++) // { // //if(listStand[i].CustomerLevels[i].LevelId == list.sel) // var vn= list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault(); // if(vn!=null) // listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName; // } //} // sinfo = listStand; IList <EyouSoft.Model.TourStructure.TourPriceStandardInfo> plist = new List <EyouSoft.Model.TourStructure.TourPriceStandardInfo>(); plist = binfo.PriceStandards; for (int i = 0; i < listStand.Count; i++) { int cc = listStand[i].CustomerLevels.Count; for (int j = 0; j < list.Count; j++) { //if(listStand[i].CustomerLevels[i].LevelId == list.sel) if (cc > j) { var vn = list.Where(x => x.Id == listStand[i].CustomerLevels[j].LevelId).FirstOrDefault(); if (vn != null) { listStand[i].CustomerLevels[j].LevelName = vn.CustomStandName; } else { //plist[i].CustomerLevels.RemoveAt(j); listStand[i].CustomerLevels[j].LevelId = 0; } } var xn = listStand[i].CustomerLevels.Where(x => x.LevelId == list[j].Id).FirstOrDefault(); if (xn == null) { listStand[i].CustomerLevels.Add(new EyouSoft.Model.TourStructure.TourPriceCustomerLevelInfo() { LevelId = list[j].Id, LevelType = list[j].LevType, LevelName = list[j].CustomStandName, AdultPrice = 0, ChildrenPrice = 0 }); } } } sinfo = plist; #endregion //List<EyouSoft.Model.TourStructure.TourPlanInfo> planInfo = binfo.TourNormalInfo.Plans.ToList(); //xingcheng1.Bind(planInfo); //ConProjectControl1.SetList = binfo.TourNormalInfo.Services; //txt_noProject.Value = binfo.TourNormalInfo.BuHanXiangMu; //txt_buy.Value = binfo.TourNormalInfo.GouWuAnPai; //txt_child.Value = binfo.TourNormalInfo.ErTongAnPai; //txt_owner.Value = binfo.TourNormalInfo.ZiFeiXIangMu; //txt_Note.Value = binfo.TourNormalInfo.ZhuYiShiXiang; //txt_Reminded.Value = binfo.TourNormalInfo.WenXinTiXing; txt_xinchen.Text = binfo.TourQuickInfo.QuickPlan; txt_fuwu.Text = binfo.TourQuickInfo.Service; #region 附件 if (binfo.Attachs.Count > 0) { if (binfo.Attachs[0].FilePath.Length > 1) { pnlFile.Visible = true; hypFilePath.NavigateUrl = binfo.Attachs[0].FilePath; hd_img.Value = binfo.Attachs[0].FilePath; } } #endregion ddl_city.SelectedItem.Selected = false; if (ddl_city.Items.FindByValue(binfo.TourCityId.ToString()) != null) { ddl_city.Items.FindByValue(binfo.TourCityId.ToString()).Selected = true; } #endregion }