финал_2

This commit is contained in:
GokaPek 2024-02-28 09:04:02 +04:00
parent be8194ceb5
commit d8e8a7d2c4
9 changed files with 607 additions and 351 deletions

View File

@ -28,83 +28,87 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.textBoxName = new System.Windows.Forms.TextBox(); textBoxName = new TextBox();
this.textBoxCost = new System.Windows.Forms.TextBox(); textBoxCost = new TextBox();
this.label1 = new System.Windows.Forms.Label(); label1 = new Label();
this.label2 = new System.Windows.Forms.Label(); label2 = new Label();
this.buttonSave = new System.Windows.Forms.Button(); buttonSave = new Button();
this.buttonCancel = new System.Windows.Forms.Button(); buttonCancel = new Button();
this.SuspendLayout(); SuspendLayout();
// //
// textBoxName // textBoxName
// //
this.textBoxName.Location = new System.Drawing.Point(72, 12); textBoxName.Location = new Point(82, 16);
this.textBoxName.Name = "textBoxName"; textBoxName.Margin = new Padding(3, 4, 3, 4);
this.textBoxName.Size = new System.Drawing.Size(267, 23); textBoxName.Name = "textBoxName";
this.textBoxName.TabIndex = 0; textBoxName.Size = new Size(305, 27);
textBoxName.TabIndex = 0;
// //
// textBoxCost // textBoxCost
// //
this.textBoxCost.Location = new System.Drawing.Point(72, 55); textBoxCost.Location = new Point(82, 73);
this.textBoxCost.Name = "textBoxCost"; textBoxCost.Margin = new Padding(3, 4, 3, 4);
this.textBoxCost.Size = new System.Drawing.Size(143, 23); textBoxCost.Name = "textBoxCost";
this.textBoxCost.TabIndex = 1; textBoxCost.Size = new Size(163, 27);
textBoxCost.TabIndex = 1;
// //
// label1 // label1
// //
this.label1.AutoSize = true; label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(2, 12); label1.Location = new Point(2, 16);
this.label1.Name = "label1"; label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(62, 15); label1.Size = new Size(80, 20);
this.label1.TabIndex = 2; label1.TabIndex = 2;
this.label1.Text = "Название:"; label1.Text = "Название:";
// //
// label2 // label2
// //
this.label2.AutoSize = true; label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 55); label2.Location = new Point(14, 73);
this.label2.Name = "label2"; label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(38, 15); label2.Size = new Size(48, 20);
this.label2.TabIndex = 3; label2.TabIndex = 3;
this.label2.Text = "Цена:"; label2.Text = "Цена:";
// //
// buttonSave // buttonSave
// //
this.buttonSave.Location = new System.Drawing.Point(159, 101); buttonSave.Location = new Point(182, 135);
this.buttonSave.Name = "buttonSave"; buttonSave.Margin = new Padding(3, 4, 3, 4);
this.buttonSave.Size = new System.Drawing.Size(75, 23); buttonSave.Name = "buttonSave";
this.buttonSave.TabIndex = 4; buttonSave.Size = new Size(92, 31);
this.buttonSave.Text = "Сохранить"; buttonSave.TabIndex = 4;
this.buttonSave.UseVisualStyleBackColor = true; buttonSave.Text = "Сохранить";
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); buttonSave.UseVisualStyleBackColor = true;
buttonSave.Click += buttonSave_Click;
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Location = new System.Drawing.Point(264, 101); buttonCancel.Location = new Point(302, 135);
this.buttonCancel.Name = "buttonCancel"; buttonCancel.Margin = new Padding(3, 4, 3, 4);
this.buttonCancel.Size = new System.Drawing.Size(75, 23); buttonCancel.Name = "buttonCancel";
this.buttonCancel.TabIndex = 5; buttonCancel.Size = new Size(86, 31);
this.buttonCancel.Text = "Отмена"; buttonCancel.TabIndex = 5;
this.buttonCancel.UseVisualStyleBackColor = true; buttonCancel.Text = "Отмена";
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += buttonCancel_Click;
// //
// FormComponent // FormComponent
// //
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(456, 139); ClientSize = new Size(521, 185);
this.Controls.Add(this.buttonCancel); Controls.Add(buttonCancel);
this.Controls.Add(this.buttonSave); Controls.Add(buttonSave);
this.Controls.Add(this.label2); Controls.Add(label2);
this.Controls.Add(this.label1); Controls.Add(label1);
this.Controls.Add(this.textBoxCost); Controls.Add(textBoxCost);
this.Controls.Add(this.textBoxName); Controls.Add(textBoxName);
this.Name = "FormComponent"; Margin = new Padding(3, 4, 3, 4);
this.Text = "Компонент"; Name = "FormComponent";
this.Load += new System.EventHandler(this.FormComponent_Load); Text = "Компонент";
this.ResumeLayout(false); Load += FormComponent_Load;
this.PerformLayout(); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion

