Исправления
This commit is contained in:
parent
2591be00fd
commit
12ca78bbe5
@ -1,5 +1,4 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using SushiBar;
|
|
||||||
using SushiBarContracts.BindingModels;
|
using SushiBarContracts.BindingModels;
|
||||||
using SushiBarContracts.BusinessLogicsContracts;
|
using SushiBarContracts.BusinessLogicsContracts;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using SushiBar;
|
|
||||||
using SushiBarContracts.BindingModels;
|
using SushiBarContracts.BindingModels;
|
||||||
using SushiBarContracts.BusinessLogicsContracts;
|
using SushiBarContracts.BusinessLogicsContracts;
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using SushiBar;
|
|
||||||
using SushiBarContracts.BindingModels;
|
using SushiBarContracts.BindingModels;
|
||||||
using SushiBarContracts.BusinessLogicsContracts;
|
using SushiBarContracts.BusinessLogicsContracts;
|
||||||
using SushiBarDataModels.Enums;
|
using SushiBarDataModels.Enums;
|
||||||
@ -74,12 +73,7 @@ namespace SushiBarView
|
|||||||
{
|
{
|
||||||
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel
|
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id
|
||||||
SushiId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["SushiId"].Value),
|
|
||||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
|
||||||
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
|
||||||
Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
|
||||||
DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
|
||||||
});
|
});
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
@ -104,12 +98,7 @@ namespace SushiBarView
|
|||||||
{
|
{
|
||||||
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
|
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id
|
||||||
SushiId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["SushiId"].Value),
|
|
||||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
|
||||||
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
|
||||||
Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
|
||||||
DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
|
||||||
});
|
});
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
@ -134,12 +123,7 @@ namespace SushiBarView
|
|||||||
{
|
{
|
||||||
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
|
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
|
||||||
{
|
{
|
||||||
Id = id,
|
Id = id
|
||||||
SushiId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["SushiId"].Value),
|
|
||||||
Status = Enum.Parse<OrderStatus>(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()),
|
|
||||||
Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value),
|
|
||||||
Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()),
|
|
||||||
DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()),
|
|
||||||
});
|
});
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using SushiBar;
|
|
||||||
using SushiBarContracts.BindingModels;
|
using SushiBarContracts.BindingModels;
|
||||||
using SushiBarContracts.BusinessLogicsContracts;
|
using SushiBarContracts.BusinessLogicsContracts;
|
||||||
using SushiBarContracts.SearchModels;
|
using SushiBarContracts.SearchModels;
|
||||||
|
@ -91,7 +91,7 @@ namespace SushiBarBusinessLogic.BusinessLogics
|
|||||||
{
|
{
|
||||||
model.DateImplement = viewModel.DateImplement;
|
model.DateImplement = viewModel.DateImplement;
|
||||||
}
|
}
|
||||||
CheckModel(model);
|
CheckModel(model, false);
|
||||||
if (_orderStorage.Update(model) == null)
|
if (_orderStorage.Update(model) == null)
|
||||||
{
|
{
|
||||||
model.Status--;
|
model.Status--;
|
||||||
|
Loading…
Reference in New Issue
Block a user