DeptDAL.cs 881 B

12345678910111213141516171819202122232425262728293031
  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 DeptDAL
  11. {
  12. public static List<DeptDoc> getDept()
  13. {
  14. DataTable dt = new DataTable();
  15. string commandTextSupp = "Select * From DeptDoc";
  16. string resultSupp;
  17. List<List<Object>> parametersSupp = new List<List<Object>>();
  18. DataAccess.GetValues(commandTextSupp, ref dt, DataAccess.ToParameters(parametersSupp).ToArray(), out resultSupp);
  19. if (dt!=null && dt.Rows.Count > 0)
  20. {
  21. List<DeptDoc> suplist = (List<DeptDoc>)ModelConvertHelper<DeptDoc>.ConvertToModel(dt);
  22. return suplist;
  23. }
  24. return null;
  25. }
  26. }
  27. }