/// <summary> /// 绑定价格等级 /// </summary> private void BindingPriceCustomerLeaveDetail() { #region 价格等级信息 IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TourID); List <CompanyPriceDetail> newLists = new List <CompanyPriceDetail>(); CompanyPriceDetail cpModel = null; if (PriceLists != null && PriceLists.Count > 0) { PriceStandId = PriceLists[0].PriceStandId; ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item => { cpModel = new CompanyPriceDetail(); cpModel.PriceStandName = item.PriceStandName; cpModel.PriceStandId = item.PriceStandId; ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem => { switch (childItem.CustomerLevelType) { case EyouSoft.Model.CompanyStructure.CustomerLevelType.行: cpModel.AdultPrice1 = childItem.AdultPrice; cpModel.ChildrenPrice1 = childItem.ChildrenPrice; break; case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市: cpModel.AdultPrice2 = childItem.AdultPrice; cpModel.ChildrenPrice2 = childItem.ChildrenPrice; break; case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差: cpModel.SingleRoom1 = childItem.AdultPrice; cpModel.SingleRoom2 = childItem.ChildrenPrice; break; } }); newLists.Add(cpModel); cpModel = null; }); this.rptPrice.DataSource = newLists; this.rptPrice.DataBind(); newLists = null; } PriceLists = null; #endregion }
/// <summary> /// 获取报价等级列表 /// </summary> /// <param name="PriceLists"></param> /// <returns></returns> private List <CompanyPriceDetail> getPriceInfo(string TourID) { #region 价格等级信息 IList <EyouSoft.Model.TourStructure.TourPriceDetail> PriceLists = EyouSoft.BLL.TourStructure.Tour.CreateInstance().GetTourPriceDetail(TourID); List <CompanyPriceDetail> newLists = new List <CompanyPriceDetail>(); CompanyPriceDetail cpModel = null; if (PriceLists != null && PriceLists.Count > 0) { ((List <EyouSoft.Model.TourStructure.TourPriceDetail>)PriceLists).ForEach(item => { cpModel = new CompanyPriceDetail(); cpModel.PriceStandName = item.PriceStandName; ((List <EyouSoft.Model.TourStructure.TourPriceCustomerLeaveDetail>)item.PriceDetail).ForEach(childItem => { switch (childItem.CustomerLevelType) { case EyouSoft.Model.CompanyStructure.CustomerLevelType.行: cpModel.AdultPrice1 = childItem.AdultPrice; cpModel.ChildrenPrice1 = childItem.ChildrenPrice; break; case EyouSoft.Model.CompanyStructure.CustomerLevelType.门市: cpModel.AdultPrice2 = childItem.AdultPrice; cpModel.ChildrenPrice2 = childItem.ChildrenPrice; break; case EyouSoft.Model.CompanyStructure.CustomerLevelType.单房差: cpModel.SingleRoom1 = childItem.AdultPrice; cpModel.SingleRoom2 = childItem.ChildrenPrice; break; } }); newLists.Add(cpModel); cpModel = null; }); } PriceLists = null; #endregion return(newLists); }