LoginCls.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Common;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using com.hnshituo.core.webapp.vo;
  8. namespace CarMeterSystem
  9. {
  10. public class LoginCls
  11. {
  12. public bool LoginIn()
  13. {
  14. MeterBaseSpotInfoService service = new MeterBaseSpotInfoService();
  15. if (AppConfigCache.productType == "2" || AppConfigCache.productType == "0")
  16. {
  17. RESTfulResult<List<MeterBaseSpotInfo>> rm = service.doQueryWf(new MeterBaseSpotInfo { flatComputerIp = IpAddress.getIp, validFlag = "1" });
  18. if (rm.Succeed && rm.Data != null && rm.Data.Count > 0)
  19. {
  20. PbCache.sportInfo = rm.Data[0];
  21. return true;
  22. }
  23. else
  24. {
  25. return false;
  26. }
  27. }
  28. else
  29. {
  30. RESTfulResult<List<MeterBaseSpotInfo>> rm = service.doQueryWf(new MeterBaseSpotInfo { flatComputerIp = IpAddress.getIp, validFlag = "1" });
  31. if (rm.Succeed && rm.Data != null && rm.Data.Count > 0)
  32. {
  33. PbCache.sportInfo = rm.Data[0];
  34. return true;
  35. }
  36. else
  37. {
  38. return false;
  39. }
  40. }
  41. }
  42. }
  43. }