Esempio n. 1
0
 public bool Execute(SupplementaryDataLooseModel model)
 {
     return(string.IsNullOrEmpty(model.TotalHoursWorked?.Trim()) ||
            (decimal.TryParse(model.TotalHoursWorked, out var totalHoursWorked) &&
             DecimalHelper.CheckDecimalLengthAndPrecision(totalHoursWorked, IntegerPartLength, PrecisionLength)));
 }
Esempio n. 2
0
 public bool Execute(SupplementaryDataLooseModel model)
 {
     return(string.IsNullOrEmpty(model.ProjectHours?.Trim()) ||
            (decimal.TryParse(model.ProjectHours, out var projectHours) &&
             DecimalHelper.CheckDecimalLengthAndPrecision(projectHours, IntegerPartLength, PrecisionLength)));
 }
 public bool IsValid(SupplementaryDataLooseModel model)
 {
     return(string.IsNullOrEmpty(model.Value?.Trim()) ||
            (decimal.TryParse(model.Value, out var value) &&
             DecimalHelper.CheckDecimalLengthAndPrecision(value, IntegerPartLength, PrecisionLength)));
 }