View File

@ -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">

View File

@ -28,107 +28,112 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.comboBoxDocument = new System.Windows.Forms.ComboBox(); comboBoxDocument = new ComboBox();
this.textBoxCount = new System.Windows.Forms.TextBox(); textBoxCount = new TextBox();
this.textBoxSum = new System.Windows.Forms.TextBox(); textBoxSum = new TextBox();
this.label1 = new System.Windows.Forms.Label(); label1 = new Label();
this.label2 = new System.Windows.Forms.Label(); label2 = new Label();
this.label3 = new System.Windows.Forms.Label(); label3 = new Label();
this.buttonSave = new System.Windows.Forms.Button(); buttonSave = new Button();
this.buttonCancel = new System.Windows.Forms.Button(); buttonCancel = new Button();
this.SuspendLayout(); SuspendLayout();
// //
// comboBoxDocument // comboBoxDocument
// //
this.comboBoxDocument.FormattingEnabled = true; comboBoxDocument.FormattingEnabled = true;
this.comboBoxDocument.Location = new System.Drawing.Point(116, 12); comboBoxDocument.Location = new Point(133, 16);
this.comboBoxDocument.Name = "comboBoxDocument"; comboBoxDocument.Margin = new Padding(3, 4, 3, 4);
this.comboBoxDocument.Size = new System.Drawing.Size(198, 23); comboBoxDocument.Name = "comboBoxDocument";
this.comboBoxDocument.TabIndex = 0; comboBoxDocument.Size = new Size(226, 28);
this.comboBoxDocument.SelectedIndexChanged += new System.EventHandler(this.comboBoxDocument_SelectedIndexChanged); comboBoxDocument.TabIndex = 0;
comboBoxDocument.SelectedIndexChanged += comboBoxDocument_SelectedIndexChanged;
// //
// textBoxCount // textBoxCount
// //
this.textBoxCount.Location = new System.Drawing.Point(116, 41); textBoxCount.Location = new Point(133, 55);
this.textBoxCount.Name = "textBoxCount"; textBoxCount.Margin = new Padding(3, 4, 3, 4);
this.textBoxCount.Size = new System.Drawing.Size(198, 23); textBoxCount.Name = "textBoxCount";
this.textBoxCount.TabIndex = 1; textBoxCount.Size = new Size(226, 27);
this.textBoxCount.TextChanged += new System.EventHandler(this.textBoxCount_TextChanged); textBoxCount.TabIndex = 1;
textBoxCount.TextChanged += textBoxCount_TextChanged;
// //
// textBoxSum // textBoxSum
// //
this.textBoxSum.Location = new System.Drawing.Point(116, 70); textBoxSum.Location = new Point(133, 93);
this.textBoxSum.Name = "textBoxSum"; textBoxSum.Margin = new Padding(3, 4, 3, 4);
this.textBoxSum.Size = new System.Drawing.Size(198, 23); textBoxSum.Name = "textBoxSum";
this.textBoxSum.TabIndex = 2; textBoxSum.Size = new Size(226, 27);
this.textBoxSum.TextChanged += new System.EventHandler(this.textBoxSum_TextChanged); textBoxSum.TabIndex = 2;
textBoxSum.TextChanged += textBoxSum_TextChanged;
// //
// label1 // label1
// //
this.label1.AutoSize = true; label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 12); label1.Location = new Point(3, 16);
this.label1.Name = "label1"; label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(110, 15); label1.Size = new Size(138, 20);
this.label1.TabIndex = 3; label1.TabIndex = 3;
this.label1.Text = "Пакет документов:"; label1.Text = "Пакет документов:";
// //
// label2 // label2
// //
this.label2.AutoSize = true; label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 44); label2.Location = new Point(3, 59);
this.label2.Name = "label2"; label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(75, 15); label2.Size = new Size(93, 20);
this.label2.TabIndex = 4; label2.TabIndex = 4;
this.label2.Text = "Количество:"; label2.Text = "Количество:";
// //
// label3 // label3
// //
this.label3.AutoSize = true; label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 70); label3.Location = new Point(3, 93);
this.label3.Name = "label3"; label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(48, 15); label3.Size = new Size(58, 20);
this.label3.TabIndex = 5; label3.TabIndex = 5;
this.label3.Text = "Сумма:"; label3.Text = "Сумма:";
// //
// buttonSave // buttonSave
// //
this.buttonSave.Location = new System.Drawing.Point(180, 122); buttonSave.Location = new Point(206, 163);
this.buttonSave.Name = "buttonSave"; buttonSave.Margin = new Padding(3, 4, 3, 4);
this.buttonSave.Size = new System.Drawing.Size(75, 23); buttonSave.Name = "buttonSave";
this.buttonSave.TabIndex = 6; buttonSave.Size = new Size(91, 31);
this.buttonSave.Text = "Сохранить"; buttonSave.TabIndex = 6;
this.buttonSave.UseVisualStyleBackColor = true; buttonSave.Text = "Сохранить";
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); buttonSave.UseVisualStyleBackColor = true;
buttonSave.Click += buttonSave_Click;
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Location = new System.Drawing.Point(282, 122); buttonCancel.Location = new Point(322, 163);
this.buttonCancel.Name = "buttonCancel"; buttonCancel.Margin = new Padding(3, 4, 3, 4);
this.buttonCancel.Size = new System.Drawing.Size(75, 23); buttonCancel.Name = "buttonCancel";
this.buttonCancel.TabIndex = 7; buttonCancel.Size = new Size(86, 31);
this.buttonCancel.Text = "Отмена"; buttonCancel.TabIndex = 7;
this.buttonCancel.UseVisualStyleBackColor = true; buttonCancel.Text = "Отмена";
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += buttonCancel_Click;
// //
// FormCreateOrder // FormCreateOrder
// //
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(445, 158); ClientSize = new Size(509, 211);
this.Controls.Add(this.buttonCancel); Controls.Add(buttonCancel);
this.Controls.Add(this.buttonSave); Controls.Add(buttonSave);
this.Controls.Add(this.label3); Controls.Add(label3);
this.Controls.Add(this.label2); Controls.Add(label2);
this.Controls.Add(this.label1); Controls.Add(label1);
this.Controls.Add(this.textBoxSum); Controls.Add(textBoxSum);
this.Controls.Add(this.textBoxCount); Controls.Add(textBoxCount);
this.Controls.Add(this.comboBoxDocument); Controls.Add(comboBoxDocument);
this.Name = "FormCreateOrder"; Margin = new Padding(3, 4, 3, 4);
this.Text = "Заказ"; Name = "FormCreateOrder";
this.Load += new System.EventHandler(this.FormCreateOrder_Load); Text = "Заказ";
this.ResumeLayout(false); Load += FormCreateOrder_Load;
this.PerformLayout(); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion

