вроде доколупала
This commit is contained in:
parent
8eb42276e9
commit
ff37326332
@ -35,10 +35,6 @@ namespace AircraftPlantListImplement
|
|||||||
/// Список классов-моделей магазинов
|
/// Список классов-моделей магазинов
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<Shop> Shops { get; set; }
|
public List<Shop> Shops { get; set; }
|
||||||
/// <summary>
|
|
||||||
/// Список классов-моделей магазинов
|
|
||||||
/// </summary>
|
|
||||||
public List<Shop> Shops { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Конструктор
|
/// Конструктор
|
||||||
|
@ -60,7 +60,7 @@ namespace AircraftPlantListImplement.Models
|
|||||||
ShopName = model.ShopName,
|
ShopName = model.ShopName,
|
||||||
Address = model.Address,
|
Address = model.Address,
|
||||||
DateOpening = model.DateOpening,
|
DateOpening = model.DateOpening,
|
||||||
ShopPlanes = model.ShopPlanes
|
ShopPlanes = model.ShopPlanes,
|
||||||
MaxPlanes = model.MaxPlanes
|
MaxPlanes = model.MaxPlanes
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ namespace AircraftPlantFileImplement
|
|||||||
public void SaveComponents() => SaveData(Components, ComponentFileName, "Components", x => x.GetXElement);
|
public void SaveComponents() => SaveData(Components, ComponentFileName, "Components", x => x.GetXElement);
|
||||||
public void SavePlanes() => SaveData(Planes, PlaneFileName, "Planes", x => x.GetXElement);
|
public void SavePlanes() => SaveData(Planes, PlaneFileName, "Planes", x => x.GetXElement);
|
||||||
public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x => x.GetXElement);
|
public void SaveOrders() => SaveData(Orders, OrderFileName, "Orders", x => x.GetXElement);
|
||||||
public void SaveShops() => SaveData(Shops, ShopFileName, "Shops", x => x.GetXEleme
|
public void SaveShops() => SaveData(Shops, ShopFileName, "Shops", x => x.GetXElement);
|
||||||
private DataFileSingleton()
|
private DataFileSingleton()
|
||||||
{
|
{
|
||||||
Components = LoadData(ComponentFileName, "Component", x => Component.Create(x)!)!;
|
Components = LoadData(ComponentFileName, "Component", x => Component.Create(x)!)!;
|
||||||
|
258
AircraftPlant/AircraftPlantView/FormMain.Designer.cs
generated
258
AircraftPlant/AircraftPlantView/FormMain.Designer.cs
generated
@ -28,164 +28,183 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.dataGridView = new System.Windows.Forms.DataGridView();
|
dataGridView = new DataGridView();
|
||||||
this.ButtonCreateOrder = new System.Windows.Forms.Button();
|
ButtonCreateOrder = new Button();
|
||||||
this.ButtonTakeOrderInWork = new System.Windows.Forms.Button();
|
ButtonTakeOrderInWork = new Button();
|
||||||
this.ButtonOrderReady = new System.Windows.Forms.Button();
|
ButtonOrderReady = new Button();
|
||||||
this.ButtonIssuedOrder = new System.Windows.Forms.Button();
|
ButtonIssuedOrder = new Button();
|
||||||
this.ButtonRef = new System.Windows.Forms.Button();
|
ButtonRef = new Button();
|
||||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
menuStrip1 = new MenuStrip();
|
||||||
this.справочникиToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
справочникиToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.компонентыToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
компонентыToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.изделияToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
изделияToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.магазиныToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
магазиныToolStripMenuItem = new ToolStripMenuItem();
|
||||||
this.buttonAddPlane = new System.Windows.Forms.Button();
|
buttonAddPlane = new Button();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
|
buttonSellPlanes = new Button();
|
||||||
this.menuStrip1.SuspendLayout();
|
((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
|
||||||
this.SuspendLayout();
|
menuStrip1.SuspendLayout();
|
||||||
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// dataGridView
|
// dataGridView
|
||||||
//
|
//
|
||||||
this.dataGridView.AllowUserToAddRows = false;
|
dataGridView.AllowUserToAddRows = false;
|
||||||
this.dataGridView.AllowUserToDeleteRows = false;
|
dataGridView.AllowUserToDeleteRows = false;
|
||||||
this.dataGridView.BackgroundColor = System.Drawing.Color.White;
|
dataGridView.BackgroundColor = Color.White;
|
||||||
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Left;
|
dataGridView.Dock = DockStyle.Left;
|
||||||
this.dataGridView.GridColor = System.Drawing.Color.White;
|
dataGridView.GridColor = Color.White;
|
||||||
this.dataGridView.Location = new System.Drawing.Point(0, 24);
|
dataGridView.Location = new Point(0, 30);
|
||||||
this.dataGridView.MultiSelect = false;
|
dataGridView.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.dataGridView.Name = "dataGridView";
|
dataGridView.MultiSelect = false;
|
||||||
this.dataGridView.ReadOnly = true;
|
dataGridView.Name = "dataGridView";
|
||||||
this.dataGridView.RowHeadersVisible = false;
|
dataGridView.ReadOnly = true;
|
||||||
this.dataGridView.RowTemplate.Height = 25;
|
dataGridView.RowHeadersVisible = false;
|
||||||
this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
dataGridView.RowHeadersWidth = 51;
|
||||||
this.dataGridView.Size = new System.Drawing.Size(780, 377);
|
dataGridView.RowTemplate.Height = 25;
|
||||||
this.dataGridView.TabIndex = 0;
|
dataGridView.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
dataGridView.Size = new Size(891, 505);
|
||||||
|
dataGridView.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// ButtonCreateOrder
|
// ButtonCreateOrder
|
||||||
//
|
//
|
||||||
this.ButtonCreateOrder.Location = new System.Drawing.Point(804, 42);
|
ButtonCreateOrder.Location = new Point(919, 56);
|
||||||
this.ButtonCreateOrder.Name = "ButtonCreateOrder";
|
ButtonCreateOrder.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.ButtonCreateOrder.Size = new System.Drawing.Size(153, 23);
|
ButtonCreateOrder.Name = "ButtonCreateOrder";
|
||||||
this.ButtonCreateOrder.TabIndex = 1;
|
ButtonCreateOrder.Size = new Size(175, 31);
|
||||||
this.ButtonCreateOrder.Text = "Создать заказ";
|
ButtonCreateOrder.TabIndex = 1;
|
||||||
this.ButtonCreateOrder.UseVisualStyleBackColor = true;
|
ButtonCreateOrder.Text = "Создать заказ";
|
||||||
this.ButtonCreateOrder.Click += new System.EventHandler(this.ButtonCreateOrder_Click);
|
ButtonCreateOrder.UseVisualStyleBackColor = true;
|
||||||
|
ButtonCreateOrder.Click += ButtonCreateOrder_Click;
|
||||||
//
|
//
|
||||||
// ButtonTakeOrderInWork
|
// ButtonTakeOrderInWork
|
||||||
//
|
//
|
||||||
this.ButtonTakeOrderInWork.Location = new System.Drawing.Point(804, 89);
|
ButtonTakeOrderInWork.Location = new Point(919, 119);
|
||||||
this.ButtonTakeOrderInWork.Name = "ButtonTakeOrderInWork";
|
ButtonTakeOrderInWork.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.ButtonTakeOrderInWork.Size = new System.Drawing.Size(153, 23);
|
ButtonTakeOrderInWork.Name = "ButtonTakeOrderInWork";
|
||||||
this.ButtonTakeOrderInWork.TabIndex = 2;
|
ButtonTakeOrderInWork.Size = new Size(175, 31);
|
||||||
this.ButtonTakeOrderInWork.Text = "Отдать на выполнение";
|
ButtonTakeOrderInWork.TabIndex = 2;
|
||||||
this.ButtonTakeOrderInWork.UseVisualStyleBackColor = true;
|
ButtonTakeOrderInWork.Text = "Отдать на выполнение";
|
||||||
this.ButtonTakeOrderInWork.Click += new System.EventHandler(this.ButtonTakeOrderInWork_Click);
|
ButtonTakeOrderInWork.UseVisualStyleBackColor = true;
|
||||||
|
ButtonTakeOrderInWork.Click += ButtonTakeOrderInWork_Click;
|
||||||
//
|
//
|
||||||
// ButtonOrderReady
|
// ButtonOrderReady
|
||||||
//
|
//
|
||||||
this.ButtonOrderReady.Location = new System.Drawing.Point(804, 139);
|
ButtonOrderReady.Location = new Point(919, 185);
|
||||||
this.ButtonOrderReady.Name = "ButtonOrderReady";
|
ButtonOrderReady.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.ButtonOrderReady.Size = new System.Drawing.Size(153, 23);
|
ButtonOrderReady.Name = "ButtonOrderReady";
|
||||||
this.ButtonOrderReady.TabIndex = 3;
|
ButtonOrderReady.Size = new Size(175, 31);
|
||||||
this.ButtonOrderReady.Text = "Заказ готов";
|
ButtonOrderReady.TabIndex = 3;
|
||||||
this.ButtonOrderReady.UseVisualStyleBackColor = true;
|
ButtonOrderReady.Text = "Заказ готов";
|
||||||
this.ButtonOrderReady.Click += new System.EventHandler(this.ButtonOrderReady_Click);
|
ButtonOrderReady.UseVisualStyleBackColor = true;
|
||||||
|
ButtonOrderReady.Click += ButtonOrderReady_Click;
|
||||||
//
|
//
|
||||||
// ButtonIssuedOrder
|
// ButtonIssuedOrder
|
||||||
//
|
//
|
||||||
this.ButtonIssuedOrder.Location = new System.Drawing.Point(804, 187);
|
ButtonIssuedOrder.Location = new Point(919, 249);
|
||||||
this.ButtonIssuedOrder.Name = "ButtonIssuedOrder";
|
ButtonIssuedOrder.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.ButtonIssuedOrder.Size = new System.Drawing.Size(153, 23);
|
ButtonIssuedOrder.Name = "ButtonIssuedOrder";
|
||||||
this.ButtonIssuedOrder.TabIndex = 4;
|
ButtonIssuedOrder.Size = new Size(175, 31);
|
||||||
this.ButtonIssuedOrder.Text = "Заказ выдан";
|
ButtonIssuedOrder.TabIndex = 4;
|
||||||
this.ButtonIssuedOrder.UseVisualStyleBackColor = true;
|
ButtonIssuedOrder.Text = "Заказ выдан";
|
||||||
this.ButtonIssuedOrder.Click += new System.EventHandler(this.ButtonIssuedOrder_Click);
|
ButtonIssuedOrder.UseVisualStyleBackColor = true;
|
||||||
|
ButtonIssuedOrder.Click += ButtonIssuedOrder_Click;
|
||||||
//
|
//
|
||||||
// ButtonRef
|
// ButtonRef
|
||||||
//
|
//
|
||||||
this.ButtonRef.Location = new System.Drawing.Point(804, 236);
|
ButtonRef.Location = new Point(919, 315);
|
||||||
this.ButtonRef.Name = "ButtonRef";
|
ButtonRef.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.ButtonRef.Size = new System.Drawing.Size(153, 23);
|
ButtonRef.Name = "ButtonRef";
|
||||||
this.ButtonRef.TabIndex = 5;
|
ButtonRef.Size = new Size(175, 31);
|
||||||
this.ButtonRef.Text = "Обновить список";
|
ButtonRef.TabIndex = 5;
|
||||||
this.ButtonRef.UseVisualStyleBackColor = true;
|
ButtonRef.Text = "Обновить список";
|
||||||
this.ButtonRef.Click += new System.EventHandler(this.ButtonRef_Click);
|
ButtonRef.UseVisualStyleBackColor = true;
|
||||||
|
ButtonRef.Click += ButtonRef_Click;
|
||||||
//
|
//
|
||||||
// menuStrip1
|
// menuStrip1
|
||||||
//
|
//
|
||||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
menuStrip1.ImageScalingSize = new Size(20, 20);
|
||||||
this.справочникиToolStripMenuItem});
|
menuStrip1.Items.AddRange(new ToolStripItem[] { справочникиToolStripMenuItem });
|
||||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
menuStrip1.Location = new Point(0, 0);
|
||||||
this.menuStrip1.Name = "menuStrip1";
|
menuStrip1.Name = "menuStrip1";
|
||||||
this.menuStrip1.Size = new System.Drawing.Size(977, 24);
|
menuStrip1.Padding = new Padding(7, 3, 0, 3);
|
||||||
this.menuStrip1.TabIndex = 6;
|
menuStrip1.Size = new Size(1117, 30);
|
||||||
this.menuStrip1.Text = "menuStrip1";
|
menuStrip1.TabIndex = 6;
|
||||||
|
menuStrip1.Text = "menuStrip1";
|
||||||
//
|
//
|
||||||
// справочникиToolStripMenuItem
|
// справочникиToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.справочникиToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
справочникиToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { компонентыToolStripMenuItem, изделияToolStripMenuItem, магазиныToolStripMenuItem });
|
||||||
this.компонентыToolStripMenuItem,
|
справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
||||||
this.изделияToolStripMenuItem,
|
справочникиToolStripMenuItem.Size = new Size(117, 24);
|
||||||
this.магазиныToolStripMenuItem});
|
справочникиToolStripMenuItem.Text = "Справочники";
|
||||||
this.справочникиToolStripMenuItem.Name = "справочникиToolStripMenuItem";
|
|
||||||
this.справочникиToolStripMenuItem.Size = new System.Drawing.Size(94, 20);
|
|
||||||
this.справочникиToolStripMenuItem.Text = "Справочники";
|
|
||||||
//
|
//
|
||||||
// компонентыToolStripMenuItem
|
// компонентыToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
компонентыToolStripMenuItem.Name = "компонентыToolStripMenuItem";
|
||||||
this.компонентыToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
компонентыToolStripMenuItem.Size = new Size(224, 26);
|
||||||
this.компонентыToolStripMenuItem.Text = "Компоненты";
|
компонентыToolStripMenuItem.Text = "Компоненты";
|
||||||
this.компонентыToolStripMenuItem.Click += new System.EventHandler(this.КомпонентыToolStripMenuItem_Click);
|
компонентыToolStripMenuItem.Click += КомпонентыToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// изделияToolStripMenuItem
|
// изделияToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.изделияToolStripMenuItem.Name = "изделияToolStripMenuItem";
|
изделияToolStripMenuItem.Name = "изделияToolStripMenuItem";
|
||||||
this.изделияToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
изделияToolStripMenuItem.Size = new Size(224, 26);
|
||||||
this.изделияToolStripMenuItem.Text = "Изделия";
|
изделияToolStripMenuItem.Text = "Изделия";
|
||||||
this.изделияToolStripMenuItem.Click += new System.EventHandler(this.ИзделияToolStripMenuItem_Click);
|
изделияToolStripMenuItem.Click += ИзделияToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// магазиныToolStripMenuItem
|
// магазиныToolStripMenuItem
|
||||||
//
|
//
|
||||||
this.магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
магазиныToolStripMenuItem.Name = "магазиныToolStripMenuItem";
|
||||||
this.магазиныToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
|
магазиныToolStripMenuItem.Size = new Size(224, 26);
|
||||||
this.магазиныToolStripMenuItem.Text = "Магазины";
|
магазиныToolStripMenuItem.Text = "Магазины";
|
||||||
this.магазиныToolStripMenuItem.Click += new System.EventHandler(this.МагазиныToolStripMenuItem_Click);
|
магазиныToolStripMenuItem.Click += МагазиныToolStripMenuItem_Click;
|
||||||
//
|
//
|
||||||
// buttonAddPlane
|
// buttonAddPlane
|
||||||
//
|
//
|
||||||
this.buttonAddPlane.Location = new System.Drawing.Point(811, 280);
|
buttonAddPlane.Location = new Point(919, 393);
|
||||||
this.buttonAddPlane.Name = "buttonAddPlane";
|
buttonAddPlane.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.buttonAddPlane.Size = new System.Drawing.Size(146, 23);
|
buttonAddPlane.Name = "buttonAddPlane";
|
||||||
this.buttonAddPlane.TabIndex = 7;
|
buttonAddPlane.Size = new Size(186, 30);
|
||||||
this.buttonAddPlane.Text = "Пополнение магазина";
|
buttonAddPlane.TabIndex = 7;
|
||||||
this.buttonAddPlane.UseVisualStyleBackColor = true;
|
buttonAddPlane.Text = "Пополнение магазина";
|
||||||
this.buttonAddPlane.Click += new System.EventHandler(this.buttonAddPlane_Click);
|
buttonAddPlane.UseVisualStyleBackColor = true;
|
||||||
|
buttonAddPlane.Click += buttonAddPlane_Click;
|
||||||
|
//
|
||||||
|
// buttonSellPlanes
|
||||||
|
//
|
||||||
|
buttonSellPlanes.Location = new Point(919, 431);
|
||||||
|
buttonSellPlanes.Margin = new Padding(3, 4, 3, 4);
|
||||||
|
buttonSellPlanes.Name = "buttonSellPlanes";
|
||||||
|
buttonSellPlanes.Size = new Size(186, 31);
|
||||||
|
buttonSellPlanes.TabIndex = 8;
|
||||||
|
buttonSellPlanes.Text = "Продать изделия";
|
||||||
|
buttonSellPlanes.UseVisualStyleBackColor = true;
|
||||||
|
buttonSellPlanes.Click += buttonSellPlanes_Click;
|
||||||
//
|
//
|
||||||
// FormMain
|
// FormMain
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(977, 401);
|
ClientSize = new Size(1117, 535);
|
||||||
this.Controls.Add(this.buttonAddPlane);
|
Controls.Add(buttonSellPlanes);
|
||||||
this.Controls.Add(this.ButtonRef);
|
Controls.Add(buttonAddPlane);
|
||||||
this.Controls.Add(this.ButtonIssuedOrder);
|
Controls.Add(ButtonRef);
|
||||||
this.Controls.Add(this.ButtonOrderReady);
|
Controls.Add(ButtonIssuedOrder);
|
||||||
this.Controls.Add(this.ButtonTakeOrderInWork);
|
Controls.Add(ButtonOrderReady);
|
||||||
this.Controls.Add(this.ButtonCreateOrder);
|
Controls.Add(ButtonTakeOrderInWork);
|
||||||
this.Controls.Add(this.dataGridView);
|
Controls.Add(ButtonCreateOrder);
|
||||||
this.Controls.Add(this.menuStrip1);
|
Controls.Add(dataGridView);
|
||||||
this.MainMenuStrip = this.menuStrip1;
|
Controls.Add(menuStrip1);
|
||||||
this.Name = "FormMain";
|
MainMenuStrip = menuStrip1;
|
||||||
this.Text = "Авиационный завод";
|
Margin = new Padding(3, 4, 3, 4);
|
||||||
this.Load += new System.EventHandler(this.FormMain_Load);
|
Name = "FormMain";
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
|
Text = "Авиационный завод";
|
||||||
this.menuStrip1.ResumeLayout(false);
|
Load += FormMain_Load;
|
||||||
this.menuStrip1.PerformLayout();
|
((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
|
||||||
this.ResumeLayout(false);
|
menuStrip1.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
menuStrip1.PerformLayout();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -202,5 +221,6 @@
|
|||||||
private ToolStripMenuItem изделияToolStripMenuItem;
|
private ToolStripMenuItem изделияToolStripMenuItem;
|
||||||
private ToolStripMenuItem магазиныToolStripMenuItem;
|
private ToolStripMenuItem магазиныToolStripMenuItem;
|
||||||
private Button buttonAddPlane;
|
private Button buttonAddPlane;
|
||||||
|
private Button buttonSellPlanes;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -227,5 +227,18 @@ namespace AircraftPlantView
|
|||||||
form.ShowDialog();
|
form.ShowDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Кнопка "Продать изделия"
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void buttonSellPlanes_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var services = Program.ServiceProvider?.GetService(typeof(FormSell));
|
||||||
|
if (services is FormSell form)
|
||||||
|
{
|
||||||
|
form.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,64 @@
|
|||||||
<root>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
119
AircraftPlant/AircraftPlantView/FormSell.Designer.cs
generated
Normal file
119
AircraftPlant/AircraftPlantView/FormSell.Designer.cs
generated
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
namespace AircraftPlantView
|
||||||
|
{
|
||||||
|
partial class FormSell
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
labelPlane = new Label();
|
||||||
|
labelCount = new Label();
|
||||||
|
comboBoxPlane = new ComboBox();
|
||||||
|
textBoxCount = new TextBox();
|
||||||
|
buttonSave = new Button();
|
||||||
|
buttonCancel = new Button();
|
||||||
|
SuspendLayout();
|
||||||
|
//
|
||||||
|
// labelPlane
|
||||||
|
//
|
||||||
|
labelPlane.AutoSize = true;
|
||||||
|
labelPlane.Location = new Point(12, 18);
|
||||||
|
labelPlane.Name = "labelPlane";
|
||||||
|
labelPlane.Size = new Size(71, 20);
|
||||||
|
labelPlane.TabIndex = 0;
|
||||||
|
labelPlane.Text = "Изделие:";
|
||||||
|
//
|
||||||
|
// labelCount
|
||||||
|
//
|
||||||
|
labelCount.AutoSize = true;
|
||||||
|
labelCount.Location = new Point(12, 54);
|
||||||
|
labelCount.Name = "labelCount";
|
||||||
|
labelCount.Size = new Size(93, 20);
|
||||||
|
labelCount.TabIndex = 1;
|
||||||
|
labelCount.Text = "Количество:";
|
||||||
|
//
|
||||||
|
// comboBoxPlane
|
||||||
|
//
|
||||||
|
comboBoxPlane.FormattingEnabled = true;
|
||||||
|
comboBoxPlane.Location = new Point(115, 15);
|
||||||
|
comboBoxPlane.Name = "comboBoxPlane";
|
||||||
|
comboBoxPlane.Size = new Size(267, 28);
|
||||||
|
comboBoxPlane.TabIndex = 2;
|
||||||
|
//
|
||||||
|
// textBoxCount
|
||||||
|
//
|
||||||
|
textBoxCount.Location = new Point(115, 54);
|
||||||
|
textBoxCount.Name = "textBoxCount";
|
||||||
|
textBoxCount.Size = new Size(267, 27);
|
||||||
|
textBoxCount.TabIndex = 3;
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
buttonSave.Location = new Point(178, 100);
|
||||||
|
buttonSave.Name = "buttonSave";
|
||||||
|
buttonSave.Size = new Size(94, 29);
|
||||||
|
buttonSave.TabIndex = 4;
|
||||||
|
buttonSave.Text = "Сохранить";
|
||||||
|
buttonSave.UseVisualStyleBackColor = true;
|
||||||
|
buttonSave.Click += buttonSave_Click;
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
buttonCancel.Location = new Point(288, 100);
|
||||||
|
buttonCancel.Name = "buttonCancel";
|
||||||
|
buttonCancel.Size = new Size(94, 29);
|
||||||
|
buttonCancel.TabIndex = 5;
|
||||||
|
buttonCancel.Text = "Отмена";
|
||||||
|
buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
buttonCancel.Click += buttonCancel_Click;
|
||||||
|
//
|
||||||
|
// FormSell
|
||||||
|
//
|
||||||
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
|
ClientSize = new Size(424, 146);
|
||||||
|
Controls.Add(buttonCancel);
|
||||||
|
Controls.Add(buttonSave);
|
||||||
|
Controls.Add(textBoxCount);
|
||||||
|
Controls.Add(comboBoxPlane);
|
||||||
|
Controls.Add(labelCount);
|
||||||
|
Controls.Add(labelPlane);
|
||||||
|
Name = "FormSell";
|
||||||
|
Text = "FormSell";
|
||||||
|
Load += FormSell_Load;
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private Label labelPlane;
|
||||||
|
private Label labelCount;
|
||||||
|
private ComboBox comboBoxPlane;
|
||||||
|
private TextBox textBoxCount;
|
||||||
|
private Button buttonSave;
|
||||||
|
private Button buttonCancel;
|
||||||
|
}
|
||||||
|
}
|
87
AircraftPlant/AircraftPlantView/FormSell.cs
Normal file
87
AircraftPlant/AircraftPlantView/FormSell.cs
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
using AircraftPlantContracts.BusinessLogicsContracts;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace AircraftPlantView
|
||||||
|
{
|
||||||
|
public partial class FormSell : Form
|
||||||
|
{
|
||||||
|
private readonly ILogger _logger;
|
||||||
|
private readonly IPlaneLogic _logicP;
|
||||||
|
private readonly IShopLogic _logicS;
|
||||||
|
public FormSell(ILogger<FormSell> logger, IPlaneLogic planeLogic, IShopLogic shopLogic)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
_logger = logger;
|
||||||
|
_logicP = planeLogic;
|
||||||
|
_logicS = shopLogic;
|
||||||
|
}
|
||||||
|
private void FormSell_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
_logger.LogInformation("Загрузка изделий для продажи");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var list = _logicP.ReadList(null);
|
||||||
|
if (list != null)
|
||||||
|
{
|
||||||
|
comboBoxPlane.DisplayMember = "PlaneName";
|
||||||
|
comboBoxPlane.ValueMember = "Id";
|
||||||
|
comboBoxPlane.DataSource = list;
|
||||||
|
comboBoxPlane.SelectedItem = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка загрузки списка изделий");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void buttonSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(textBoxCount.Text))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Заполните поле Количество", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (comboBoxPlane.SelectedValue == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Выберите изделие", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_logger.LogInformation("Продажа изделий");
|
||||||
|
_logger.LogInformation("Создание заказа");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var operationResult = _logicS.SellPlanes(
|
||||||
|
_logicP.ReadElement(new() { Id = Convert.ToInt32(comboBoxPlane.SelectedValue) }),
|
||||||
|
Convert.ToInt32(textBoxCount.Text)
|
||||||
|
);
|
||||||
|
if (!operationResult)
|
||||||
|
{
|
||||||
|
throw new Exception("Ошибка при продаже изделий. Доп. информация в логах.");
|
||||||
|
}
|
||||||
|
MessageBox.Show("Продажа прошла успешно", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Ошибка продажи изделий");
|
||||||
|
MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void buttonCancel_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Cancel;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
120
AircraftPlant/AircraftPlantView/FormSell.resx
Normal file
120
AircraftPlant/AircraftPlantView/FormSell.resx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
233
AircraftPlant/AircraftPlantView/FormShop.Designer.cs
generated
233
AircraftPlant/AircraftPlantView/FormShop.Designer.cs
generated
@ -28,140 +28,169 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.labelName = new System.Windows.Forms.Label();
|
labelName = new Label();
|
||||||
this.labelAddress = new System.Windows.Forms.Label();
|
labelAddress = new Label();
|
||||||
this.labelDate = new System.Windows.Forms.Label();
|
labelDate = new Label();
|
||||||
this.textBoxName = new System.Windows.Forms.TextBox();
|
textBoxName = new TextBox();
|
||||||
this.textBoxAddress = new System.Windows.Forms.TextBox();
|
textBoxAddress = new TextBox();
|
||||||
this.dateTimePicker = new System.Windows.Forms.DateTimePicker();
|
dateTimePicker = new DateTimePicker();
|
||||||
this.dataGridViewShop = new System.Windows.Forms.DataGridView();
|
dataGridViewShop = new DataGridView();
|
||||||
this.buttonSave = new System.Windows.Forms.Button();
|
ColumnID = new DataGridViewTextBoxColumn();
|
||||||
this.buttonCancel = new System.Windows.Forms.Button();
|
ColumnPlane = new DataGridViewTextBoxColumn();
|
||||||
this.ColumnID = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
ColumnCount = new DataGridViewTextBoxColumn();
|
||||||
this.ColumnPlane = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
buttonSave = new Button();
|
||||||
this.ColumnCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
buttonCancel = new Button();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridViewShop)).BeginInit();
|
labelMaxPlanes = new Label();
|
||||||
this.SuspendLayout();
|
numericUpDownMaxPlanes = new NumericUpDown();
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridViewShop).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownMaxPlanes).BeginInit();
|
||||||
|
SuspendLayout();
|
||||||
//
|
//
|
||||||
// labelName
|
// labelName
|
||||||
//
|
//
|
||||||
this.labelName.AutoSize = true;
|
labelName.AutoSize = true;
|
||||||
this.labelName.Location = new System.Drawing.Point(12, 9);
|
labelName.Location = new Point(14, 12);
|
||||||
this.labelName.Name = "labelName";
|
labelName.Name = "labelName";
|
||||||
this.labelName.Size = new System.Drawing.Size(62, 15);
|
labelName.Size = new Size(80, 20);
|
||||||
this.labelName.TabIndex = 0;
|
labelName.TabIndex = 0;
|
||||||
this.labelName.Text = "Название:";
|
labelName.Text = "Название:";
|
||||||
//
|
//
|
||||||
// labelAddress
|
// labelAddress
|
||||||
//
|
//
|
||||||
this.labelAddress.AutoSize = true;
|
labelAddress.AutoSize = true;
|
||||||
this.labelAddress.Location = new System.Drawing.Point(12, 39);
|
labelAddress.Location = new Point(14, 52);
|
||||||
this.labelAddress.Name = "labelAddress";
|
labelAddress.Name = "labelAddress";
|
||||||
this.labelAddress.Size = new System.Drawing.Size(43, 15);
|
labelAddress.Size = new Size(54, 20);
|
||||||
this.labelAddress.TabIndex = 1;
|
labelAddress.TabIndex = 1;
|
||||||
this.labelAddress.Text = "Адрес:";
|
labelAddress.Text = "Адрес:";
|
||||||
//
|
//
|
||||||
// labelDate
|
// labelDate
|
||||||
//
|
//
|
||||||
this.labelDate.AutoSize = true;
|
labelDate.AutoSize = true;
|
||||||
this.labelDate.Location = new System.Drawing.Point(12, 74);
|
labelDate.Location = new Point(14, 99);
|
||||||
this.labelDate.Name = "labelDate";
|
labelDate.Name = "labelDate";
|
||||||
this.labelDate.Size = new System.Drawing.Size(90, 15);
|
labelDate.Size = new Size(113, 20);
|
||||||
this.labelDate.TabIndex = 2;
|
labelDate.TabIndex = 2;
|
||||||
this.labelDate.Text = "Дата открытия:";
|
labelDate.Text = "Дата открытия:";
|
||||||
//
|
//
|
||||||
// textBoxName
|
// textBoxName
|
||||||
//
|
//
|
||||||
this.textBoxName.Location = new System.Drawing.Point(116, 6);
|
textBoxName.Location = new Point(133, 8);
|
||||||
this.textBoxName.Name = "textBoxName";
|
textBoxName.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.textBoxName.Size = new System.Drawing.Size(200, 23);
|
textBoxName.Name = "textBoxName";
|
||||||
this.textBoxName.TabIndex = 3;
|
textBoxName.Size = new Size(228, 27);
|
||||||
|
textBoxName.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// textBoxAddress
|
// textBoxAddress
|
||||||
//
|
//
|
||||||
this.textBoxAddress.Location = new System.Drawing.Point(116, 39);
|
textBoxAddress.Location = new Point(133, 52);
|
||||||
this.textBoxAddress.Name = "textBoxAddress";
|
textBoxAddress.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.textBoxAddress.Size = new System.Drawing.Size(200, 23);
|
textBoxAddress.Name = "textBoxAddress";
|
||||||
this.textBoxAddress.TabIndex = 4;
|
textBoxAddress.Size = new Size(228, 27);
|
||||||
|
textBoxAddress.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// dateTimePicker
|
// dateTimePicker
|
||||||
//
|
//
|
||||||
this.dateTimePicker.Location = new System.Drawing.Point(116, 74);
|
dateTimePicker.Location = new Point(133, 99);
|
||||||
this.dateTimePicker.Name = "dateTimePicker";
|
dateTimePicker.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.dateTimePicker.Size = new System.Drawing.Size(200, 23);
|
dateTimePicker.Name = "dateTimePicker";
|
||||||
this.dateTimePicker.TabIndex = 5;
|
dateTimePicker.Size = new Size(228, 27);
|
||||||
|
dateTimePicker.TabIndex = 5;
|
||||||
//
|
//
|
||||||
// dataGridViewShop
|
// dataGridViewShop
|
||||||
//
|
//
|
||||||
this.dataGridViewShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
dataGridViewShop.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
|
||||||
this.dataGridViewShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
dataGridViewShop.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.ColumnID,
|
dataGridViewShop.Columns.AddRange(new DataGridViewColumn[] { ColumnID, ColumnPlane, ColumnCount });
|
||||||
this.ColumnPlane,
|
dataGridViewShop.Location = new Point(30, 195);
|
||||||
this.ColumnCount});
|
dataGridViewShop.Margin = new Padding(3, 4, 3, 4);
|
||||||
this.dataGridViewShop.Location = new System.Drawing.Point(26, 118);
|
dataGridViewShop.Name = "dataGridViewShop";
|
||||||
this.dataGridViewShop.Name = "dataGridViewShop";
|
dataGridViewShop.RowHeadersWidth = 51;
|
||||||
this.dataGridViewShop.RowTemplate.Height = 25;
|
dataGridViewShop.RowTemplate.Height = 25;
|
||||||
this.dataGridViewShop.Size = new System.Drawing.Size(446, 325);
|
dataGridViewShop.Size = new Size(588, 433);
|
||||||
this.dataGridViewShop.TabIndex = 6;
|
dataGridViewShop.TabIndex = 6;
|
||||||
//
|
|
||||||
// buttonSave
|
|
||||||
//
|
|
||||||
this.buttonSave.Location = new System.Drawing.Point(316, 444);
|
|
||||||
this.buttonSave.Name = "buttonSave";
|
|
||||||
this.buttonSave.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.buttonSave.TabIndex = 7;
|
|
||||||
this.buttonSave.Text = "Сохранить";
|
|
||||||
this.buttonSave.UseVisualStyleBackColor = true;
|
|
||||||
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
|
|
||||||
//
|
|
||||||
// buttonCancel
|
|
||||||
//
|
|
||||||
this.buttonCancel.Location = new System.Drawing.Point(397, 444);
|
|
||||||
this.buttonCancel.Name = "buttonCancel";
|
|
||||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.buttonCancel.TabIndex = 8;
|
|
||||||
this.buttonCancel.Text = "Отмена";
|
|
||||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
|
||||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
|
||||||
//
|
//
|
||||||
// ColumnID
|
// ColumnID
|
||||||
//
|
//
|
||||||
this.ColumnID.HeaderText = "ID";
|
ColumnID.HeaderText = "ID";
|
||||||
this.ColumnID.Name = "ColumnID";
|
ColumnID.MinimumWidth = 6;
|
||||||
this.ColumnID.Visible = false;
|
ColumnID.Name = "ColumnID";
|
||||||
|
ColumnID.Visible = false;
|
||||||
//
|
//
|
||||||
// ColumnPlane
|
// ColumnPlane
|
||||||
//
|
//
|
||||||
this.ColumnPlane.HeaderText = "Изделие";
|
ColumnPlane.HeaderText = "Изделие";
|
||||||
this.ColumnPlane.Name = "ColumnPlane";
|
ColumnPlane.MinimumWidth = 6;
|
||||||
this.ColumnPlane.Width = 300;
|
ColumnPlane.Name = "ColumnPlane";
|
||||||
//
|
//
|
||||||
// ColumnCount
|
// ColumnCount
|
||||||
//
|
//
|
||||||
this.ColumnCount.HeaderText = "Количество";
|
ColumnCount.HeaderText = "Количество";
|
||||||
this.ColumnCount.Name = "ColumnCount";
|
ColumnCount.MinimumWidth = 6;
|
||||||
|
ColumnCount.Name = "ColumnCount";
|
||||||
|
//
|
||||||
|
// buttonSave
|
||||||
|
//
|
||||||
|
buttonSave.Location = new Point(399, 640);
|
||||||
|
buttonSave.Margin = new Padding(3, 4, 3, 4);
|
||||||
|
buttonSave.Name = "buttonSave";
|
||||||
|
buttonSave.Size = new Size(99, 31);
|
||||||
|
buttonSave.TabIndex = 7;
|
||||||
|
buttonSave.Text = "Сохранить";
|
||||||
|
buttonSave.UseVisualStyleBackColor = true;
|
||||||
|
buttonSave.Click += buttonSave_Click;
|
||||||
|
//
|
||||||
|
// buttonCancel
|
||||||
|
//
|
||||||
|
buttonCancel.Location = new Point(519, 640);
|
||||||
|
buttonCancel.Margin = new Padding(3, 4, 3, 4);
|
||||||
|
buttonCancel.Name = "buttonCancel";
|
||||||
|
buttonCancel.Size = new Size(99, 31);
|
||||||
|
buttonCancel.TabIndex = 8;
|
||||||
|
buttonCancel.Text = "Отмена";
|
||||||
|
buttonCancel.UseVisualStyleBackColor = true;
|
||||||
|
buttonCancel.Click += buttonCancel_Click;
|
||||||
|
//
|
||||||
|
// labelMaxPlanes
|
||||||
|
//
|
||||||
|
labelMaxPlanes.AutoSize = true;
|
||||||
|
labelMaxPlanes.Location = new Point(14, 148);
|
||||||
|
labelMaxPlanes.Name = "labelMaxPlanes";
|
||||||
|
labelMaxPlanes.Size = new Size(103, 20);
|
||||||
|
labelMaxPlanes.TabIndex = 9;
|
||||||
|
labelMaxPlanes.Text = "Вместимость:";
|
||||||
|
//
|
||||||
|
// numericUpDownMaxPlanes
|
||||||
|
//
|
||||||
|
numericUpDownMaxPlanes.Location = new Point(133, 146);
|
||||||
|
numericUpDownMaxPlanes.Name = "numericUpDownMaxPlanes";
|
||||||
|
numericUpDownMaxPlanes.Size = new Size(228, 27);
|
||||||
|
numericUpDownMaxPlanes.TabIndex = 10;
|
||||||
//
|
//
|
||||||
// FormShop
|
// FormShop
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
|
AutoScaleDimensions = new SizeF(8F, 20F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
AutoScaleMode = AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(481, 470);
|
ClientSize = new Size(645, 684);
|
||||||
this.Controls.Add(this.buttonCancel);
|
Controls.Add(numericUpDownMaxPlanes);
|
||||||
this.Controls.Add(this.buttonSave);
|
Controls.Add(labelMaxPlanes);
|
||||||
this.Controls.Add(this.dataGridViewShop);
|
Controls.Add(buttonCancel);
|
||||||
this.Controls.Add(this.dateTimePicker);
|
Controls.Add(buttonSave);
|
||||||
this.Controls.Add(this.textBoxAddress);
|
Controls.Add(dataGridViewShop);
|
||||||
this.Controls.Add(this.textBoxName);
|
Controls.Add(dateTimePicker);
|
||||||
this.Controls.Add(this.labelDate);
|
Controls.Add(textBoxAddress);
|
||||||
this.Controls.Add(this.labelAddress);
|
Controls.Add(textBoxName);
|
||||||
this.Controls.Add(this.labelName);
|
Controls.Add(labelDate);
|
||||||
this.Name = "FormShop";
|
Controls.Add(labelAddress);
|
||||||
this.Text = "Магазин";
|
Controls.Add(labelName);
|
||||||
this.Load += new System.EventHandler(this.FormShop_Load);
|
Margin = new Padding(3, 4, 3, 4);
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridViewShop)).EndInit();
|
Name = "FormShop";
|
||||||
this.ResumeLayout(false);
|
Text = "Магазин";
|
||||||
this.PerformLayout();
|
Load += FormShop_Load;
|
||||||
|
((System.ComponentModel.ISupportInitialize)dataGridViewShop).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)numericUpDownMaxPlanes).EndInit();
|
||||||
|
ResumeLayout(false);
|
||||||
|
PerformLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -185,5 +214,7 @@
|
|||||||
private DataGridViewTextBoxColumn ColumnPlane;
|
private DataGridViewTextBoxColumn ColumnPlane;
|
||||||
private DataGridViewTextBoxColumn ColumnCount;
|
private DataGridViewTextBoxColumn ColumnCount;
|
||||||
private DataGridView dataGridViewShop;
|
private DataGridView dataGridViewShop;
|
||||||
|
private Label labelMaxPlanes;
|
||||||
|
private NumericUpDown numericUpDownMaxPlanes;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -67,6 +67,7 @@ namespace AircraftPlantView
|
|||||||
textBoxName.Text = view.ShopName;
|
textBoxName.Text = view.ShopName;
|
||||||
textBoxAddress.Text = view.Address;
|
textBoxAddress.Text = view.Address;
|
||||||
dateTimePicker.Text = view.DateOpening.ToString();
|
dateTimePicker.Text = view.DateOpening.ToString();
|
||||||
|
numericUpDownMaxPlanes.Value = view.MaxPlanes;
|
||||||
_shopPlanes = view.ShopPlanes ?? new Dictionary<int, (IPlaneModel, int)>();
|
_shopPlanes = view.ShopPlanes ?? new Dictionary<int, (IPlaneModel, int)>();
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
@ -104,7 +105,8 @@ namespace AircraftPlantView
|
|||||||
ShopName = textBoxName.Text,
|
ShopName = textBoxName.Text,
|
||||||
Address = textBoxAddress.Text,
|
Address = textBoxAddress.Text,
|
||||||
DateOpening = dateTimePicker.Value.Date,
|
DateOpening = dateTimePicker.Value.Date,
|
||||||
ShopPlanes = _shopPlanes
|
ShopPlanes = _shopPlanes,
|
||||||
|
MaxPlanes = Convert.ToInt32(numericUpDownMaxPlanes.Value)
|
||||||
};
|
};
|
||||||
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);
|
var operationResult = _id.HasValue ? _logic.Update(model) : _logic.Create(model);
|
||||||
if (!operationResult)
|
if (!operationResult)
|
||||||
|
@ -1,4 +1,64 @@
|
|||||||
<root>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
using AircraftPlantBusinessLogic.BusinessLogics;
|
using AircraftPlantBusinessLogic.BusinessLogics;
|
||||||
using AircraftPlantContracts.BusinessLogicsContracts;
|
using AircraftPlantContracts.BusinessLogicsContracts;
|
||||||
using AircraftPlantContracts.StoragesContracts;
|
using AircraftPlantContracts.StoragesContracts;
|
||||||
|
using AircraftPlantFileImplement;
|
||||||
using AircraftPlantFileImplement.Implements;
|
using AircraftPlantFileImplement.Implements;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
@ -66,6 +67,7 @@ namespace AircraftPlantView
|
|||||||
services.AddTransient<FormShops>();
|
services.AddTransient<FormShops>();
|
||||||
services.AddTransient<FormShop>();
|
services.AddTransient<FormShop>();
|
||||||
services.AddTransient<FormSupply>();
|
services.AddTransient<FormSupply>();
|
||||||
|
services.AddTransient<FormSell>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user