ChargeProjectDAL.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Linq.Expressions;
  5. using System.Text;
  6. using EMIS.DataLogic.Repositories;
  7. using EMIS.ViewModel;
  8. using EMIS.ViewModel.ChargeManage.ChargeSituation;
  9. using EMIS.Entities;
  10. namespace EMIS.DataLogic.ChargeManage.ChargeSituation
  11. {
  12. public class ChargeProjectDAL
  13. {
  14. public ChargeProjectRepository chargeProjectRepository { get; set; }
  15. /// <summary>
  16. /// 查询对应的收费项目信息
  17. /// </summary>
  18. /// <param name="exp"></param>
  19. /// <returns></returns>
  20. public IQueryable<ChargeProjectView> GetChargeProjectViewQueryAble(Expression<Func<EC_ChargeProject, bool>> exp)
  21. {
  22. var query = from pr in chargeProjectRepository.GetList(exp)
  23. select new ChargeProjectView
  24. {
  25. ChargeProjectID = pr.ChargeProjectID,
  26. ChrageProjectName = pr.Name,
  27. Remark = pr.Remark
  28. };
  29. return query;
  30. }
  31. }
  32. }