View File

@ -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">

View File

@ -90,7 +90,7 @@ pc.Value.Item1.ComponentName, pc.Value.Item2 });
Program.ServiceProvider?.GetService(typeof(FormDocumentComponent)); Program.ServiceProvider?.GetService(typeof(FormDocumentComponent));
if (service is FormDocumentComponent form) if (service is FormDocumentComponent form)
{ {
if (form.ShowDialog() == DialogResult.OK) if (form.ShowDialog() == DialogResult.OK)
{ {
if (form.ComponentModel == null) if (form.ComponentModel == null)
{ {
@ -132,7 +132,7 @@ pc.Value.Item1.ComponentName, pc.Value.Item2 });
return; return;
} }
_logger.LogInformation("Изменение компонента:{ ComponentName - { Count}", form.ComponentModel.ComponentName, form.Count); _logger.LogInformation("Изменение компонента:{ ComponentName - { Count}", form.ComponentModel.ComponentName, form.Count);
_documentComponents[form.Id] = (form.ComponentModel,form.Count); _documentComponents[form.Id] = (form.ComponentModel, form.Count);
LoadData(); LoadData();
} }
} }
@ -150,7 +150,7 @@ pc.Value.Item1.ComponentName, pc.Value.Item2 });
try try
{ {
_logger.LogInformation("Удаление компонента: { ComponentName} - { Count} ", dataGridView.SelectedRows[0].Cells[1].Value); _logger.LogInformation("Удаление компонента: { ComponentName} - { Count} ", dataGridView.SelectedRows[0].Cells[1].Value);
_documentComponents?.Remove(Convert.ToInt32(dataGridView.SelectedRows[0].Cells[0].Value)); _documentComponents?.Remove(Convert.ToInt32(dataGridView.SelectedRows[0].Cells[0].Value));
} }
catch (Exception ex) catch (Exception ex)

