diff --git a/SoftwareInstallation/SoftwareInstallation/FormMain.cs b/SoftwareInstallation/SoftwareInstallation/FormMain.cs index 741aead..56b4ea3 100644 --- a/SoftwareInstallation/SoftwareInstallation/FormMain.cs +++ b/SoftwareInstallation/SoftwareInstallation/FormMain.cs @@ -94,7 +94,14 @@ namespace SoftwareInstallationView { var operationResult = _orderLogic.TakeOrderInWork(new OrderBindingModel { - Id = id + Id = id, + ClientId= Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ClientId"].Value), + PackageId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["PackageId"].Value), + PackageName = DataGridView.SelectedRows[0].Cells["PackageName"].Value.ToString(), + 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) @@ -123,7 +130,14 @@ namespace SoftwareInstallationView { var operationResult = _orderLogic.FinishOrder(new OrderBindingModel { - Id = id + Id = id, + ClientId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ClientId"].Value), + PackageId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["PackageId"].Value), + PackageName = DataGridView.SelectedRows[0].Cells["PackageName"].Value.ToString(), + 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) @@ -152,7 +166,14 @@ namespace SoftwareInstallationView { var operationResult = _orderLogic.DeliveryOrder(new OrderBindingModel { - Id = id + Id = id, + ClientId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["ClientId"].Value), + PackageId = Convert.ToInt32(DataGridView.SelectedRows[0].Cells["PackageId"].Value), + PackageName = DataGridView.SelectedRows[0].Cells["PackageName"].Value.ToString(), + 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/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230326141801_CreateDb.Designer.cs b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230327190743_InitCr.Designer.cs similarity index 99% rename from SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230326141801_CreateDb.Designer.cs rename to SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230327190743_InitCr.Designer.cs index 55f1679..c3a9a08 100644 --- a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230326141801_CreateDb.Designer.cs +++ b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230327190743_InitCr.Designer.cs @@ -12,8 +12,8 @@ using SoftwareInstallationDataBaseImplement; namespace SoftwareInstallationDataBaseImplement.Migrations { [DbContext(typeof(SoftwareInstallationDataBase))] - [Migration("20230326141801_CreateDb")] - partial class CreateDb + [Migration("20230327190743_InitCr")] + partial class InitCr { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) diff --git a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230326141801_CreateDb.cs b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230327190743_InitCr.cs similarity index 99% rename from SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230326141801_CreateDb.cs rename to SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230327190743_InitCr.cs index 80afc93..735547f 100644 --- a/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230326141801_CreateDb.cs +++ b/SoftwareInstallation/SoftwareInstallationDataBaseImplement/Migrations/20230327190743_InitCr.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace SoftwareInstallationDataBaseImplement.Migrations { /// - public partial class CreateDb : Migration + public partial class InitCr : Migration { /// protected override void Up(MigrationBuilder migrationBuilder)