фиг знает
This commit is contained in:
@@ -3,6 +3,7 @@ using ComputerHardwareStoreContracts.BusinessLogicsContracts;
|
||||
using ComputerHardwareStoreContracts.SearchModels;
|
||||
using ComputerHardwareStoreContracts.StorageContracts;
|
||||
using ComputerHardwareStoreContracts.ViewModels;
|
||||
using ComputerHardwareStoreDataModels.Enums;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace ComputerHardwareStoreBusinessLogic.BusinessLogic
|
||||
@@ -78,7 +79,6 @@ namespace ComputerHardwareStoreBusinessLogic.BusinessLogic
|
||||
model.OrderProduct = element.OrderProduct;
|
||||
model.DateCreate = element.DateCreate;
|
||||
model.Status = element.Status;
|
||||
model.Cost = element.Cost;
|
||||
|
||||
if (model.Status != orderStatus - 1)
|
||||
{
|
||||
@@ -106,9 +106,9 @@ namespace ComputerHardwareStoreBusinessLogic.BusinessLogic
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (model.Cost <= 0)
|
||||
if (model.Sum <= 0)
|
||||
{
|
||||
throw new ArgumentNullException("Цена заказа должна быть больше 0", nameof(model.Cost));
|
||||
throw new ArgumentNullException("Цена заказа должна быть больше 0", nameof(model.Sum));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user