/// <summary> /// 多对一处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void rpt_list1_ItemDataBound(object sender, RepeaterItemEventArgs e) { EyouSoft.Model.TourStructure.LBTKZCTourInfo dv = ((EyouSoft.Model.TourStructure.LBTKZCTourInfo)(e.Item.DataItem)); if (dv.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); decimal totalAmount = 0; decimal unpaidAmount = 0; bll.GetTourExpense(dv.TourId, out totalAmount, out unpaidAmount, ExpendSearchInfo); Literal lt_amout = e.Item.FindControl("lt_Amount") as Literal; lt_amout.Text = "支出:" + Utils.FilterEndOfTheZeroDecimal(totalAmount) + "<br/>未付:" + Utils.FilterEndOfTheZeroDecimal(unpaidAmount); IsDanXiang = true; } else { if (dv.TourId != "") { EyouSoft.BLL.PlanStruture.TravelAgency bll = new EyouSoft.BLL.PlanStruture.TravelAgency(); IList <EyouSoft.Model.PlanStructure.PaymentList> list = bll.GetSettleList(dv.TourId, ExpendSearchInfo); if (list != null) { Repeater rpt = e.Item.FindControl("rpt_project") as Repeater; if (Utils.GetInt(Utils.GetQueryStringValue("comtype")) > 0) { if (Utils.GetInt(Utils.GetQueryStringValue("comtype")) == 1) { rpt.DataSource = list.Where(p => p.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接); } else { rpt.DataSource = list.Where(p => p.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.票务); } } else { rpt.DataSource = list; } rpt.DataBind(); } if (list.FirstOrDefault(i => i.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.地接) != null) { IsDiJie = true; } if (list.FirstOrDefault(i => i.SupplierType == EyouSoft.Model.EnumType.CompanyStructure.SupplierType.票务) != null) { IsJiPiao = true; } } } }