validDataValidity.cs 922 B

12345678910111213141516171819202122232425262728293031
  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 MeterConditionLibrary
  9. {
  10. /// <summary>
  11. ///仪表重量验证:不是以0结尾的,不允许进行保存
  12. /// </summary>
  13. public class validDataValidity
  14. {
  15. /// <summary>
  16. /// 仪表重量验证:不是以0结尾的,不允许进行保存
  17. /// </summary>
  18. /// <param name="weight"></param>
  19. /// <returns></returns>
  20. public bool ValidMethod(double weight)
  21. {
  22. if (!PbCache.lockWgt.ToString().EndsWith("0"))
  23. {
  24. PbCache.ResultMessage = "仪表重量[" + weight + "]不是以0结尾,禁止计量操作,请点[语音求助]联系司秤工处理!";
  25. return false;
  26. }
  27. return true;
  28. }
  29. }
  30. }