fix 小数点控制
This commit is contained in:
@@ -19,6 +19,8 @@ public class MealSupplementInitImportRequest : IValidatableObject
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||||
{
|
{
|
||||||
|
Balance = decimal.Parse(Balance.ToString("F2"));
|
||||||
|
|
||||||
if (Name.IsEmpty())
|
if (Name.IsEmpty())
|
||||||
{
|
{
|
||||||
yield return new ValidationResult($"工号{Code}姓名不能为空", new[] { nameof(Name) });
|
yield return new ValidationResult($"工号{Code}姓名不能为空", new[] { nameof(Name) });
|
||||||
|
|||||||
Reference in New Issue
Block a user