View File

@ -28,181 +28,193 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.groupBox1 = new System.Windows.Forms.GroupBox(); groupBox1 = new GroupBox();
this.dataGridView = new System.Windows.Forms.DataGridView(); buttonRef = new Button();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); buttonDel = new Button();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); buttonUpd = new Button();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); buttonAdd = new Button();
this.buttonAdd = new System.Windows.Forms.Button(); dataGridView = new DataGridView();
this.buttonUpd = new System.Windows.Forms.Button(); Column1 = new DataGridViewTextBoxColumn();
this.buttonDel = new System.Windows.Forms.Button(); Column2 = new DataGridViewTextBoxColumn();
this.buttonRef = new System.Windows.Forms.Button(); Column3 = new DataGridViewTextBoxColumn();
this.buttonSave = new System.Windows.Forms.Button(); buttonSave = new Button();
this.buttonCancel = new System.Windows.Forms.Button(); buttonCancel = new Button();
this.textBoxName = new System.Windows.Forms.TextBox(); textBoxName = new TextBox();
this.textBoxPrice = new System.Windows.Forms.TextBox(); textBoxPrice = new TextBox();
this.label1 = new System.Windows.Forms.Label(); label1 = new Label();
this.label2 = new System.Windows.Forms.Label(); label2 = new Label();
this.groupBox1.SuspendLayout(); groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit();
this.SuspendLayout(); SuspendLayout();
// //
// groupBox1 // groupBox1
// //
this.groupBox1.Controls.Add(this.buttonRef); groupBox1.Controls.Add(buttonRef);
this.groupBox1.Controls.Add(this.buttonDel); groupBox1.Controls.Add(buttonDel);
this.groupBox1.Controls.Add(this.buttonUpd); groupBox1.Controls.Add(buttonUpd);
this.groupBox1.Controls.Add(this.buttonAdd); groupBox1.Controls.Add(buttonAdd);
this.groupBox1.Controls.Add(this.dataGridView); groupBox1.Controls.Add(dataGridView);
this.groupBox1.Location = new System.Drawing.Point(58, 98); groupBox1.Location = new Point(66, 131);
this.groupBox1.Name = "groupBox1"; groupBox1.Margin = new Padding(3, 4, 3, 4);
this.groupBox1.Size = new System.Drawing.Size(605, 288); groupBox1.Name = "groupBox1";
this.groupBox1.TabIndex = 0; groupBox1.Padding = new Padding(3, 4, 3, 4);
this.groupBox1.TabStop = false; groupBox1.Size = new Size(691, 384);
this.groupBox1.Text = "Компоненты"; groupBox1.TabIndex = 0;
// groupBox1.TabStop = false;
// dataGridView groupBox1.Text = "Компоненты";
//
this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3});
this.dataGridView.Location = new System.Drawing.Point(3, 19);
this.dataGridView.Name = "dataGridView";
this.dataGridView.RowTemplate.Height = 25;
this.dataGridView.Size = new System.Drawing.Size(413, 254);
this.dataGridView.TabIndex = 0;
//
// Column1
//
this.Column1.HeaderText = "id";
this.Column1.Name = "Column1";
this.Column1.Visible = false;
//
// Column2
//
this.Column2.HeaderText = "Компонент";
this.Column2.Name = "Column2";
//
// Column3
//
this.Column3.HeaderText = "Количество";
this.Column3.Name = "Column3";
//
// buttonAdd
//
this.buttonAdd.Location = new System.Drawing.Point(476, 19);
this.buttonAdd.Name = "buttonAdd";
this.buttonAdd.Size = new System.Drawing.Size(75, 23);
this.buttonAdd.TabIndex = 1;
this.buttonAdd.Text = "Добавить";
this.buttonAdd.UseVisualStyleBackColor = true;
this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click);
//
// buttonUpd
//
this.buttonUpd.Location = new System.Drawing.Point(476, 61);
this.buttonUpd.Name = "buttonUpd";
this.buttonUpd.Size = new System.Drawing.Size(75, 23);
this.buttonUpd.TabIndex = 2;
this.buttonUpd.Text = "Изменить";
this.buttonUpd.UseVisualStyleBackColor = true;
this.buttonUpd.Click += new System.EventHandler(this.buttonUpd_Click);
//
// buttonDel
//
this.buttonDel.Location = new System.Drawing.Point(476, 108);
this.buttonDel.Name = "buttonDel";
this.buttonDel.Size = new System.Drawing.Size(75, 23);
this.buttonDel.TabIndex = 3;
this.buttonDel.Text = "Удалить";
this.buttonDel.UseVisualStyleBackColor = true;
this.buttonDel.Click += new System.EventHandler(this.buttonDel_Click);
// //
// buttonRef // buttonRef
// //
this.buttonRef.Location = new System.Drawing.Point(476, 156); buttonRef.Location = new Point(544, 208);
this.buttonRef.Name = "buttonRef"; buttonRef.Margin = new Padding(3, 4, 3, 4);
this.buttonRef.Size = new System.Drawing.Size(75, 23); buttonRef.Name = "buttonRef";
this.buttonRef.TabIndex = 4; buttonRef.Size = new Size(86, 31);
this.buttonRef.Text = "Обновить"; buttonRef.TabIndex = 4;
this.buttonRef.UseVisualStyleBackColor = true; buttonRef.Text = "Обновить";
this.buttonRef.Click += new System.EventHandler(this.buttonRef_Click); buttonRef.UseVisualStyleBackColor = true;
buttonRef.Click += buttonRef_Click;
//
// buttonDel
//
buttonDel.Location = new Point(544, 144);
buttonDel.Margin = new Padding(3, 4, 3, 4);
buttonDel.Name = "buttonDel";
buttonDel.Size = new Size(86, 31);
buttonDel.TabIndex = 3;
buttonDel.Text = "Удалить";
buttonDel.UseVisualStyleBackColor = true;
buttonDel.Click += buttonDel_Click;
//
// buttonUpd
//
buttonUpd.Location = new Point(544, 81);
buttonUpd.Margin = new Padding(3, 4, 3, 4);
buttonUpd.Name = "buttonUpd";
buttonUpd.Size = new Size(86, 31);
buttonUpd.TabIndex = 2;
buttonUpd.Text = "Изменить";
buttonUpd.UseVisualStyleBackColor = true;
buttonUpd.Click += buttonUpd_Click;
//
// buttonAdd
//
buttonAdd.Location = new Point(544, 25);
buttonAdd.Margin = new Padding(3, 4, 3, 4);
buttonAdd.Name = "buttonAdd";
buttonAdd.Size = new Size(86, 31);
buttonAdd.TabIndex = 1;
buttonAdd.Text = "Добавить";
buttonAdd.UseVisualStyleBackColor = true;
buttonAdd.Click += buttonAdd_Click;
//
// dataGridView
//
dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
dataGridView.Columns.AddRange(new DataGridViewColumn[] { Column1, Column2, Column3 });
dataGridView.Location = new Point(3, 25);
dataGridView.Margin = new Padding(3, 4, 3, 4);
dataGridView.Name = "dataGridView";
dataGridView.RowHeadersWidth = 51;
dataGridView.RowTemplate.Height = 25;
dataGridView.Size = new Size(472, 339);
dataGridView.TabIndex = 0;
//
// Column1
//
Column1.HeaderText = "id";
Column1.MinimumWidth = 6;
Column1.Name = "Column1";
Column1.Visible = false;
//
// Column2
//
Column2.HeaderText = "Компонент";
Column2.MinimumWidth = 6;
Column2.Name = "Column2";
//
// Column3
//
Column3.HeaderText = "Количество";
Column3.MinimumWidth = 6;
Column3.Name = "Column3";
// //
// buttonSave // buttonSave
// //
this.buttonSave.Location = new System.Drawing.Point(427, 403); buttonSave.Location = new Point(488, 537);
this.buttonSave.Name = "buttonSave"; buttonSave.Margin = new Padding(3, 4, 3, 4);
this.buttonSave.Size = new System.Drawing.Size(75, 23); buttonSave.Name = "buttonSave";
this.buttonSave.TabIndex = 1; buttonSave.Size = new Size(94, 31);
this.buttonSave.Text = "Сохранить"; buttonSave.TabIndex = 1;
this.buttonSave.UseVisualStyleBackColor = true; buttonSave.Text = "Сохранить";
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); buttonSave.UseVisualStyleBackColor = true;
buttonSave.Click += buttonSave_Click;
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Location = new System.Drawing.Point(534, 403); buttonCancel.Location = new Point(610, 537);
this.buttonCancel.Name = "buttonCancel"; buttonCancel.Margin = new Padding(3, 4, 3, 4);
this.buttonCancel.Size = new System.Drawing.Size(75, 23); buttonCancel.Name = "buttonCancel";
this.buttonCancel.TabIndex = 2; buttonCancel.Size = new Size(86, 31);
this.buttonCancel.Text = "Отмена"; buttonCancel.TabIndex = 2;
this.buttonCancel.UseVisualStyleBackColor = true; buttonCancel.Text = "Отмена";
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += buttonCancel_Click;
// //
// textBoxName // textBoxName
// //
this.textBoxName.Location = new System.Drawing.Point(102, 12); textBoxName.Location = new Point(117, 16);
this.textBoxName.Name = "textBoxName"; textBoxName.Margin = new Padding(3, 4, 3, 4);
this.textBoxName.Size = new System.Drawing.Size(205, 23); textBoxName.Name = "textBoxName";
this.textBoxName.TabIndex = 3; textBoxName.Size = new Size(234, 27);
textBoxName.TabIndex = 3;
// //
// textBoxPrice // textBoxPrice
// //
this.textBoxPrice.Location = new System.Drawing.Point(102, 41); textBoxPrice.Location = new Point(117, 55);
this.textBoxPrice.Name = "textBoxPrice"; textBoxPrice.Margin = new Padding(3, 4, 3, 4);
this.textBoxPrice.Size = new System.Drawing.Size(151, 23); textBoxPrice.Name = "textBoxPrice";
this.textBoxPrice.TabIndex = 4; textBoxPrice.Size = new Size(172, 27);
textBoxPrice.TabIndex = 4;
// //
// label1 // label1
// //
this.label1.AutoSize = true; label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 12); label1.Location = new Point(14, 16);
this.label1.Name = "label1"; label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(62, 15); label1.Size = new Size(80, 20);
this.label1.TabIndex = 5; label1.TabIndex = 5;
this.label1.Text = "Название:"; label1.Text = "Название:";
// //
// label2 // label2
// //
this.label2.AutoSize = true; label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 41); label2.Location = new Point(14, 55);
this.label2.Name = "label2"; label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(70, 15); label2.Size = new Size(86, 20);
this.label2.TabIndex = 6; label2.TabIndex = 6;
this.label2.Text = "Стоимость:"; label2.Text = "Стоимость:";
// //
// FormDocument // FormDocument
// //
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(691, 450); ClientSize = new Size(790, 600);
this.Controls.Add(this.label2); Controls.Add(label2);
this.Controls.Add(this.label1); Controls.Add(label1);
this.Controls.Add(this.textBoxPrice); Controls.Add(textBoxPrice);
this.Controls.Add(this.textBoxName); Controls.Add(textBoxName);
this.Controls.Add(this.buttonCancel); Controls.Add(buttonCancel);
this.Controls.Add(this.buttonSave); Controls.Add(buttonSave);
this.Controls.Add(this.groupBox1); Controls.Add(groupBox1);
this.Name = "FormDocument"; Margin = new Padding(3, 4, 3, 4);
this.Text = "Пакет документов"; Name = "FormDocument";
this.Load += new System.EventHandler(this.FormDocument_Load); Text = "Пакет документов";
this.groupBox1.ResumeLayout(false); Load += FormDocument_Load;
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit(); groupBox1.ResumeLayout(false);
this.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit();
this.PerformLayout(); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion

