EapAsyncHistoryDal.cs 923 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using Cksoft.Data;
  2. using DllEapEntity;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Text;
  6. namespace DllEapDal
  7. {
  8. public class EapAsyncHistoryDal
  9. {
  10. public IDatabase CurrDb { get; set; }
  11. public EapAsyncHistoryDal(IDatabase db)
  12. {
  13. CurrDb = db;
  14. }
  15. public int Insert(EapAsyncHistory history,ref string errorinfo)
  16. {
  17. if (CurrDb.InsertFor(history, string.Empty) < 0)
  18. return -1;
  19. return 1;
  20. }
  21. public IEnumerable<EapAsyncHistory> Get(string filter)
  22. {
  23. string errorinfo = string.Empty;
  24. return CurrDb.FindListForCondition<EapAsyncHistory>(filter, ref errorinfo);
  25. }
  26. public int Update(EapAsyncHistory history)
  27. {
  28. if (CurrDb.UpdateFor(history, string.Empty) < 0)
  29. return -1;
  30. return 1;
  31. }
  32. }
  33. }