diff --git a/SoftwareInstallation/SofrwareInstallationContracts/BindingModels/OrderBindingModel.cs b/SoftwareInstallation/SofrwareInstallationContracts/BindingModels/OrderBindingModel.cs index 6a84f1b..0d83ee0 100644 --- a/SoftwareInstallation/SofrwareInstallationContracts/BindingModels/OrderBindingModel.cs +++ b/SoftwareInstallation/SofrwareInstallationContracts/BindingModels/OrderBindingModel.cs @@ -23,5 +23,6 @@ namespace SofrwareInstallationContracts.BindingModels public DateTime? DateImplement { get; set; } public int Id { get; set; } + public string PackageName { get; set; } = string.Empty; } } diff --git a/SoftwareInstallation/SofrwareInstallationContracts/ViewModels/OrderViewModel.cs b/SoftwareInstallation/SofrwareInstallationContracts/ViewModels/OrderViewModel.cs index cf2378a..dcec9b6 100644 --- a/SoftwareInstallation/SofrwareInstallationContracts/ViewModels/OrderViewModel.cs +++ b/SoftwareInstallation/SofrwareInstallationContracts/ViewModels/OrderViewModel.cs @@ -16,6 +16,9 @@ namespace SofrwareInstallationContracts.ViewModels [DisplayName("Номер")] public int Id { get; set; } + [DisplayName("Название изделия")] + public string PackageName { get; set; } = string.Empty; + [DisplayName("Количество")] public int Count { get; set; } @@ -31,5 +34,6 @@ namespace SofrwareInstallationContracts.ViewModels [DisplayName("Дата выполнения")] public DateTime? DateImplement { get; set; } + } } diff --git a/SoftwareInstallation/SoftwareInstallation/FormCreateOrder.cs b/SoftwareInstallation/SoftwareInstallation/FormCreateOrder.cs index 7ea18c6..48c9170 100644 --- a/SoftwareInstallation/SoftwareInstallation/FormCreateOrder.cs +++ b/SoftwareInstallation/SoftwareInstallation/FormCreateOrder.cs @@ -114,6 +114,7 @@ namespace SoftwareInstallationView var operationResult = _logicO.CreateOrder(new OrderBindingModel { PackageId = Convert.ToInt32(PackageComboBox.SelectedValue), + PackageName=PackageComboBox.Text, Count = Convert.ToInt32(CountTextBox.Text), Sum = Convert.ToDouble(SumTextBox.Text) }); diff --git a/SoftwareInstallation/SoftwareInstallation/FormMain.Designer.cs b/SoftwareInstallation/SoftwareInstallation/FormMain.Designer.cs index 1a4b481..49adff0 100644 --- a/SoftwareInstallation/SoftwareInstallation/FormMain.Designer.cs +++ b/SoftwareInstallation/SoftwareInstallation/FormMain.Designer.cs @@ -48,7 +48,7 @@ this.СправочникиToolStripMenuItem}); this.MenuStrip.Location = new System.Drawing.Point(0, 0); this.MenuStrip.Name = "MenuStrip"; - this.MenuStrip.Size = new System.Drawing.Size(800, 24); + this.MenuStrip.Size = new System.Drawing.Size(865, 24); this.MenuStrip.TabIndex = 0; this.MenuStrip.Text = "menuStrip1"; // @@ -81,12 +81,12 @@ this.DataGridView.Location = new System.Drawing.Point(0, 27); this.DataGridView.Name = "DataGridView"; this.DataGridView.RowTemplate.Height = 25; - this.DataGridView.Size = new System.Drawing.Size(657, 421); + this.DataGridView.Size = new System.Drawing.Size(722, 421); this.DataGridView.TabIndex = 1; // // CreateOrderButton // - this.CreateOrderButton.Location = new System.Drawing.Point(663, 27); + this.CreateOrderButton.Location = new System.Drawing.Point(728, 28); this.CreateOrderButton.Name = "CreateOrderButton"; this.CreateOrderButton.Size = new System.Drawing.Size(125, 33); this.CreateOrderButton.TabIndex = 2; @@ -96,7 +96,7 @@ // // TakeOrderInWorkButton // - this.TakeOrderInWorkButton.Location = new System.Drawing.Point(663, 82); + this.TakeOrderInWorkButton.Location = new System.Drawing.Point(728, 83); this.TakeOrderInWorkButton.Name = "TakeOrderInWorkButton"; this.TakeOrderInWorkButton.Size = new System.Drawing.Size(125, 39); this.TakeOrderInWorkButton.TabIndex = 3; @@ -106,7 +106,7 @@ // // OrderReadyButton // - this.OrderReadyButton.Location = new System.Drawing.Point(663, 145); + this.OrderReadyButton.Location = new System.Drawing.Point(728, 146); this.OrderReadyButton.Name = "OrderReadyButton"; this.OrderReadyButton.Size = new System.Drawing.Size(125, 33); this.OrderReadyButton.TabIndex = 4; @@ -116,7 +116,7 @@ // // IssuedOrderButton // - this.IssuedOrderButton.Location = new System.Drawing.Point(663, 203); + this.IssuedOrderButton.Location = new System.Drawing.Point(728, 204); this.IssuedOrderButton.Name = "IssuedOrderButton"; this.IssuedOrderButton.Size = new System.Drawing.Size(125, 33); this.IssuedOrderButton.TabIndex = 5; @@ -126,7 +126,7 @@ // // UpdateListButton // - this.UpdateListButton.Location = new System.Drawing.Point(663, 261); + this.UpdateListButton.Location = new System.Drawing.Point(728, 262); this.UpdateListButton.Name = "UpdateListButton"; this.UpdateListButton.Size = new System.Drawing.Size(125, 33); this.UpdateListButton.TabIndex = 6; @@ -138,7 +138,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(800, 450); + this.ClientSize = new System.Drawing.Size(865, 450); this.Controls.Add(this.UpdateListButton); this.Controls.Add(this.IssuedOrderButton); this.Controls.Add(this.OrderReadyButton); diff --git a/SoftwareInstallation/SoftwareInstallation/FormMain.cs b/SoftwareInstallation/SoftwareInstallation/FormMain.cs index 4c18d71..d4eed9a 100644 --- a/SoftwareInstallation/SoftwareInstallation/FormMain.cs +++ b/SoftwareInstallation/SoftwareInstallation/FormMain.cs @@ -99,6 +99,7 @@ namespace SoftwareInstallationView { Id = id, 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()), @@ -133,6 +134,7 @@ namespace SoftwareInstallationView { Id = id, 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()), @@ -167,6 +169,7 @@ namespace SoftwareInstallationView { Id = id, 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()), diff --git a/SoftwareInstallation/SoftwareInstallation/FormMain.resx b/SoftwareInstallation/SoftwareInstallation/FormMain.resx index a694815..df8d8ea 100644 --- a/SoftwareInstallation/SoftwareInstallation/FormMain.resx +++ b/SoftwareInstallation/SoftwareInstallation/FormMain.resx @@ -60,4 +60,7 @@ 17, 17 + + 31 + \ No newline at end of file diff --git a/SoftwareInstallation/SoftwareInstallationDataModels/Models/IOrderModel.cs b/SoftwareInstallation/SoftwareInstallationDataModels/Models/IOrderModel.cs index a02d9a6..b860a33 100644 --- a/SoftwareInstallation/SoftwareInstallationDataModels/Models/IOrderModel.cs +++ b/SoftwareInstallation/SoftwareInstallationDataModels/Models/IOrderModel.cs @@ -10,6 +10,7 @@ namespace SoftwareInstallationDataModels.Models public interface IOrderModel : IId { int PackageId { get; } + string PackageName { get; } int Count { get; } double Sum { get; } OrderStatus Status { get; } diff --git a/SoftwareInstallation/SoftwareInstallationListImplement/Models/Order.cs b/SoftwareInstallation/SoftwareInstallationListImplement/Models/Order.cs index 8d3e254..b13976e 100644 --- a/SoftwareInstallation/SoftwareInstallationListImplement/Models/Order.cs +++ b/SoftwareInstallation/SoftwareInstallationListImplement/Models/Order.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using SofrwareInstallationContracts.BindingModels; @@ -15,6 +16,8 @@ namespace SoftwareInstallationListImplement.Models { public int PackageId { get; private set; } + public string PackageName { get; private set; } + public int Count { get; private set; } public double Sum { get; private set; } @@ -37,6 +40,7 @@ namespace SoftwareInstallationListImplement.Models { Id = model.Id, PackageId = model.PackageId, + PackageName=model.PackageName, Count = model.Count, Sum=model.Sum, Status = model.Status, @@ -52,6 +56,7 @@ namespace SoftwareInstallationListImplement.Models return; } PackageId = model.PackageId; + PackageName = model.PackageName; Count = model.Count; Sum = model.Sum; Status = model.Status; @@ -63,6 +68,7 @@ namespace SoftwareInstallationListImplement.Models { Id = Id, PackageId = PackageId, + PackageName = PackageName, Count = Count, Sum = Sum, Status = Status,