ПИбд-22 Боровков М В 5 лабораторная работа #6

Closed
bekodeg wants to merge 44 commits from labWork5 into labWork4
3 changed files with 25 additions and 18 deletions
Showing only changes of commit 37c35dc435 - Show all commits

View File

@ -46,6 +46,7 @@
buttonOrderReady = new Button(); buttonOrderReady = new Button();
buttonIssuedOrder = new Button(); buttonIssuedOrder = new Button();
buttonRef = new Button(); buttonRef = new Button();
clientsToolStripMenuItem = new ToolStripMenuItem();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
menuStrip1.SuspendLayout(); menuStrip1.SuspendLayout();
SuspendLayout(); SuspendLayout();
@ -59,7 +60,7 @@
dataGridView.RowHeadersWidth = 51; dataGridView.RowHeadersWidth = 51;
dataGridView.RowTemplate.Height = 29; dataGridView.RowTemplate.Height = 29;
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect; dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
dataGridView.Size = new Size(992, 422); dataGridView.Size = new Size(986, 514);
dataGridView.TabIndex = 0; dataGridView.TabIndex = 0;
// //
// menuStrip1 // menuStrip1
@ -68,13 +69,13 @@
menuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItem, отчётыToolStripMenuItem1 }); menuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItem, отчётыToolStripMenuItem1 });
menuStrip1.Location = new Point(0, 0); menuStrip1.Location = new Point(0, 0);
menuStrip1.Name = "menuStrip1"; menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new Size(1501, 28); menuStrip1.Size = new Size(1184, 28);
menuStrip1.TabIndex = 1; menuStrip1.TabIndex = 1;
menuStrip1.Text = "menuStrip1"; menuStrip1.Text = "menuStrip1";
// //
// toolStripMenuItem // toolStripMenuItem
// //
toolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { sushiToolStripMenuItem, componentsToolStripMenuItem }); toolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { sushiToolStripMenuItem, componentsToolStripMenuItem, clientsToolStripMenuItem });
toolStripMenuItem.Name = "toolStripMenuItem"; toolStripMenuItem.Name = "toolStripMenuItem";
toolStripMenuItem.Size = new Size(117, 24); toolStripMenuItem.Size = new Size(117, 24);
toolStripMenuItem.Text = "Справочники"; toolStripMenuItem.Text = "Справочники";
@ -121,13 +122,6 @@
orderReportToolStripMenuItem.Text = "Список заказов"; orderReportToolStripMenuItem.Text = "Список заказов";
orderReportToolStripMenuItem.Click += orderReportToolStripMenuItem_Click; orderReportToolStripMenuItem.Click += orderReportToolStripMenuItem_Click;
// //
// clientsToolStripMenuItem
//
clientsToolStripMenuItem.Name = "clientsToolStripMenuItem";
clientsToolStripMenuItem.Size = new Size(224, 26);
clientsToolStripMenuItem.Text = "Клиенты";
clientsToolStripMenuItem.Click += clientsToolStripMenuItem_Click;
//
// отчётыToolStripMenuItem // отчётыToolStripMenuItem
// //
отчётыToolStripMenuItem.Name = "отчётыToolStripMenuItem"; отчётыToolStripMenuItem.Name = "отчётыToolStripMenuItem";
@ -151,7 +145,7 @@
// buttonCreateOrder // buttonCreateOrder
// //
buttonCreateOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonCreateOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonCreateOrder.Location = new Point(998, 31); buttonCreateOrder.Location = new Point(992, 28);
buttonCreateOrder.Name = "buttonCreateOrder"; buttonCreateOrder.Name = "buttonCreateOrder";
buttonCreateOrder.Size = new Size(180, 30); buttonCreateOrder.Size = new Size(180, 30);
buttonCreateOrder.TabIndex = 8; buttonCreateOrder.TabIndex = 8;
@ -162,7 +156,7 @@
// buttonTakeOrderInWork // buttonTakeOrderInWork
// //
buttonTakeOrderInWork.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonTakeOrderInWork.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonTakeOrderInWork.Location = new Point(998, 67); buttonTakeOrderInWork.Location = new Point(992, 64);
buttonTakeOrderInWork.Name = "buttonTakeOrderInWork"; buttonTakeOrderInWork.Name = "buttonTakeOrderInWork";
buttonTakeOrderInWork.Size = new Size(180, 30); buttonTakeOrderInWork.Size = new Size(180, 30);
buttonTakeOrderInWork.TabIndex = 9; buttonTakeOrderInWork.TabIndex = 9;
@ -173,7 +167,7 @@
// buttonOrderReady // buttonOrderReady
// //
buttonOrderReady.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonOrderReady.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonOrderReady.Location = new Point(998, 103); buttonOrderReady.Location = new Point(992, 100);
buttonOrderReady.Name = "buttonOrderReady"; buttonOrderReady.Name = "buttonOrderReady";
buttonOrderReady.Size = new Size(180, 30); buttonOrderReady.Size = new Size(180, 30);
buttonOrderReady.TabIndex = 10; buttonOrderReady.TabIndex = 10;
@ -184,7 +178,7 @@
// buttonIssuedOrder // buttonIssuedOrder
// //
buttonIssuedOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonIssuedOrder.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonIssuedOrder.Location = new Point(998, 139); buttonIssuedOrder.Location = new Point(992, 136);
buttonIssuedOrder.Name = "buttonIssuedOrder"; buttonIssuedOrder.Name = "buttonIssuedOrder";
buttonIssuedOrder.Size = new Size(180, 30); buttonIssuedOrder.Size = new Size(180, 30);
buttonIssuedOrder.TabIndex = 11; buttonIssuedOrder.TabIndex = 11;
@ -195,7 +189,7 @@
// buttonRef // buttonRef
// //
buttonRef.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonRef.Anchor = AnchorStyles.Top | AnchorStyles.Right;
buttonRef.Location = new Point(998, 175); buttonRef.Location = new Point(992, 172);
buttonRef.Name = "buttonRef"; buttonRef.Name = "buttonRef";
buttonRef.Size = new Size(180, 30); buttonRef.Size = new Size(180, 30);
buttonRef.TabIndex = 12; buttonRef.TabIndex = 12;
@ -203,12 +197,19 @@
buttonRef.UseVisualStyleBackColor = true; buttonRef.UseVisualStyleBackColor = true;
buttonRef.Click += ButtonRef_Click; buttonRef.Click += ButtonRef_Click;
// //
// clientsToolStripMenuItem
//
clientsToolStripMenuItem.Name = "clientsToolStripMenuItem";
clientsToolStripMenuItem.Size = new Size(224, 26);
clientsToolStripMenuItem.Text = "Клиенты";
clientsToolStripMenuItem.Click += clientsToolStripMenuItem_Click;
//
// FormMain // FormMain
// //
AllowDrop = true; AllowDrop = true;
AutoScaleDimensions = new SizeF(8F, 20F); AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font; AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(1501, 724); ClientSize = new Size(1184, 554);
Controls.Add(buttonRef); Controls.Add(buttonRef);
Controls.Add(buttonIssuedOrder); Controls.Add(buttonIssuedOrder);
Controls.Add(buttonOrderReady); Controls.Add(buttonOrderReady);
@ -248,5 +249,6 @@
private ToolStripMenuItem sushisReportToolStripMenuItem; private ToolStripMenuItem sushisReportToolStripMenuItem;
private ToolStripMenuItem componentsReportПоСушиToolStripMenuItem; private ToolStripMenuItem componentsReportПоСушиToolStripMenuItem;
private ToolStripMenuItem orderReportToolStripMenuItem; private ToolStripMenuItem orderReportToolStripMenuItem;
private ToolStripMenuItem clientsToolStripMenuItem;
} }
} }

