Исправление: отображение заказа полное

This commit is contained in:
prodigygirl 2023-02-01 12:35:26 +04:00
parent f2a6fb7627
commit 9aa95be835
6 changed files with 31 additions and 38 deletions

View File

@ -49,6 +49,7 @@ namespace FurnitureAssembly
var operationResult = _logicO.CreateOrder(new OrderBindingModel var operationResult = _logicO.CreateOrder(new OrderBindingModel
{ {
FurnitureId = Convert.ToInt32(comboBoxProduct.SelectedValue), FurnitureId = Convert.ToInt32(comboBoxProduct.SelectedValue),
FurnitureName = comboBoxProduct.Text,
Count = Convert.ToInt32(textBoxCount.Text), Count = Convert.ToInt32(textBoxCount.Text),
Sum = Convert.ToDouble(textBoxSum.Text) Sum = Convert.ToDouble(textBoxSum.Text)
}); });

View File

@ -28,19 +28,18 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
this.dataGridView = new System.Windows.Forms.DataGridView(); this.dataGridView = new System.Windows.Forms.DataGridView();
this.ButtonCreateOrder = new System.Windows.Forms.Button(); this.ButtonCreateOrder = new System.Windows.Forms.Button();
this.ButtonTakeOrderInWork = new System.Windows.Forms.Button(); this.ButtonTakeOrderInWork = new System.Windows.Forms.Button();
this.ButtonOrderReady = new System.Windows.Forms.Button(); this.ButtonOrderReady = new System.Windows.Forms.Button();
this.ButtonIssuedOrder = new System.Windows.Forms.Button(); this.ButtonIssuedOrder = new System.Windows.Forms.Button();
this.ButtonRef = new System.Windows.Forms.Button(); this.ButtonRef = new System.Windows.Forms.Button();
this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.toolStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// dataGridView // dataGridView
@ -102,27 +101,24 @@
this.ButtonRef.UseVisualStyleBackColor = true; this.ButtonRef.UseVisualStyleBackColor = true;
this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click); this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
// //
// toolStrip1 // menuStrip1
// //
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripDropDownButton1}); this.справочникиToolStripMenuItem});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.menuStrip1.Name = "menuStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1065, 25); this.menuStrip1.Size = new System.Drawing.Size(1065, 24);
this.toolStrip1.TabIndex = 6; this.menuStrip1.TabIndex = 6;
this.toolStrip1.Text = "toolStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
// toolStripDropDownButton1 // справочникиToolStripMenuItem
// //
this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.компонентыToolStripMenuItem, this.компонентыToolStripMenuItem,
this.изделияToolStripMenuItem}); this.изделияToolStripMenuItem});
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(94, 20);
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; this.справочникиToolStripMenuItem.Text = "Справочники";
this.toolStripDropDownButton1.Size = new System.Drawing.Size(29, 22);
this.toolStripDropDownButton1.Text = "Справочники";
// //
// компонентыToolStripMenuItem // компонентыToolStripMenuItem
// //
@ -143,18 +139,19 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1065, 450); this.ClientSize = new System.Drawing.Size(1065, 450);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.ButtonRef); this.Controls.Add(this.ButtonRef);
this.Controls.Add(this.ButtonIssuedOrder); this.Controls.Add(this.ButtonIssuedOrder);
this.Controls.Add(this.ButtonOrderReady); this.Controls.Add(this.ButtonOrderReady);
this.Controls.Add(this.ButtonTakeOrderInWork); this.Controls.Add(this.ButtonTakeOrderInWork);
this.Controls.Add(this.ButtonCreateOrder); this.Controls.Add(this.ButtonCreateOrder);
this.Controls.Add(this.dataGridView); this.Controls.Add(this.dataGridView);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "FormMain"; this.Name = "FormMain";
this.Text = "Магазин мебели"; this.Text = "Магазин мебели";
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.toolStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@ -168,8 +165,8 @@
private Button ButtonOrderReady; private Button ButtonOrderReady;
private Button ButtonIssuedOrder; private Button ButtonIssuedOrder;
private Button ButtonRef; private Button ButtonRef;
private ToolStrip toolStrip1; private MenuStrip menuStrip1;
private ToolStripDropDownButton toolStripDropDownButton1; private ToolStripMenuItem справочникиToolStripMenuItem;
private ToolStripMenuItem компонентыToolStripMenuItem; private ToolStripMenuItem компонентыToolStripMenuItem;
private ToolStripMenuItem изделияToolStripMenuItem; private ToolStripMenuItem изделияToolStripMenuItem;
} }

View File

@ -57,17 +57,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripDropDownButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
</root> </root>

View File

@ -12,6 +12,7 @@ namespace FurnitureAssemblyContracts.BindingModels
{ {
public int Id { get; set; } public int Id { get; set; }
public int FurnitureId { get; set; } public int FurnitureId { get; set; }
public string FurnitureName { get; set; } = string.Empty;
public int Count { get; set; } public int Count { get; set; }
public double Sum { get; set; } public double Sum { get; set; }
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;

View File

@ -16,6 +16,8 @@ namespace FurnitureAssemblyListImplement.Models
{ {
public int FurnitureId { get; private set; } public int FurnitureId { get; private set; }
public string FurnitureName { get; private set; } = string.Empty;
public int Count { get; private set; } public int Count { get; private set; }
public double Sum { get; private set; } public double Sum { get; private set; }
@ -38,6 +40,7 @@ namespace FurnitureAssemblyListImplement.Models
{ {
Id = model.Id, Id = model.Id,
FurnitureId = model.FurnitureId, FurnitureId = model.FurnitureId,
FurnitureName = model.FurnitureName,
Count = model.Count, Count = model.Count,
Sum = model.Sum, Sum = model.Sum,
Status = model.Status, Status = model.Status,
@ -53,6 +56,7 @@ namespace FurnitureAssemblyListImplement.Models
return; return;
} }
FurnitureId = model.FurnitureId; FurnitureId = model.FurnitureId;
FurnitureName = model.FurnitureName;
Count = model.Count; Count = model.Count;
Sum = model.Sum; Sum = model.Sum;
Status = model.Status; Status = model.Status;
@ -64,7 +68,7 @@ namespace FurnitureAssemblyListImplement.Models
{ {
Id = Id, Id = Id,
FurnitureId = FurnitureId, FurnitureId = FurnitureId,
/*FurnitureName = Furn*/ FurnitureName = FurnitureName,
Count = Count, Count = Count,
Sum = Sum, Sum = Sum,
Status = Status, Status = Status,