diff --git a/SecuritySystem/SecuritySystemView/FormMain.Designer.cs b/SecuritySystem/SecuritySystemView/FormMain.Designer.cs
index 8177b93..dec0cbd 100644
--- a/SecuritySystem/SecuritySystemView/FormMain.Designer.cs
+++ b/SecuritySystem/SecuritySystemView/FormMain.Designer.cs
@@ -33,13 +33,14 @@
ComponentsToolStripMenuItem = new ToolStripMenuItem();
SecuresToolStripMenuItem = new ToolStripMenuItem();
магазиныToolStripMenuItem = new ToolStripMenuItem();
+ пополнениеМагазинаToolStripMenuItem = new ToolStripMenuItem();
dataGridView = new DataGridView();
buttonCreateOrder = new Button();
buttonTakeOrderInWork = new Button();
buttonOrderReady = new Button();
button4 = new Button();
buttonRefresh = new Button();
- пополнениеМагазинаToolStripMenuItem = new ToolStripMenuItem();
+ продатьИзделияToolStripMenuItem = new ToolStripMenuItem();
menuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
SuspendLayout();
@@ -47,7 +48,7 @@
// menuStrip
//
menuStrip.ImageScalingSize = new Size(20, 20);
- menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, пополнениеМагазинаToolStripMenuItem });
+ menuStrip.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem, пополнениеМагазинаToolStripMenuItem, продатьИзделияToolStripMenuItem });
menuStrip.Location = new Point(0, 0);
menuStrip.Name = "menuStrip";
menuStrip.Size = new Size(1043, 28);
@@ -64,24 +65,31 @@
// ComponentsToolStripMenuItem
//
ComponentsToolStripMenuItem.Name = "ComponentsToolStripMenuItem";
- ComponentsToolStripMenuItem.Size = new Size(224, 26);
+ ComponentsToolStripMenuItem.Size = new Size(182, 26);
ComponentsToolStripMenuItem.Text = "Компоненты";
ComponentsToolStripMenuItem.Click += ComponentsToolStripMenuItem_Click;
//
// SecuresToolStripMenuItem
//
SecuresToolStripMenuItem.Name = "SecuresToolStripMenuItem";
- SecuresToolStripMenuItem.Size = new Size(224, 26);
+ SecuresToolStripMenuItem.Size = new Size(182, 26);
SecuresToolStripMenuItem.Text = "Изделия";
SecuresToolStripMenuItem.Click += SecuresToolStripMenuItem_Click;
//
// магазиныToolStripMenuItem
//
магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
- магазиныToolStripMenuItem.Size = new Size(224, 26);
+ магазиныToolStripMenuItem.Size = new Size(182, 26);
магазиныToolStripMenuItem.Text = "Магазины";
магазиныToolStripMenuItem.Click += ShopsToolStripMenuItem_Click;
//
+ // пополнениеМагазинаToolStripMenuItem
+ //
+ пополнениеМагазинаToolStripMenuItem.Name = "пополнениеМагазинаToolStripMenuItem";
+ пополнениеМагазинаToolStripMenuItem.Size = new Size(182, 24);
+ пополнениеМагазинаToolStripMenuItem.Text = "Пополнение магазина";
+ пополнениеМагазинаToolStripMenuItem.Click += SupplyShopToolStripMenuItem_Click;
+ //
// dataGridView
//
dataGridView.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
@@ -151,12 +159,11 @@
buttonRefresh.UseVisualStyleBackColor = true;
buttonRefresh.Click += ButtonRefresh_Click;
//
- // пополнениеМагазинаToolStripMenuItem
+ // продатьИзделияToolStripMenuItem
//
- пополнениеМагазинаToolStripMenuItem.Name = "пополнениеМагазинаToolStripMenuItem";
- пополнениеМагазинаToolStripMenuItem.Size = new Size(182, 24);
- пополнениеМагазинаToolStripMenuItem.Text = "Пополнение магазина";
- пополнениеМагазинаToolStripMenuItem.Click += SupplyShopToolStripMenuItem_Click;
+ продатьИзделияToolStripMenuItem.Name = "продатьИзделияToolStripMenuItem";
+ продатьИзделияToolStripMenuItem.Size = new Size(143, 24);
+ продатьИзделияToolStripMenuItem.Text = "Продать изделие";
//
// FormMain
//
@@ -195,5 +202,6 @@
private Button buttonRefresh;
private ToolStripMenuItem магазиныToolStripMenuItem;
private ToolStripMenuItem пополнениеМагазинаToolStripMenuItem;
+ private ToolStripMenuItem продатьИзделияToolStripMenuItem;
}
}
\ No newline at end of file
diff --git a/SecuritySystem/SecuritySystemView/FormMain.resx b/SecuritySystem/SecuritySystemView/FormMain.resx
index c17a880..6c82d08 100644
--- a/SecuritySystem/SecuritySystemView/FormMain.resx
+++ b/SecuritySystem/SecuritySystemView/FormMain.resx
@@ -18,7 +18,7 @@
System.Resources.ResXResourceReader, System.Windows.Forms, ...
System.Resources.ResXResourceWriter, System.Windows.Forms, ...
this is my long stringthis is a comment
- Blue
+ Blue
[base64 mime encoded serialized .NET Framework object]
diff --git a/SecuritySystem/SecuritySystemView/Shop/FormShop.Designer.cs b/SecuritySystem/SecuritySystemView/Shop/FormShop.Designer.cs
index cdaf9ef..75efaa7 100644
--- a/SecuritySystem/SecuritySystemView/Shop/FormShop.Designer.cs
+++ b/SecuritySystem/SecuritySystemView/Shop/FormShop.Designer.cs
@@ -41,7 +41,10 @@
colorDialog1 = new ColorDialog();
buttonSave = new Button();
buttonCancel = new Button();
+ labelMaxCount = new Label();
+ numericUpDownCapacity = new NumericUpDown();
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDownCapacity).BeginInit();
SuspendLayout();
//
// labelName
@@ -153,11 +156,30 @@
buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += buttonCancel_Click;
//
+ // labelMaxCount
+ //
+ labelMaxCount.AutoSize = true;
+ labelMaxCount.Location = new Point(397, 76);
+ labelMaxCount.Name = "labelMaxCount";
+ labelMaxCount.Size = new Size(100, 20);
+ labelMaxCount.TabIndex = 7;
+ labelMaxCount.Text = "Вместимость";
+ //
+ // numericUpDownCapacity
+ //
+ numericUpDownCapacity.Location = new Point(503, 73);
+ numericUpDownCapacity.Maximum = new decimal(new int[] { 1000, 0, 0, 0 });
+ numericUpDownCapacity.Name = "numericUpDownCapacity";
+ numericUpDownCapacity.Size = new Size(150, 27);
+ numericUpDownCapacity.TabIndex = 8;
+ //
// FormShop
//
AutoScaleDimensions = new SizeF(8F, 20F);
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(672, 450);
+ Controls.Add(numericUpDownCapacity);
+ Controls.Add(labelMaxCount);
Controls.Add(buttonCancel);
Controls.Add(buttonSave);
Controls.Add(dataGridView);
@@ -171,6 +193,7 @@
Text = "Магазин";
Load += FormShop_Load;
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
+ ((System.ComponentModel.ISupportInitialize)numericUpDownCapacity).EndInit();
ResumeLayout(false);
PerformLayout();
}
@@ -190,5 +213,7 @@
private ColorDialog colorDialog1;
private Button buttonSave;
private Button buttonCancel;
+ private Label labelMaxCount;
+ private NumericUpDown numericUpDownCapacity;
}
}
\ No newline at end of file
diff --git a/SecuritySystem/SecuritySystemView/Shop/FormShop.cs b/SecuritySystem/SecuritySystemView/Shop/FormShop.cs
index 6ea11d3..321f180 100644
--- a/SecuritySystem/SecuritySystemView/Shop/FormShop.cs
+++ b/SecuritySystem/SecuritySystemView/Shop/FormShop.cs
@@ -38,6 +38,7 @@ namespace SecuritySystemView
textBoxAddress.Text = view.Address;
dateTimePickerOpeningDate.Value = view.OpeningDate;
_shopSecures = view.ShopSecures ?? new Dictionary();
+ numericUpDownCapacity.Value = view.MaxSecuresCount;
LoadData();
}
}
@@ -95,7 +96,8 @@ namespace SecuritySystemView
Name = textBoxName.Text,
Address = textBoxAddress.Text,
OpeningDate = dateTimePickerOpeningDate.Value.Date,
- ShopSecures = _shopSecures
+ ShopSecures = _shopSecures,
+ MaxSecuresCount = (int)numericUpDownCapacity.Value
};
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);
diff --git a/SecuritySystem/SecuritySystemView/Shop/FormShop.resx b/SecuritySystem/SecuritySystemView/Shop/FormShop.resx
index 09810c9..cceb94b 100644
--- a/SecuritySystem/SecuritySystemView/Shop/FormShop.resx
+++ b/SecuritySystem/SecuritySystemView/Shop/FormShop.resx
@@ -18,7 +18,7 @@
System.Resources.ResXResourceReader, System.Windows.Forms, ...
System.Resources.ResXResourceWriter, System.Windows.Forms, ...
this is my long stringthis is a comment
- Blue
+ Blue
[base64 mime encoded serialized .NET Framework object]
@@ -126,6 +126,15 @@
True
+
+ True
+
+
+ True
+
+
+ True
+
17, 17