View File

@ -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">
@ -66,13 +126,4 @@
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root> </root>

View File

@ -28,83 +28,87 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.comboBoxComponent = new System.Windows.Forms.ComboBox(); comboBoxComponent = new ComboBox();
this.textBoxCount = new System.Windows.Forms.TextBox(); textBoxCount = new TextBox();
this.label1 = new System.Windows.Forms.Label(); label1 = new Label();
this.label2 = new System.Windows.Forms.Label(); label2 = new Label();
this.buttonSave = new System.Windows.Forms.Button(); buttonSave = new Button();
this.buttonCancel = new System.Windows.Forms.Button(); buttonCancel = new Button();
this.SuspendLayout(); SuspendLayout();
// //
// comboBoxComponent // comboBoxComponent
// //
this.comboBoxComponent.FormattingEnabled = true; comboBoxComponent.FormattingEnabled = true;
this.comboBoxComponent.Location = new System.Drawing.Point(93, 12); comboBoxComponent.Location = new Point(106, 16);
this.comboBoxComponent.Name = "comboBoxComponent"; comboBoxComponent.Margin = new Padding(3, 4, 3, 4);
this.comboBoxComponent.Size = new System.Drawing.Size(215, 23); comboBoxComponent.Name = "comboBoxComponent";
this.comboBoxComponent.TabIndex = 0; comboBoxComponent.Size = new Size(245, 28);
comboBoxComponent.TabIndex = 0;
// //
// textBoxCount // textBoxCount
// //
this.textBoxCount.Location = new System.Drawing.Point(93, 50); textBoxCount.Location = new Point(106, 67);
this.textBoxCount.Name = "textBoxCount"; textBoxCount.Margin = new Padding(3, 4, 3, 4);
this.textBoxCount.Size = new System.Drawing.Size(146, 23); textBoxCount.Name = "textBoxCount";
this.textBoxCount.TabIndex = 1; textBoxCount.Size = new Size(166, 27);
textBoxCount.TabIndex = 1;
// //
// label1 // label1
// //
this.label1.AutoSize = true; label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 12); label1.Location = new Point(14, 16);
this.label1.Name = "label1"; label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 15); label1.Size = new Size(91, 20);
this.label1.TabIndex = 2; label1.TabIndex = 2;
this.label1.Text = "Компонент:"; label1.Text = "Компонент:";
// //
// label2 // label2
// //
this.label2.AutoSize = true; label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 50); label2.Location = new Point(14, 67);
this.label2.Name = "label2"; label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(75, 15); label2.Size = new Size(93, 20);
this.label2.TabIndex = 3; label2.TabIndex = 3;
this.label2.Text = "Количество:"; label2.Text = "Количество:";
// //
// buttonSave // buttonSave
// //
this.buttonSave.Location = new System.Drawing.Point(164, 91); buttonSave.Location = new Point(187, 121);
this.buttonSave.Name = "buttonSave"; buttonSave.Margin = new Padding(3, 4, 3, 4);
this.buttonSave.Size = new System.Drawing.Size(75, 23); buttonSave.Name = "buttonSave";
this.buttonSave.TabIndex = 4; buttonSave.Size = new Size(95, 31);
this.buttonSave.Text = "Сохранить"; buttonSave.TabIndex = 4;
this.buttonSave.UseVisualStyleBackColor = true; buttonSave.Text = "Сохранить";
this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click); buttonSave.UseVisualStyleBackColor = true;
buttonSave.Click += buttonSave_Click;
// //
// buttonCancel // buttonCancel
// //
this.buttonCancel.Location = new System.Drawing.Point(259, 91); buttonCancel.Location = new Point(296, 121);
this.buttonCancel.Name = "buttonCancel"; buttonCancel.Margin = new Padding(3, 4, 3, 4);
this.buttonCancel.Size = new System.Drawing.Size(75, 23); buttonCancel.Name = "buttonCancel";
this.buttonCancel.TabIndex = 5; buttonCancel.Size = new Size(86, 31);
this.buttonCancel.Text = "Отмена"; buttonCancel.TabIndex = 5;
this.buttonCancel.UseVisualStyleBackColor = true; buttonCancel.Text = "Отмена";
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click); buttonCancel.UseVisualStyleBackColor = true;
buttonCancel.Click += buttonCancel_Click;
// //
// FormProductComponent // FormDocumentComponent
// //
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(384, 136); ClientSize = new Size(439, 181);
this.Controls.Add(this.buttonCancel); Controls.Add(buttonCancel);
this.Controls.Add(this.buttonSave); Controls.Add(buttonSave);
this.Controls.Add(this.label2); Controls.Add(label2);
this.Controls.Add(this.label1); Controls.Add(label1);
this.Controls.Add(this.textBoxCount); Controls.Add(textBoxCount);
this.Controls.Add(this.comboBoxComponent); Controls.Add(comboBoxComponent);
this.Name = "FormProductComponent"; Margin = new Padding(3, 4, 3, 4);
this.Text = "Компонент пакета документов"; Name = "FormDocumentComponent";
this.ResumeLayout(false); Text = "Компонент пакета документов";
this.PerformLayout(); ResumeLayout(false);
PerformLayout();
} }
#endregion #endregion

View File

@ -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">