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() {