From 5cf4115a8e6d9cadbf56ca6194cc8892e5e1aafa Mon Sep 17 00:00:00 2001 From: dasha Date: Sun, 12 Feb 2023 13:11:05 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D0=B4=D0=B5=D1=8E=D1=81=D1=8C=20?= =?UTF-8?q?=D1=8D=D1=82=D0=BE=20=D0=B2=D1=81=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SushiBar/SushiBar/FormMain.cs | 15 +++++++++++++++ SushiBar/SushiBarListImplement/Models/Order.cs | 1 + 2 files changed, 16 insertions(+) diff --git a/SushiBar/SushiBar/FormMain.cs b/SushiBar/SushiBar/FormMain.cs index aa6f30c..4ea5668 100644 --- a/SushiBar/SushiBar/FormMain.cs +++ b/SushiBar/SushiBar/FormMain.cs @@ -75,6 +75,11 @@ namespace SushiBarView var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel { Id = id, + SushiId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["SushiId"].Value), + Status = Enum.Parse(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) { @@ -100,6 +105,11 @@ namespace SushiBarView var operationResult = _orderLogic.FinishOrder(new OrderBindingModel { Id = id, + SushiId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["SushiId"].Value), + Status = Enum.Parse(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) { @@ -125,6 +135,11 @@ namespace SushiBarView var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel { Id = id, + SushiId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["SushiId"].Value), + Status = Enum.Parse(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) { diff --git a/SushiBar/SushiBarListImplement/Models/Order.cs b/SushiBar/SushiBarListImplement/Models/Order.cs index 522d392..445b162 100644 --- a/SushiBar/SushiBarListImplement/Models/Order.cs +++ b/SushiBar/SushiBarListImplement/Models/Order.cs @@ -38,6 +38,7 @@ namespace SushiBarListImplement.Models return; } Status = model.Status; + DateImplement = model.DateImplement; } public OrderViewModel GetViewModel => new() {