DictionaryDAL.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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.SystemSetting;
  8. using EMIS.Entities;
  9. namespace EMIS.DataLogic.SystemSetting
  10. {
  11. public class DictionaryDAL
  12. {
  13. public DictionaryRepository DictionaryRepository { get; set; }
  14. /// <summary>
  15. /// 查询对应的字典类型信息View
  16. /// </summary>
  17. /// <param name="exp"></param>
  18. /// <returns></returns>
  19. public IQueryable<DictionaryView> GetDictionaryViewQueryable(Expression<Func<Sys_Dictionary, bool>> exp)
  20. {
  21. var query = from dic in DictionaryRepository.GetList(exp)
  22. select new DictionaryView
  23. {
  24. OrderNo = dic.OrderNo,
  25. DictionaryCode = dic.DictionaryCode,
  26. DictionaryName = dic.Name,
  27. IsEditable = dic.IsEditable == true ? true : false,
  28. RecordStatus = dic.RecordStatus
  29. };
  30. return query;
  31. }
  32. }
  33. }