View File

@ -30,6 +30,7 @@ namespace SushiBar.Forms
{ {
dataGridView.DataSource = list; dataGridView.DataSource = list;
dataGridView.Columns["SushiId"].Visible = false; dataGridView.Columns["SushiId"].Visible = false;
dataGridView.Columns["ClientId"].Visible = false;
dataGridView.Columns["SushiName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; dataGridView.Columns["SushiName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
} }
_logger.LogInformation("Загрузка заказов"); _logger.LogInformation("Загрузка заказов");
@ -170,7 +171,11 @@ namespace SushiBar.Forms
private void clientsToolStripMenuItem_Click(object sender, EventArgs e) private void clientsToolStripMenuItem_Click(object sender, EventArgs e)
{ {
ClientsToolStripMenuItem_Click(sender, e); var service = Program.ServiceProvider?.GetService(typeof(FormClients));
if (service is FormClients form)
{
form.ShowDialog();
}
} }
} }
} }

View File

@ -9,10 +9,10 @@ namespace SushiBarContracts.ViewModels
[DisplayName("Номер")] [DisplayName("Номер")]
public int Id { get; set; } public int Id { get; set; }
public int SushiId { get; set; } public int SushiId { get; set; }
[DisplayName("Суши")]
public int ClientId { get; set; } public int ClientId { get; set; }
[DisplayName("Клиент")] [DisplayName("Клиент")]
public string ClientFIO { get; set; } = string.Empty; public string ClientFIO { get; set; } = string.Empty;
[DisplayName("Суши")]
public string SushiName { get; set; } = string.Empty; public string SushiName { get; set; } = string.Empty;
[DisplayName("Количество")] [DisplayName("Количество")]
public int Count { get; set; } public int Count { get; set; }