/// <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]; } } } } }