diff --git a/LawFirm/LawFirmBusinessLogic/BusinessLogics/ShopLogic.cs b/LawFirm/LawFirmBusinessLogic/BusinessLogics/ShopLogic.cs index 5dec67d..1310740 100644 --- a/LawFirm/LawFirmBusinessLogic/BusinessLogics/ShopLogic.cs +++ b/LawFirm/LawFirmBusinessLogic/BusinessLogics/ShopLogic.cs @@ -115,8 +115,7 @@ namespace LawFirmBusinessLogic.BusinessLogics } if (count <= 0) { - return false; - throw new ArgumentException("Количество поездок должно быть больше 0", nameof(count)); + throw new ArgumentException("Количество документов должно быть больше 0", nameof(count)); } _logger.LogInformation("AddDocument. ShopName:{ShopName}. Id:{Id}", model.ShopName, model.Id); var element = _shopStorage.GetElement(model); diff --git a/LawFirm/LawFirmView/FormCreateOrder.cs b/LawFirm/LawFirmView/FormCreateOrder.cs index e971622..f6097f4 100644 --- a/LawFirm/LawFirmView/FormCreateOrder.cs +++ b/LawFirm/LawFirmView/FormCreateOrder.cs @@ -45,12 +45,12 @@ namespace LawFirmView try { int id = Convert.ToInt32(comboBoxDocument.SelectedValue); - var product = _logicD.ReadElement(new DocumentSearchModel + var document = _logicD.ReadElement(new DocumentSearchModel { Id = id }); int count = Convert.ToInt32(textBoxCount.Text); - textBoxSum.Text = Math.Round(count * (product?.Price ?? 0), 2).ToString(); + textBoxSum.Text = Math.Round(count * (document?.Price ?? 0), 2).ToString(); _logger.LogInformation("Расчет суммы заказа"); } catch (Exception ex)