forked from slavaxom9k/PIBD-23_Fomichev_V.S._MagicCarpet
8 лаба
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using MagicCarpetContracts.Exceptions;
|
||||
using MagicCarpetContracts.Extensions;
|
||||
using MagicCarpetContracts.Infrastructure;
|
||||
using MagicCarpetContracts.Mapper;
|
||||
using MagicCarpetContracts.Resources;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using System;
|
||||
@@ -34,6 +35,7 @@ internal class SaleDataModel : IValidation
|
||||
|
||||
public bool IsCancel { get; private set; }
|
||||
|
||||
[AlternativeName("SaleTours")]
|
||||
public List<SaleTourDataModel>? Tours { get; private set; }
|
||||
|
||||
public string ClientFIO => _client?.FIO ?? string.Empty;
|
||||
@@ -85,6 +87,8 @@ internal class SaleDataModel : IValidation
|
||||
public SaleDataModel(string id, string employeeId, string? clientId, int discountType,
|
||||
List<SaleTourDataModel> tours) : this(id, employeeId, clientId, (DiscountType)discountType, false, tours) { }
|
||||
|
||||
public SaleDataModel() : this(string.Empty, string.Empty, string.Empty, DiscountType.None, false, new List<SaleTourDataModel>()) { }
|
||||
|
||||
public void Validate(IStringLocalizer<Messages> localizer)
|
||||
{
|
||||
if (Id.IsEmpty())
|
||||
|
||||
Reference in New Issue
Block a user