AttachementDal.cs 669 B

12345678910111213141516171819202122232425262728
  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 AttachmentDal
  9. {
  10. private IDatabase CurrDb;
  11. public AttachmentDal(IDatabase db)
  12. {
  13. CurrDb = db;
  14. }
  15. public IEnumerable<Attachment> GetAttachments(string preId,ref string errorinfo)
  16. {
  17. return CurrDb.FindListForCondition<Attachment>($" and a.PreId='{preId}'", ref errorinfo);
  18. }
  19. public int Insert(Attachment attachment,string userCode)
  20. {
  21. return CurrDb.InsertFor<Attachment>(attachment, userCode);
  22. }
  23. }
  24. }