Mem_DataDictoryDAL.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Common.Model;
  2. using CoreEntity.Entity;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Text;
  7. using ZcPeng.PublicLibrary;
  8. namespace CoreEntity.DAL
  9. {
  10. public class Mem_DataDictoryDAL
  11. {
  12. public static IList<Mem_DataDictory> getDatas(string filter="")
  13. {
  14. #region 获取机构列表
  15. DataTable dt = new DataTable();
  16. string result;
  17. IList<Mem_DataDictory> permss = new List<Mem_DataDictory>(0);
  18. string commandText1 =
  19. "select A.*" +
  20. " from Mem_DataDictory as A " +
  21. " where 1=1 "
  22. +filter
  23. + " ORDER BY A.Value desc";
  24. bool success = DataAccess.GetValues(commandText1, ref dt, null, out result);
  25. #endregion
  26. if (dt != null && dt.Rows.Count > 0)
  27. {
  28. // 把DataTable转换为IList<T>
  29. permss = ModelConvertHelper<Mem_DataDictory>.ConvertToModel(dt);
  30. }
  31. return permss;
  32. }
  33. }
  34. }