Compare commits

...

2 Commits

Author SHA1 Message Date
8841a10725 Merge branch 'LabWork01' into LabWork02 2023-02-14 12:32:37 +04:00
12ca78bbe5 Исправления 2023-02-14 12:31:20 +04:00
2 changed files with 4 additions and 19 deletions

View File

@ -73,12 +73,7 @@ namespace SushiBarView
{
var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel
{
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()),
Id = id
});
if (!operationResult)
{
@ -103,12 +98,7 @@ namespace SushiBarView
{
var operationResult = _orderLogic.FinishOrder(new OrderBindingModel
{
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()),
Id = id
});
if (!operationResult)
{
@ -133,12 +123,7 @@ namespace SushiBarView
{
var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel
{
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()),
Id = id
});
if (!operationResult)
{

View File

@ -91,7 +91,7 @@ namespace SushiBarBusinessLogic.BusinessLogics
{
model.DateImplement = viewModel.DateImplement;
}
CheckModel(model);
CheckModel(model, false);
if (_orderStorage.Update(model) == null)
{
model.Status--;