StandardStatusDal.cs 590 B

123456789101112131415161718192021222324
  1. using Cksoft.Data;
  2. using DllEapEntity.Dtos;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace DllEapDal
  7. {
  8. public class StandardStatusDal
  9. {
  10. private IDatabase CurrDb;
  11. public StandardStatusDal(IDatabase db)
  12. {
  13. CurrDb = db;
  14. }
  15. public IEnumerable<SelectDto<int?>> GetAll(string filter = "")
  16. {
  17. var sql = $"select StatusVal as value,FName as label from standardstatus " +
  18. $"where 1=1 {filter}";
  19. return CurrDb.FindList<SelectDto<int?>>(sql);
  20. }
  21. }
  22. }