AccountService.cs 825 B

12345678910111213141516171819202122232425262728293031323334
  1. using Cksoft.Data;
  2. using Cksoft.Data.Repository;
  3. using DllUfpDal;
  4. using DllUfpEntity;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Threading.Tasks;
  9. namespace AuthorizeCenter.Services
  10. {
  11. public class AccountService
  12. {
  13. public Staff Login(Staff staff, ref string errorinfo)
  14. {
  15. using (IDatabase db = DbFactory.Base("ufp"))
  16. {
  17. var dal = new StaffDal(db);
  18. var res = dal.Login(staff, ref errorinfo);
  19. return res;
  20. }
  21. }
  22. public Staff GetById(string id)
  23. {
  24. using (IDatabase db = DbFactory.Base("ufp"))
  25. {
  26. var dal = new StaffDal(db);
  27. var res = dal.Get(id);
  28. return res;
  29. }
  30. }
  31. }
  32. }