Jelajahi Sumber

BurnOfMyBrain

Danya_Ls Danya_Ls 2 tahun lalu
induk
melakukan
9633772dbb

+ 9 - 0
FactoryLVS/FactoryLVS.csproj

@@ -60,6 +60,12 @@
     <Compile Include="Form1.Designer.cs">
       <DependentUpon>Form1.cs</DependentUpon>
     </Compile>
+    <Compile Include="FormAddTovar.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FormAddTovar.Designer.cs">
+      <DependentUpon>FormAddTovar.cs</DependentUpon>
+    </Compile>
     <Compile Include="FormAddZakaz.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -107,6 +113,9 @@
     <EmbeddedResource Include="Form1.resx">
       <DependentUpon>Form1.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FormAddTovar.resx">
+      <DependentUpon>FormAddTovar.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FormAddZakaz.resx">
       <DependentUpon>FormAddZakaz.cs</DependentUpon>
     </EmbeddedResource>

+ 527 - 0
FactoryLVS/FormAddTovar.Designer.cs

@@ -0,0 +1,527 @@
+namespace FactoryLVS
+{
+    partial class FormAddTovar
+    {
+        /// <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()
+        {
+            this.components = new System.ComponentModel.Container();
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormAddTovar));
+            this.btnClose = new System.Windows.Forms.Button();
+            this.btnOk = new System.Windows.Forms.Button();
+            this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.btnDelCloth = new System.Windows.Forms.Button();
+            this.dgvTkan = new System.Windows.Forms.DataGridView();
+            this.btnAddCloth = new System.Windows.Forms.Button();
+            this.btnClearPhoto = new System.Windows.Forms.Button();
+            this.btnLoadPhoto = new System.Windows.Forms.Button();
+            this.pbxPhotoCloth = new System.Windows.Forms.PictureBox();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.tbxDescr = new System.Windows.Forms.TextBox();
+            this.tbxColor = new System.Windows.Forms.TextBox();
+            this.tbxLenght = new System.Windows.Forms.TextBox();
+            this.tbxWidth = new System.Windows.Forms.TextBox();
+            this.tbxTitle = new System.Windows.Forms.TextBox();
+            this.tabPage2 = new System.Windows.Forms.TabPage();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.label1 = new System.Windows.Forms.Label();
+            this.pbxPhoto = new System.Windows.Forms.PictureBox();
+            this.ofdPhoto = new System.Windows.Forms.OpenFileDialog();
+            this.BsTkan = new System.Windows.Forms.BindingSource(this.components);
+            this.factoryLVSDataSet = new FactoryLVS.FactoryLVSDataSet();
+            this.tkanTableAdapter = new FactoryLVS.FactoryLVSDataSetTableAdapters.TkanTableAdapter();
+            this.fKOrdersTkanBindingSource = new System.Windows.Forms.BindingSource(this.components);
+            this.ordersTableAdapter = new FactoryLVS.FactoryLVSDataSetTableAdapters.OrdersTableAdapter();
+            this.namePhotoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.commentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.widthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.lengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.idcolorDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.titleDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.idTkanDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.tkanBindingSource = new System.Windows.Forms.BindingSource(this.components);
+            this.tabControl1.SuspendLayout();
+            this.tabPage1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvTkan)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbxPhotoCloth)).BeginInit();
+            this.panel1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbxPhoto)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BsTkan)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.factoryLVSDataSet)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.fKOrdersTkanBindingSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.tkanBindingSource)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // btnClose
+            // 
+            this.btnClose.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnClose.Location = new System.Drawing.Point(726, 560);
+            this.btnClose.Margin = new System.Windows.Forms.Padding(2);
+            this.btnClose.Name = "btnClose";
+            this.btnClose.Size = new System.Drawing.Size(142, 32);
+            this.btnClose.TabIndex = 21;
+            this.btnClose.Text = "Отменить";
+            this.btnClose.UseVisualStyleBackColor = false;
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // btnOk
+            // 
+            this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnOk.Location = new System.Drawing.Point(11, 565);
+            this.btnOk.Margin = new System.Windows.Forms.Padding(2);
+            this.btnOk.Name = "btnOk";
+            this.btnOk.Size = new System.Drawing.Size(142, 32);
+            this.btnOk.TabIndex = 20;
+            this.btnOk.Text = "OK";
+            this.btnOk.UseVisualStyleBackColor = false;
+            this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
+            // 
+            // tabControl1
+            // 
+            this.tabControl1.Controls.Add(this.tabPage1);
+            this.tabControl1.Controls.Add(this.tabPage2);
+            this.tabControl1.Location = new System.Drawing.Point(11, 93);
+            this.tabControl1.Margin = new System.Windows.Forms.Padding(2);
+            this.tabControl1.Name = "tabControl1";
+            this.tabControl1.SelectedIndex = 0;
+            this.tabControl1.Size = new System.Drawing.Size(861, 468);
+            this.tabControl1.TabIndex = 19;
+            // 
+            // tabPage1
+            // 
+            this.tabPage1.Controls.Add(this.btnDelCloth);
+            this.tabPage1.Controls.Add(this.dgvTkan);
+            this.tabPage1.Controls.Add(this.btnAddCloth);
+            this.tabPage1.Controls.Add(this.btnClearPhoto);
+            this.tabPage1.Controls.Add(this.btnLoadPhoto);
+            this.tabPage1.Controls.Add(this.pbxPhotoCloth);
+            this.tabPage1.Controls.Add(this.label6);
+            this.tabPage1.Controls.Add(this.label5);
+            this.tabPage1.Controls.Add(this.label4);
+            this.tabPage1.Controls.Add(this.label3);
+            this.tabPage1.Controls.Add(this.label2);
+            this.tabPage1.Controls.Add(this.tbxDescr);
+            this.tabPage1.Controls.Add(this.tbxColor);
+            this.tabPage1.Controls.Add(this.tbxLenght);
+            this.tabPage1.Controls.Add(this.tbxWidth);
+            this.tabPage1.Controls.Add(this.tbxTitle);
+            this.tabPage1.Location = new System.Drawing.Point(4, 22);
+            this.tabPage1.Margin = new System.Windows.Forms.Padding(2);
+            this.tabPage1.Name = "tabPage1";
+            this.tabPage1.Padding = new System.Windows.Forms.Padding(2);
+            this.tabPage1.Size = new System.Drawing.Size(853, 442);
+            this.tabPage1.TabIndex = 0;
+            this.tabPage1.Text = "Добавить в документ ткани";
+            this.tabPage1.UseVisualStyleBackColor = true;
+            // 
+            // btnDelCloth
+            // 
+            this.btnDelCloth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.btnDelCloth.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnDelCloth.Location = new System.Drawing.Point(8, 385);
+            this.btnDelCloth.Margin = new System.Windows.Forms.Padding(2);
+            this.btnDelCloth.Name = "btnDelCloth";
+            this.btnDelCloth.Size = new System.Drawing.Size(407, 32);
+            this.btnDelCloth.TabIndex = 15;
+            this.btnDelCloth.Text = "Удалить выделенную ткань из документа";
+            this.btnDelCloth.UseVisualStyleBackColor = false;
+            this.btnDelCloth.Click += new System.EventHandler(this.btnDelCloth_Click);
+            // 
+            // dgvTkan
+            // 
+            this.dgvTkan.AllowUserToAddRows = false;
+            this.dgvTkan.AllowUserToDeleteRows = false;
+            this.dgvTkan.AutoGenerateColumns = false;
+            this.dgvTkan.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvTkan.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.idTkanDataGridViewTextBoxColumn,
+            this.titleDataGridViewTextBoxColumn,
+            this.idcolorDataGridViewTextBoxColumn,
+            this.lengthDataGridViewTextBoxColumn,
+            this.widthDataGridViewTextBoxColumn,
+            this.commentDataGridViewTextBoxColumn,
+            this.namePhotoDataGridViewTextBoxColumn});
+            this.dgvTkan.DataSource = this.tkanBindingSource;
+            this.dgvTkan.Location = new System.Drawing.Point(8, 143);
+            this.dgvTkan.Margin = new System.Windows.Forms.Padding(2);
+            this.dgvTkan.MultiSelect = false;
+            this.dgvTkan.Name = "dgvTkan";
+            this.dgvTkan.ReadOnly = true;
+            this.dgvTkan.RowTemplate.Height = 24;
+            this.dgvTkan.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvTkan.Size = new System.Drawing.Size(841, 238);
+            this.dgvTkan.TabIndex = 14;
+            // 
+            // btnAddCloth
+            // 
+            this.btnAddCloth.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.btnAddCloth.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnAddCloth.Location = new System.Drawing.Point(8, 111);
+            this.btnAddCloth.Margin = new System.Windows.Forms.Padding(2);
+            this.btnAddCloth.Name = "btnAddCloth";
+            this.btnAddCloth.Size = new System.Drawing.Size(313, 29);
+            this.btnAddCloth.TabIndex = 13;
+            this.btnAddCloth.Text = "Добавить эту ткань в документ";
+            this.btnAddCloth.UseVisualStyleBackColor = false;
+            this.btnAddCloth.Click += new System.EventHandler(this.btnAddCloth_Click);
+            // 
+            // btnClearPhoto
+            // 
+            this.btnClearPhoto.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.btnClearPhoto.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnClearPhoto.Location = new System.Drawing.Point(717, 67);
+            this.btnClearPhoto.Margin = new System.Windows.Forms.Padding(2);
+            this.btnClearPhoto.Name = "btnClearPhoto";
+            this.btnClearPhoto.Size = new System.Drawing.Size(120, 36);
+            this.btnClearPhoto.TabIndex = 12;
+            this.btnClearPhoto.Text = "Очистить фото";
+            this.btnClearPhoto.UseVisualStyleBackColor = false;
+            this.btnClearPhoto.Click += new System.EventHandler(this.btnClearPhoto_Click);
+            // 
+            // btnLoadPhoto
+            // 
+            this.btnLoadPhoto.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.btnLoadPhoto.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnLoadPhoto.Location = new System.Drawing.Point(717, 14);
+            this.btnLoadPhoto.Margin = new System.Windows.Forms.Padding(2);
+            this.btnLoadPhoto.Name = "btnLoadPhoto";
+            this.btnLoadPhoto.Size = new System.Drawing.Size(120, 38);
+            this.btnLoadPhoto.TabIndex = 11;
+            this.btnLoadPhoto.Text = "Загрузить фото";
+            this.btnLoadPhoto.UseVisualStyleBackColor = false;
+            this.btnLoadPhoto.Click += new System.EventHandler(this.btnLoadPhoto_Click);
+            // 
+            // pbxPhotoCloth
+            // 
+            this.pbxPhotoCloth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.pbxPhotoCloth.Location = new System.Drawing.Point(575, 12);
+            this.pbxPhotoCloth.Margin = new System.Windows.Forms.Padding(2);
+            this.pbxPhotoCloth.Name = "pbxPhotoCloth";
+            this.pbxPhotoCloth.Size = new System.Drawing.Size(138, 127);
+            this.pbxPhotoCloth.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pbxPhotoCloth.TabIndex = 10;
+            this.pbxPhotoCloth.TabStop = false;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(340, 12);
+            this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(60, 13);
+            this.label6.TabIndex = 9;
+            this.label6.Text = "Описание:";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(47, 81);
+            this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(35, 13);
+            this.label5.TabIndex = 8;
+            this.label5.Text = "Цвет:";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(188, 48);
+            this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(43, 13);
+            this.label4.TabIndex = 7;
+            this.label4.Text = "Длина:";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(21, 53);
+            this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(49, 13);
+            this.label3.TabIndex = 6;
+            this.label3.Text = "Ширина:";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(6, 15);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(60, 13);
+            this.label2.TabIndex = 5;
+            this.label2.Text = "Название:";
+            // 
+            // tbxDescr
+            // 
+            this.tbxDescr.Location = new System.Drawing.Point(340, 36);
+            this.tbxDescr.Margin = new System.Windows.Forms.Padding(2);
+            this.tbxDescr.Multiline = true;
+            this.tbxDescr.Name = "tbxDescr";
+            this.tbxDescr.Size = new System.Drawing.Size(202, 103);
+            this.tbxDescr.TabIndex = 4;
+            // 
+            // tbxColor
+            // 
+            this.tbxColor.Location = new System.Drawing.Point(108, 78);
+            this.tbxColor.Margin = new System.Windows.Forms.Padding(2);
+            this.tbxColor.Name = "tbxColor";
+            this.tbxColor.Size = new System.Drawing.Size(102, 20);
+            this.tbxColor.TabIndex = 3;
+            // 
+            // tbxLenght
+            // 
+            this.tbxLenght.Location = new System.Drawing.Point(260, 45);
+            this.tbxLenght.Margin = new System.Windows.Forms.Padding(2);
+            this.tbxLenght.Name = "tbxLenght";
+            this.tbxLenght.Size = new System.Drawing.Size(76, 20);
+            this.tbxLenght.TabIndex = 2;
+            // 
+            // tbxWidth
+            // 
+            this.tbxWidth.Location = new System.Drawing.Point(108, 45);
+            this.tbxWidth.Margin = new System.Windows.Forms.Padding(2);
+            this.tbxWidth.Name = "tbxWidth";
+            this.tbxWidth.Size = new System.Drawing.Size(76, 20);
+            this.tbxWidth.TabIndex = 1;
+            // 
+            // tbxTitle
+            // 
+            this.tbxTitle.Location = new System.Drawing.Point(108, 12);
+            this.tbxTitle.Margin = new System.Windows.Forms.Padding(2);
+            this.tbxTitle.Name = "tbxTitle";
+            this.tbxTitle.Size = new System.Drawing.Size(228, 20);
+            this.tbxTitle.TabIndex = 0;
+            // 
+            // tabPage2
+            // 
+            this.tabPage2.Location = new System.Drawing.Point(4, 22);
+            this.tabPage2.Margin = new System.Windows.Forms.Padding(2);
+            this.tabPage2.Name = "tabPage2";
+            this.tabPage2.Padding = new System.Windows.Forms.Padding(2);
+            this.tabPage2.Size = new System.Drawing.Size(853, 442);
+            this.tabPage2.TabIndex = 1;
+            this.tabPage2.Text = "Добавить в документ фурнитуру";
+            this.tabPage2.UseVisualStyleBackColor = true;
+            // 
+            // panel1
+            // 
+            this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(225)))));
+            this.panel1.Controls.Add(this.label1);
+            this.panel1.Controls.Add(this.pbxPhoto);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panel1.Location = new System.Drawing.Point(0, 0);
+            this.panel1.Margin = new System.Windows.Forms.Padding(44, 20, 44, 20);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(879, 85);
+            this.panel1.TabIndex = 18;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("Arial", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.label1.Location = new System.Drawing.Point(239, 27);
+            this.label1.Margin = new System.Windows.Forms.Padding(44, 0, 44, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(286, 37);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "Принятие товара";
+            // 
+            // pbxPhoto
+            // 
+            this.pbxPhoto.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pbxPhoto.Image = global::FactoryLVS.Properties.Resources.fabric_logo;
+            this.pbxPhoto.Location = new System.Drawing.Point(691, 0);
+            this.pbxPhoto.Margin = new System.Windows.Forms.Padding(44, 20, 44, 20);
+            this.pbxPhoto.Name = "pbxPhoto";
+            this.pbxPhoto.Size = new System.Drawing.Size(188, 85);
+            this.pbxPhoto.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pbxPhoto.TabIndex = 0;
+            this.pbxPhoto.TabStop = false;
+            // 
+            // ofdPhoto
+            // 
+            this.ofdPhoto.FileName = "openFileDialog1";
+            // 
+            // BsTkan
+            // 
+            this.BsTkan.DataMember = "Tkan";
+            this.BsTkan.DataSource = this.factoryLVSDataSet;
+            // 
+            // factoryLVSDataSet
+            // 
+            this.factoryLVSDataSet.DataSetName = "FactoryLVSDataSet";
+            this.factoryLVSDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
+            // 
+            // tkanTableAdapter
+            // 
+            this.tkanTableAdapter.ClearBeforeFill = true;
+            // 
+            // fKOrdersTkanBindingSource
+            // 
+            this.fKOrdersTkanBindingSource.DataMember = "FK_Orders_Tkan";
+            this.fKOrdersTkanBindingSource.DataSource = this.BsTkan;
+            // 
+            // ordersTableAdapter
+            // 
+            this.ordersTableAdapter.ClearBeforeFill = true;
+            // 
+            // namePhotoDataGridViewTextBoxColumn
+            // 
+            this.namePhotoDataGridViewTextBoxColumn.DataPropertyName = "NamePhoto";
+            this.namePhotoDataGridViewTextBoxColumn.HeaderText = "NamePhoto";
+            this.namePhotoDataGridViewTextBoxColumn.Name = "namePhotoDataGridViewTextBoxColumn";
+            this.namePhotoDataGridViewTextBoxColumn.ReadOnly = true;
+            this.namePhotoDataGridViewTextBoxColumn.Visible = false;
+            // 
+            // commentDataGridViewTextBoxColumn
+            // 
+            this.commentDataGridViewTextBoxColumn.DataPropertyName = "Comment";
+            this.commentDataGridViewTextBoxColumn.HeaderText = "Описание";
+            this.commentDataGridViewTextBoxColumn.Name = "commentDataGridViewTextBoxColumn";
+            this.commentDataGridViewTextBoxColumn.ReadOnly = true;
+            // 
+            // widthDataGridViewTextBoxColumn
+            // 
+            this.widthDataGridViewTextBoxColumn.DataPropertyName = "Width";
+            this.widthDataGridViewTextBoxColumn.HeaderText = "Ширина";
+            this.widthDataGridViewTextBoxColumn.Name = "widthDataGridViewTextBoxColumn";
+            this.widthDataGridViewTextBoxColumn.ReadOnly = true;
+            // 
+            // lengthDataGridViewTextBoxColumn
+            // 
+            this.lengthDataGridViewTextBoxColumn.DataPropertyName = "Length";
+            this.lengthDataGridViewTextBoxColumn.HeaderText = "Длина";
+            this.lengthDataGridViewTextBoxColumn.Name = "lengthDataGridViewTextBoxColumn";
+            this.lengthDataGridViewTextBoxColumn.ReadOnly = true;
+            // 
+            // idcolorDataGridViewTextBoxColumn
+            // 
+            this.idcolorDataGridViewTextBoxColumn.DataPropertyName = "id_color";
+            this.idcolorDataGridViewTextBoxColumn.HeaderText = "id_color";
+            this.idcolorDataGridViewTextBoxColumn.Name = "idcolorDataGridViewTextBoxColumn";
+            this.idcolorDataGridViewTextBoxColumn.ReadOnly = true;
+            this.idcolorDataGridViewTextBoxColumn.Visible = false;
+            // 
+            // titleDataGridViewTextBoxColumn
+            // 
+            this.titleDataGridViewTextBoxColumn.DataPropertyName = "Title";
+            this.titleDataGridViewTextBoxColumn.HeaderText = "Название";
+            this.titleDataGridViewTextBoxColumn.Name = "titleDataGridViewTextBoxColumn";
+            this.titleDataGridViewTextBoxColumn.ReadOnly = true;
+            // 
+            // idTkanDataGridViewTextBoxColumn
+            // 
+            this.idTkanDataGridViewTextBoxColumn.DataPropertyName = "id_Tkan";
+            this.idTkanDataGridViewTextBoxColumn.HeaderText = "id_Tkan";
+            this.idTkanDataGridViewTextBoxColumn.Name = "idTkanDataGridViewTextBoxColumn";
+            this.idTkanDataGridViewTextBoxColumn.ReadOnly = true;
+            this.idTkanDataGridViewTextBoxColumn.Visible = false;
+            // 
+            // tkanBindingSource
+            // 
+            this.tkanBindingSource.DataMember = "Tkan";
+            this.tkanBindingSource.DataSource = this.factoryLVSDataSet;
+            // 
+            // FormAddTovar
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(879, 608);
+            this.Controls.Add(this.btnClose);
+            this.Controls.Add(this.btnOk);
+            this.Controls.Add(this.tabControl1);
+            this.Controls.Add(this.panel1);
+            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
+            this.Name = "FormAddTovar";
+            this.Text = "СУБД \"Швейная фабрика\"";
+            this.Load += new System.EventHandler(this.FormAddTovar_Load);
+            this.tabControl1.ResumeLayout(false);
+            this.tabPage1.ResumeLayout(false);
+            this.tabPage1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvTkan)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pbxPhotoCloth)).EndInit();
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.pbxPhoto)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BsTkan)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.factoryLVSDataSet)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.fKOrdersTkanBindingSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.tkanBindingSource)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Button btnClose;
+        private System.Windows.Forms.Button btnOk;
+        private System.Windows.Forms.TabControl tabControl1;
+        private System.Windows.Forms.TabPage tabPage1;
+        private System.Windows.Forms.Button btnDelCloth;
+        private System.Windows.Forms.DataGridView dgvTkan;
+        private System.Windows.Forms.Button btnAddCloth;
+        private System.Windows.Forms.Button btnClearPhoto;
+        private System.Windows.Forms.Button btnLoadPhoto;
+        private System.Windows.Forms.PictureBox pbxPhotoCloth;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox tbxDescr;
+        private System.Windows.Forms.TextBox tbxColor;
+        private System.Windows.Forms.TextBox tbxLenght;
+        private System.Windows.Forms.TextBox tbxWidth;
+        private System.Windows.Forms.TextBox tbxTitle;
+        private System.Windows.Forms.TabPage tabPage2;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.PictureBox pbxPhoto;
+        private System.Windows.Forms.OpenFileDialog ofdPhoto;
+        private System.Windows.Forms.BindingSource BsTkan;
+        private FactoryLVSDataSet factoryLVSDataSet;
+        private FactoryLVSDataSetTableAdapters.TkanTableAdapter tkanTableAdapter;
+        private System.Windows.Forms.BindingSource fKOrdersTkanBindingSource;
+        private FactoryLVSDataSetTableAdapters.OrdersTableAdapter ordersTableAdapter;
+        private System.Windows.Forms.DataGridViewTextBoxColumn idTkanDataGridViewTextBoxColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn titleDataGridViewTextBoxColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn idcolorDataGridViewTextBoxColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn lengthDataGridViewTextBoxColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn widthDataGridViewTextBoxColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn commentDataGridViewTextBoxColumn;
+        private System.Windows.Forms.DataGridViewTextBoxColumn namePhotoDataGridViewTextBoxColumn;
+        private System.Windows.Forms.BindingSource tkanBindingSource;
+    }
+}

+ 139 - 0
FactoryLVS/FormAddTovar.cs

@@ -0,0 +1,139 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Data.SqlClient;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace FactoryLVS
+{
+    public partial class FormAddTovar : Form
+    {
+        public FormAddTovar()
+        {
+            InitializeComponent();
+        }
+        struct Cloth
+        {
+            public string Title, Color, Width, Length, Description;
+            public Image Photo;
+        }
+        List<Cloth> lstCloth = new List<Cloth>();
+
+        private void btnOk_Click(object sender, EventArgs e)
+        {
+            SqlConnection con = new SqlConnection(Form1.TxtCon);
+            for (int i = 0; i < lstCloth.Count; i++)
+            {
+                con.Open();
+                if (lstCloth[i].Photo != null)
+                {
+                    SqlCommand cmd = new SqlCommand($@"insert into Tkan(Title,id_color,width,length,Comment,NamePhoto)
+values('{lstCloth[i].Title}',{lstCloth[i].Color},{lstCloth[i].Width},{lstCloth[i].Length},'{lstCloth[i].Description}',@photo)", con);
+                    MemoryStream ms = new MemoryStream();
+                    lstCloth[i].Photo.Save(ms, ImageFormat.Png);
+                    cmd.Parameters.AddWithValue("@photo", ms.ToArray());
+                    cmd.ExecuteNonQuery();
+
+                }
+                else
+                {
+                    SqlCommand cmd = new SqlCommand($@"insert into Tkan(Title,id_color,width,length,Comment)
+values('{lstCloth[i].Title}',{lstCloth[i].Color},{lstCloth[i].Width},{lstCloth[i].Length},{lstCloth[i].Description})", con);
+
+
+                    cmd.ExecuteNonQuery();
+                }
+                con.Close();
+            }
+
+            MessageBox.Show("Документ принят к учету.", "Внимание!",
+                MessageBoxButtons.OK, MessageBoxIcon.Information);
+            this.Close();
+        }
+
+        private void btnLoadPhoto_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                if (ofdPhoto.ShowDialog() == DialogResult.OK)
+                {
+                    pbxPhotoCloth.Image = Image.FromFile(ofdPhoto.FileName);
+                }
+            }
+            catch
+            {
+
+            }
+        }
+
+        private void btnClearPhoto_Click(object sender, EventArgs e)
+        {
+            if (DialogResult.Yes == MessageBox.Show("Удалить фотографию?", "Внимание!", MessageBoxButtons.YesNo))
+                pbxPhotoCloth.Image = null;
+        }
+
+        private void btnAddCloth_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                if (tbxTitle.Text == "" || int.Parse(tbxLenght.Text) <= 0 || int.Parse(tbxWidth.Text) <= 0 || int.Parse(tbxColor.Text) < 0)
+                {
+                    MessageBox.Show("Все поля должны быть заполнены(Можно не заполнять поле описания) и больше нуля, цвет должен быть числом", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+            }
+            catch
+            {
+                MessageBox.Show("Все поля должны быть заполнены(Можно не заполнять поле описания) и больше нуля, цвет должен быть числом", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                return;
+            }
+            Cloth cl = new Cloth();
+            cl.Title = tbxTitle.Text;
+            cl.Color = tbxColor.Text;
+            cl.Width = tbxWidth.Text;
+            cl.Length = tbxLenght.Text;
+            cl.Photo = pbxPhotoCloth.Image;
+
+            lstCloth.Add(cl);
+            dgvTkan.Rows.Add(tbxTitle.Text, tbxColor.Text, tbxLenght.Text, tbxWidth.Text, tbxDescr.Text);
+        }
+
+        private void btnDelCloth_Click(object sender, EventArgs e)
+        {
+            int NumTkan = dgvTkan.CurrentRow.Index;
+
+            if (NumTkan >= 0)
+            {
+                DialogResult res = MessageBox.Show("Удалить выделенную ткань?",
+                    "Внимание!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+                if (res == DialogResult.Yes)
+                {
+
+                    lstCloth.RemoveAt(NumTkan);
+                    dgvTkan.Rows.RemoveAt(NumTkan);
+                }
+            }
+        }
+
+        private void btnClose_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+
+        private void FormAddTovar_Load(object sender, EventArgs e)
+        {
+            // TODO: This line of code loads data into the 'factoryLVSDataSet.Orders' table. You can move, or remove it, as needed.
+            this.ordersTableAdapter.Fill(this.factoryLVSDataSet.Orders);
+            // TODO: This line of code loads data into the 'factoryLVSDataSet.Tkan' table. You can move, or remove it, as needed.
+            this.tkanTableAdapter.Fill(this.factoryLVSDataSet.Tkan);
+
+        }
+    }
+}

+ 218 - 0
FactoryLVS/FormAddTovar.resx

@@ -0,0 +1,218 @@
+<?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>
+  <metadata name="tkanBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>873, 17</value>
+  </metadata>
+  <metadata name="factoryLVSDataSet.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>209, 17</value>
+  </metadata>
+  <metadata name="ofdPhoto.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="BsTkan.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>119, 17</value>
+  </metadata>
+  <metadata name="tkanTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>361, 17</value>
+  </metadata>
+  <metadata name="fKOrdersTkanBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>509, 17</value>
+  </metadata>
+  <metadata name="ordersTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>713, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAMMOAADDDgAAAAAAAAAA
+        AAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
+        /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
+        /wD///8A////AAAAAAB6ZasA////////////////////////////////////////////////////////
+        /////////////f////r////4////+P////b////2////9v////j////6/////f//////////////////
+        ///////////////////t+P4xAAAAAH1ts//p////uMj//6q2/f+cqfH/kZvm/4eN3P99hNL/dXrK/3By
+        wv9qbL3/Zma5/2Rjtf9iYbH/YF2t/15dq/9eW6f/XFml/1xXof9aVZ3/WlOa/1hRlv9WTZL/VEmM/1JF
+        hv9QP4D/Tjx4/z8nZ/9MM2j/6vP+//////8hAAD//B8A//9RAP//MAD//gYA/+wAAP//CAD/6wAA/8kA
+        AP/qAAD/4gAA/9wAAP/YAAD/1gAA/9QAAP/SAAD/0gAA/9AAAP/QAAD/zgAA/8wAAP/MAAD/ygAA/8gA
+        AP/EAAD/wgAA/8AAAP+9AAD/3gAA/zsAAP9UNmb//////y4AAP/9QgD//2QA//8uAP//bgD//3IA/84A
+        AP//KQD//2AA/80AAP/QAAD/zwAA/8sAAP/JAAD/xwAA/8UAAP/FAAD/wwAA/8MAAP/BAAD/wQAA/78A
+        AP+9AAD/uQAA/7cAAP+0AAD/sAAA/64AAP/KAAD/NgAA/1IzWP//////MgAD//LCW////3P/9MNY////
+        U////0n/wo45//7ANP//+jD/w4gi/8aLH//Fhhn/wYIV/79+Ef+9fA3/vXoJ/7t6Bv+7eAL/uXYA/7d0
+        AP+3cAD/tWwA/7NoAP+wZAD/rF8A/6hXAP+kTwD/oEcA/6hdAP8uAAD/XTpW//////9rDxv///+I////
+        qP///4X///97////cf///2r///9g////WP///1P///9N////R////0P///8/////PP///zj///80////
+        MP///yr///8m////IP///xr///8V////Df///wX///8A////AP///wD///8A//+IAP9nRXP/////QgAA
+        AErQjzT///+U////ff///23///9p////U////wX///9B////Sv///z7///84////Nf///zH///8r////
+        J////yP///80////AP///AD///8A///8AP//9wD///EA///mAP//9gD//70A//+kAP///wD/AAAA/0g6
+        agD///8AAAAAAAAAAAA9AADiPQAA8igAAOMTAADOJwAAqI1qbf8AAAC7AAAAsAAAAKkAAAChAAAAmwAA
+        AJUAAACNAAAAhwAAAH8AAACeEQAd/z0AgP8tAHL/LABq/ygAZP8kAFz/IwBa/wAAGf89AAD/TxoA/wAA
+        AKgAAAAASjxqAP///wAAAAAAAAAAAEMAAABAAAAALAAAABkAAAAAAAAA////AAAAAAAAAAAAAwAAAAAA
+        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAP//h1f//18n//9bI///Vx3//1MV//9cH///AAD//4J5
+        pf////9OAAAAAAAAAABMPmoA////AAAAAAAAAAAARwAAAEQAAAAyAAAAfo+lAEIbPfT////c////AP//
+        /wAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACcA1P+QX///bTX//2kv//9lKf//YCH//2Ym
+        //8HAP//b1Fg/////4f///8AAAAAAE5AaAD///8AAAAAAAAAAABLAAAAVwAAAE0AAACBlKMAVjJH////
+        ////////////AP///wD///8AAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAKgDG/55u//+JVv//gkz//35E
+        //97Q///eDz//wgA//92W2P/////h////wD///8A////AP///wB6AAAAcAAAAGcAAABbAAAAUQAAAFNr
+        hf9RJBb/UjhZ//////////9t////AP///wD///8ABQAAAAAAAAAAAAAAAAAAAAAAAAA6AOz/gk7//y4A
+        zv82AOb/MgDe/yQAvP9BAP//EwD//3hdY/////99////AP///wD///8A////AAkJFQAAAAwAAAACAAAA
+        AAAXAAD//+4A////AP+jLQD/p6dt//////////8A////AP///wD///8AAAAAAAAAAAAAAAAAAAAAAEcE
+        /f91Pv//AwA3/xEAYf8LAF7/AAAt/yMAtv8YAP//g2ln/////4L///8A////AP///wD///8ACwsRAAEB
+        CgAAAAAAAAAAXVwSjP+8grT/rHOk/4xDhf8OADz//////////9f///8A////AP///wD///8AAAAAAAAA
+        AAAAAAAAQADf/45V//9AAOX/RQD3/z8A9P8wANT/SwL//x0A//9XPVv///////////////8A////AP3/
+        /wBdB00AVQBEAEsAOgBBADD/38H//66G//+edP//sYv//0cA//+UgIz/////d////wD///8A////AP//
+        /wD///8AAAAAAAAAAABQEfP/hE7//x4Aev8pAJf/IwCU/xIAaf82AOD/NwD//xYAAP+BSgD/////////
+        /wD///8A////AFAVVABIC0sAPgFBADYAN//Pqf//0Kj//8ie///Dmv//TgL//8TCvP/////d////AP//
+        /wD///8A////AP///wD///8AAAAAABcAhP+jbv//Zyf//14Z//9ZD///Uwb//2gi//8IAP//4XMA/8ZF
+        AP+Jiqj/////AP///wD///8ATw9JAEcHQAA/ADYANQAs/+fE//+KWf//UACq/4lX//+BO///inZi////
+        /////////////f////v////0////7v///+f//5f4GACx/4tQ//84AKj/OgCu/zcArP8kAIH/SAD//xIA
+        ///NZQD/7H4A/5ORpP////8A////AP///wBlJoEAXh54AFYUbgBOCmT/iFz//9yZAP///wD/rmcN/4dU
+        //9zNv//Z0Vr/2xl3/9iVtv/YEC3/1sznP9XKYb/Zzxs/1Qehv+NTf//NAC0////GP///8T///+e////
+        f/9gJDD/AAD//85mAP/ldgD/lpWo/////wD///8A////AGowkwBiKYsAWx+CAFMXeP9pN////8wA////
+        Af/VigD/XC3//8Ca//+LQ///tDna/7VC4P+0ZP//tnv//7eM//+HTf//gj3//6pv//8lAHD///+L////
+        /////////////4FRRf8AAP//zmQA/+V0AP+Ukaj/////Cv///wD///8AWBtUAFITSwBKC0MAQgE5/+XC
+        //+IU///i0QP/39F///HoP//nX7//9iN////sAD//8oA////FP///9T///////////9pH///nWb//18c
+        //9fKS7/ek5t/3JAYv9fJSv/PQCm/wQA///JYgD/94gA/6Gkt/////8A////AP///wBRDkoASwZDAEUA
+        OwA9ADH/vYj//7SA//99RP//p27//5Vc//+MUf//iEz//4JI//9+Qv//fT7//3k4//91Mf//cSv//20p
+        //9nIP//cCr//zsA//8hAP//HQD//xIA//9DAP//AAD//8dSAP+OAAD/QC9W1////wD///8A////AFoZ
+        KABVEyAATwsYAEcDEf/Pr///waH9/7iW+P+yjur/qYXh/6eD2v+getr/k3Tr/49t5/+LYdn/h1rK/4NS
+        vf+BVbf/hViv/31Nqf96RqT/cjyi/2ozmP9iJ4//WRyF/1gXe/8RADf/IgAA/zQAAP8/K1YA////AP//
+        /wD///8AsXh9AKtydgClam4An2Vm////////////////////////////////////////////////////
+        //////////////////////////////////////////////////////////////////+TiZL/////Gv//
+        /wD///8A////AP///wAkCQAAHgMAABkAAAATAAD/////////////////////////////////////////
+        //////////////////////////////////////////////////////////////3u/P//////kGF7/wsA
+        AHT///8A////AP///wD///8A////ACgLAAAiBwAAHAEAABkAAAAzAABoIgAAx/bijv///9j/iGxF/2Q2
+        HWsAAABVEAAATgwAAEYIAABABAAAPAAAADgAAAA2AAAANAAAADQAAABRahYA//TgAP9cBwD/oKCb/wAA
+        AIUAAAAVCwAAAP///wD///8A////AP///wD///8ALA8EACYLAAAiBQAAHAEAADkAAAAnAAAAPy0N5aVz
+        S/9BBQAAaT0pAAAAAAAYAAAAFAAAABAAAAAMAAAABgAAAAAAAAAAAAAAAAAAAAAAAADmjQD///8s/9F7
+        AP//////AAAAAAAAAAALAAAA////AP///wD///8A////AP///wAwEwwALA8GACYLAAAiBQAAPQAAAC0A
+        AABHMhYAq3tWAEkNBwBxRzUABgAAACAAAAAcAAAAGAAAABQAAAAOAAAABgAAAAAAAAAAAAAAAAAAAN6K
+        AP///zT/x3IA/+X///////8A////AP///wD///8A////AP///wD///8A////ADQXEgAwEw4ALA8IACYL
+        BABDAAAAMwAAAE06IgCzg2AAURUSAHlPQQAOAAAAJwAAACQAAAAgAAAAGgAAABQAAAAOAAAAAAAAAAAA
+        AAAAAAAA04EA////Kv+6ZwD//////////wD///8A////AP///wD///8A////AP///wD///8AOBsYADQX
+        FAAwExAALBEMAEkAAAA5AAAAU0IsALmLbABXHR4Af1lMABYAAAAvAAAAKwAAACcAAAAiAAAAHAAAAAAA
+        AAAAAAAAAAAAAAAAAAACAAD/FwAA/y0AAP////8A////AP///wD///8A////AP///wD///8A////AP//
+        /wA6HR4AOBsaADQZGAAwFRQATQAAAD0AAABYSDUAv5N1AFwlKACHYVgAHAAAADcAAAAzAAAALQAAACkA
+        AAAiAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/AAAAAAAAAAD///8A////AP///wD///8A////AP//
+        /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
+        /wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP//
+        /wD///8A////AP///wD///8A/////8AAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPAAAAH///AD/z/
+        wA/8f8AP+D/AD/A/wA/gH8AH4B/AB+AfwAfgAAAH4AAAB+AAAAPgAAAH4AAAB+AAAA/gAAAP4AAAH/AA
+        AD/8//D////w////8P////H////7//////8=
+</value>
+  </data>
+</root>

+ 224 - 27
FactoryLVS/FormKladovschik.Designer.cs

@@ -34,18 +34,42 @@
             this.factoryLVSDataSet = new FactoryLVS.FactoryLVSDataSet();
             this.usersTableAdapter = new FactoryLVS.FactoryLVSDataSetTableAdapters.UsersTableAdapter();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.LblIdKlad = new System.Windows.Forms.Label();
             this.LblIdUser = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.NameLabel = new System.Windows.Forms.Label();
             this.FamLabel = new System.Windows.Forms.Label();
             this.OtchLabel = new System.Windows.Forms.Label();
-            this.LblIdKlad = new System.Windows.Forms.Label();
             this.BtnProfile = new System.Windows.Forms.Button();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.btnDoc = new System.Windows.Forms.Button();
+            this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.tabPage1 = new System.Windows.Forms.TabPage();
+            this.dgvOrders = new System.Windows.Forms.DataGridView();
+            this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.tabPage2 = new System.Windows.Forms.TabPage();
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            this.tabPage3 = new System.Windows.Forms.TabPage();
+            this.dataGridView2 = new System.Windows.Forms.DataGridView();
+            this.BsTkan = new System.Windows.Forms.BindingSource(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.BsUsers)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.factoryLVSDataSet)).BeginInit();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            this.tabControl1.SuspendLayout();
+            this.tabPage1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvOrders)).BeginInit();
+            this.tabPage2.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            this.tabPage3.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BsTkan)).BeginInit();
             this.SuspendLayout();
             // 
             // BsUsers
@@ -76,9 +100,20 @@
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(800, 106);
+            this.panel1.Size = new System.Drawing.Size(803, 106);
             this.panel1.TabIndex = 15;
             // 
+            // LblIdKlad
+            // 
+            this.LblIdKlad.AutoSize = true;
+            this.LblIdKlad.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.BsUsers, "id_User", true));
+            this.LblIdKlad.Location = new System.Drawing.Point(638, 77);
+            this.LblIdKlad.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.LblIdKlad.Name = "LblIdKlad";
+            this.LblIdKlad.Size = new System.Drawing.Size(51, 13);
+            this.LblIdKlad.TabIndex = 19;
+            this.LblIdKlad.Text = "LblIdKlad";
+            // 
             // LblIdUser
             // 
             this.LblIdUser.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.BsUsers, "id_User", true));
@@ -100,18 +135,6 @@
             this.label1.TabIndex = 1;
             this.label1.Text = "Рабочее место кладовщика";
             // 
-            // pictureBox1
-            // 
-            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.pictureBox1.Image = global::FactoryLVS.Properties.Resources.fabric_logo;
-            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(100, 106);
-            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
-            // 
             // NameLabel
             // 
             this.NameLabel.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.BsUsers, "Name", true));
@@ -142,17 +165,6 @@
             this.OtchLabel.TabIndex = 17;
             this.OtchLabel.Text = "label2";
             // 
-            // LblIdKlad
-            // 
-            this.LblIdKlad.AutoSize = true;
-            this.LblIdKlad.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.BsUsers, "id_User", true));
-            this.LblIdKlad.Location = new System.Drawing.Point(638, 77);
-            this.LblIdKlad.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
-            this.LblIdKlad.Name = "LblIdKlad";
-            this.LblIdKlad.Size = new System.Drawing.Size(51, 13);
-            this.LblIdKlad.TabIndex = 19;
-            this.LblIdKlad.Text = "LblIdKlad";
-            // 
             // BtnProfile
             // 
             this.BtnProfile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
@@ -165,11 +177,172 @@
             this.BtnProfile.UseVisualStyleBackColor = false;
             this.BtnProfile.Click += new System.EventHandler(this.BtnProfile_Click);
             // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
+            this.pictureBox1.Image = global::FactoryLVS.Properties.Resources.fabric_logo;
+            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(100, 106);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
+            // 
+            // btnDoc
+            // 
+            this.btnDoc.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.btnDoc.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.btnDoc.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnDoc.Location = new System.Drawing.Point(4, 116);
+            this.btnDoc.Margin = new System.Windows.Forms.Padding(11, 8, 11, 8);
+            this.btnDoc.Name = "btnDoc";
+            this.btnDoc.Size = new System.Drawing.Size(191, 24);
+            this.btnDoc.TabIndex = 34;
+            this.btnDoc.Text = "Принять товар";
+            this.btnDoc.UseVisualStyleBackColor = false;
+            this.btnDoc.Click += new System.EventHandler(this.btnDoc_Click);
+            // 
+            // tabControl1
+            // 
+            this.tabControl1.Controls.Add(this.tabPage1);
+            this.tabControl1.Controls.Add(this.tabPage2);
+            this.tabControl1.Controls.Add(this.tabPage3);
+            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.tabControl1.Location = new System.Drawing.Point(0, 154);
+            this.tabControl1.Margin = new System.Windows.Forms.Padding(2);
+            this.tabControl1.Name = "tabControl1";
+            this.tabControl1.SelectedIndex = 0;
+            this.tabControl1.Size = new System.Drawing.Size(803, 366);
+            this.tabControl1.TabIndex = 35;
+            // 
+            // tabPage1
+            // 
+            this.tabPage1.Controls.Add(this.dgvOrders);
+            this.tabPage1.Location = new System.Drawing.Point(4, 22);
+            this.tabPage1.Margin = new System.Windows.Forms.Padding(2);
+            this.tabPage1.Name = "tabPage1";
+            this.tabPage1.Padding = new System.Windows.Forms.Padding(2);
+            this.tabPage1.Size = new System.Drawing.Size(795, 340);
+            this.tabPage1.TabIndex = 0;
+            this.tabPage1.Text = "Заказы";
+            this.tabPage1.UseVisualStyleBackColor = true;
+            // 
+            // dgvOrders
+            // 
+            this.dgvOrders.AllowUserToAddRows = false;
+            this.dgvOrders.AllowUserToDeleteRows = false;
+            this.dgvOrders.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvOrders.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.Column1,
+            this.Column2,
+            this.Column3,
+            this.Column4,
+            this.Column5,
+            this.Column6,
+            this.Column7});
+            this.dgvOrders.Location = new System.Drawing.Point(12, 13);
+            this.dgvOrders.Name = "dgvOrders";
+            this.dgvOrders.ReadOnly = true;
+            this.dgvOrders.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvOrders.Size = new System.Drawing.Size(752, 306);
+            this.dgvOrders.TabIndex = 9;
+            // 
+            // Column1
+            // 
+            this.Column1.HeaderText = "Изделие";
+            this.Column1.Name = "Column1";
+            this.Column1.ReadOnly = true;
+            // 
+            // Column2
+            // 
+            this.Column2.HeaderText = "Кол-во изделий";
+            this.Column2.Name = "Column2";
+            this.Column2.ReadOnly = true;
+            // 
+            // Column3
+            // 
+            this.Column3.HeaderText = "Ткань";
+            this.Column3.Name = "Column3";
+            this.Column3.ReadOnly = true;
+            // 
+            // Column4
+            // 
+            this.Column4.HeaderText = "Фурнитура";
+            this.Column4.Name = "Column4";
+            this.Column4.ReadOnly = true;
+            // 
+            // Column5
+            // 
+            this.Column5.HeaderText = "Кол-во фурнитуры";
+            this.Column5.Name = "Column5";
+            this.Column5.ReadOnly = true;
+            // 
+            // Column6
+            // 
+            this.Column6.HeaderText = "Менеджер";
+            this.Column6.Name = "Column6";
+            this.Column6.ReadOnly = true;
+            // 
+            // Column7
+            // 
+            this.Column7.HeaderText = "Заказчик";
+            this.Column7.Name = "Column7";
+            this.Column7.ReadOnly = true;
+            // 
+            // tabPage2
+            // 
+            this.tabPage2.Controls.Add(this.dataGridView1);
+            this.tabPage2.Location = new System.Drawing.Point(4, 22);
+            this.tabPage2.Margin = new System.Windows.Forms.Padding(2);
+            this.tabPage2.Name = "tabPage2";
+            this.tabPage2.Padding = new System.Windows.Forms.Padding(2);
+            this.tabPage2.Size = new System.Drawing.Size(795, 340);
+            this.tabPage2.TabIndex = 1;
+            this.tabPage2.Text = "Ткани";
+            this.tabPage2.UseVisualStyleBackColor = true;
+            // 
+            // dataGridView1
+            // 
+            this.dataGridView1.AllowUserToAddRows = false;
+            this.dataGridView1.AllowUserToDeleteRows = false;
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView1.Location = new System.Drawing.Point(8, 5);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.ReadOnly = true;
+            this.dataGridView1.Size = new System.Drawing.Size(937, 331);
+            this.dataGridView1.TabIndex = 0;
+            // 
+            // tabPage3
+            // 
+            this.tabPage3.Controls.Add(this.dataGridView2);
+            this.tabPage3.Location = new System.Drawing.Point(4, 22);
+            this.tabPage3.Margin = new System.Windows.Forms.Padding(2);
+            this.tabPage3.Name = "tabPage3";
+            this.tabPage3.Padding = new System.Windows.Forms.Padding(2);
+            this.tabPage3.Size = new System.Drawing.Size(795, 340);
+            this.tabPage3.TabIndex = 2;
+            this.tabPage3.Text = "Фурнитура";
+            this.tabPage3.UseVisualStyleBackColor = true;
+            // 
+            // dataGridView2
+            // 
+            this.dataGridView2.AllowUserToAddRows = false;
+            this.dataGridView2.AllowUserToDeleteRows = false;
+            this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dataGridView2.Location = new System.Drawing.Point(8, 5);
+            this.dataGridView2.Name = "dataGridView2";
+            this.dataGridView2.ReadOnly = true;
+            this.dataGridView2.Size = new System.Drawing.Size(937, 331);
+            this.dataGridView2.TabIndex = 0;
+            // 
             // FormKladovschik
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(800, 450);
+            this.ClientSize = new System.Drawing.Size(803, 520);
+            this.Controls.Add(this.btnDoc);
+            this.Controls.Add(this.tabControl1);
             this.Controls.Add(this.BtnProfile);
             this.Controls.Add(this.panel1);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
@@ -181,6 +354,14 @@
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            this.tabControl1.ResumeLayout(false);
+            this.tabPage1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dgvOrders)).EndInit();
+            this.tabPage2.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            this.tabPage3.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.BsTkan)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -199,5 +380,21 @@
         private System.Windows.Forms.Label OtchLabel;
         private System.Windows.Forms.Label LblIdKlad;
         private System.Windows.Forms.Button BtnProfile;
+        private System.Windows.Forms.Button btnDoc;
+        private System.Windows.Forms.TabControl tabControl1;
+        private System.Windows.Forms.TabPage tabPage1;
+        private System.Windows.Forms.DataGridView dgvOrders;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
+        private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
+        private System.Windows.Forms.TabPage tabPage2;
+        private System.Windows.Forms.DataGridView dataGridView1;
+        private System.Windows.Forms.TabPage tabPage3;
+        private System.Windows.Forms.DataGridView dataGridView2;
+        private System.Windows.Forms.BindingSource BsTkan;
     }
 }

+ 8 - 0
FactoryLVS/FormKladovschik.cs

@@ -31,5 +31,13 @@ namespace FactoryLVS
             frm.ShowDialog();
             this.Show();
         }
+
+        private void btnDoc_Click(object sender, EventArgs e)
+        {
+            FormAddTovar frm = new FormAddTovar();
+            this.Hide();
+            frm.ShowDialog();
+            this.Show();
+        }
     }
 }

+ 24 - 0
FactoryLVS/FormKladovschik.resx

@@ -126,6 +126,30 @@
   <metadata name="usersTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>263, 17</value>
   </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>
+  <metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="BsTkan.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>416, 17</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

+ 38 - 34
FactoryLVS/FormManager.Designer.cs

@@ -39,7 +39,6 @@
             this.panel1 = new System.Windows.Forms.Panel();
             this.LblIdManager = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.btnDrop = new System.Windows.Forms.Button();
             this.label3 = new System.Windows.Forms.Label();
             this.tbxWidth = new System.Windows.Forms.TextBox();
@@ -49,21 +48,22 @@
             this.tbxTitle = new System.Windows.Forms.TextBox();
             this.btnAdd = new System.Windows.Forms.Button();
             this.dgvProducts = new System.Windows.Forms.DataGridView();
-            this.izdelieBindingSource = new System.Windows.Forms.BindingSource(this.components);
-            this.izdelieTableAdapter = new FactoryLVS.FactoryLVSDataSetTableAdapters.IzdelieTableAdapter();
-            this.izdelieBindingSource1 = new System.Windows.Forms.BindingSource(this.components);
             this.idizdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.nameizdDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.lengthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.widthDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.izdelieBindingSource1 = new System.Windows.Forms.BindingSource(this.components);
+            this.izdelieBindingSource = new System.Windows.Forms.BindingSource(this.components);
+            this.izdelieTableAdapter = new FactoryLVS.FactoryLVSDataSetTableAdapters.IzdelieTableAdapter();
             this.BtnProfile = new System.Windows.Forms.Button();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             ((System.ComponentModel.ISupportInitialize)(this.BsUsers)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.factoryLVSDataSet)).BeginInit();
             this.panel1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.izdelieBindingSource)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.izdelieBindingSource1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.izdelieBindingSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             this.SuspendLayout();
             // 
             // BsUsers
@@ -130,7 +130,7 @@
             // 
             this.LblIdManager.AutoSize = true;
             this.LblIdManager.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.BsUsers, "id_User", true));
-            this.LblIdManager.Location = new System.Drawing.Point(603, 73);
+            this.LblIdManager.Location = new System.Drawing.Point(600, 64);
             this.LblIdManager.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
             this.LblIdManager.Name = "LblIdManager";
             this.LblIdManager.Size = new System.Drawing.Size(72, 13);
@@ -147,18 +147,6 @@
             this.label1.TabIndex = 1;
             this.label1.Text = "Рабочее место менеджера";
             // 
-            // pictureBox1
-            // 
-            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
-            this.pictureBox1.Image = global::FactoryLVS.Properties.Resources.fabric_logo;
-            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(100, 106);
-            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
-            // 
             // btnDrop
             // 
             this.btnDrop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -171,6 +159,7 @@
             this.btnDrop.TabIndex = 31;
             this.btnDrop.Text = "Сброс выделения";
             this.btnDrop.UseVisualStyleBackColor = false;
+            this.btnDrop.Click += new System.EventHandler(this.btnDrop_Click);
             // 
             // label3
             // 
@@ -232,6 +221,7 @@
             this.btnAdd.TabIndex = 24;
             this.btnAdd.Text = "Добавить изделие";
             this.btnAdd.UseVisualStyleBackColor = false;
+            this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
             // 
             // dgvProducts
             // 
@@ -248,21 +238,10 @@
             this.dgvProducts.Location = new System.Drawing.Point(12, 111);
             this.dgvProducts.Name = "dgvProducts";
             this.dgvProducts.ReadOnly = true;
+            this.dgvProducts.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.dgvProducts.Size = new System.Drawing.Size(594, 389);
             this.dgvProducts.TabIndex = 23;
-            // 
-            // izdelieBindingSource
-            // 
-            this.izdelieBindingSource.DataSource = this.BsUsers;
-            // 
-            // izdelieTableAdapter
-            // 
-            this.izdelieTableAdapter.ClearBeforeFill = true;
-            // 
-            // izdelieBindingSource1
-            // 
-            this.izdelieBindingSource1.DataMember = "Izdelie";
-            this.izdelieBindingSource1.DataSource = this.factoryLVSDataSet;
+            this.dgvProducts.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProducts_CellClick);
             // 
             // idizdDataGridViewTextBoxColumn
             // 
@@ -294,6 +273,19 @@
             this.widthDataGridViewTextBoxColumn.Name = "widthDataGridViewTextBoxColumn";
             this.widthDataGridViewTextBoxColumn.ReadOnly = true;
             // 
+            // izdelieBindingSource1
+            // 
+            this.izdelieBindingSource1.DataMember = "Izdelie";
+            this.izdelieBindingSource1.DataSource = this.factoryLVSDataSet;
+            // 
+            // izdelieBindingSource
+            // 
+            this.izdelieBindingSource.DataSource = this.BsUsers;
+            // 
+            // izdelieTableAdapter
+            // 
+            this.izdelieTableAdapter.ClearBeforeFill = true;
+            // 
             // BtnProfile
             // 
             this.BtnProfile.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
@@ -306,6 +298,18 @@
             this.BtnProfile.UseVisualStyleBackColor = false;
             this.BtnProfile.Click += new System.EventHandler(this.BtnProfile_Click_1);
             // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
+            this.pictureBox1.Image = global::FactoryLVS.Properties.Resources.fabric_logo;
+            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(100, 106);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
+            // 
             // FormManager
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -333,10 +337,10 @@
             ((System.ComponentModel.ISupportInitialize)(this.factoryLVSDataSet)).EndInit();
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.dgvProducts)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.izdelieBindingSource)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.izdelieBindingSource1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.izdelieBindingSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 

+ 61 - 0
FactoryLVS/FormManager.cs

@@ -39,5 +39,66 @@ namespace FactoryLVS
             frm.ShowDialog();
             this.Show();
         }
+
+        private void btnAdd_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                if (tbxTitle.Text == "" || int.Parse(tbxLenght.Text) <= 0 || int.Parse(tbxWidth.Text) <= 0)
+                {
+                    MessageBox.Show("Все поля должны быть заполнены и больше нуля", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+            }
+            catch
+            {
+                MessageBox.Show("Все поля должны быть заполнены и больше нуля", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                return;
+            }
+
+            SqlConnection con = new SqlConnection(Form1.TxtCon);
+            con.Open();
+            if (btnAdd.Text == "Сохранить" && Pos != -1)
+            {
+                SqlCommand cmdManager = new SqlCommand($@"update Izdelie
+set name_izd = '{tbxTitle.Text}',length={tbxLenght.Text},width={tbxWidth.Text}
+where id_izd = {Pos}", con);
+                cmdManager.ExecuteNonQuery();
+                con.Close();
+
+                MessageBox.Show("Изделие отредактировано", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+            else if (btnAdd.Text == "Добавить")
+            {
+                SqlCommand cmdManager = new SqlCommand($@"Insert into Izdelie(name_izd,length,width)
+values('{tbxTitle.Text}',{tbxLenght.Text},{tbxWidth.Text})", con);
+                cmdManager.ExecuteNonQuery();
+                con.Close();
+
+                MessageBox.Show("Изделие добавлено", "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+
+            this.izdelieTableAdapter.Fill(this.factoryLVSDataSet.Izdelie);
+            dgvProducts.Update();
+        }
+
+        public static int Pos = -1;
+        private void btnDrop_Click(object sender, EventArgs e)
+        {
+            Pos = -1;
+            btnAdd.Text = "Добавить";
+            tbxTitle.Text = "";
+            tbxLenght.Text = "";
+            tbxWidth.Text = "";
+        }
+
+        private void dgvProducts_CellClick(object sender, DataGridViewCellEventArgs e)
+        {
+            btnAdd.Text = "Сохранить";
+            Pos = int.Parse(dgvProducts.CurrentRow.Cells[0].Value.ToString());
+            tbxTitle.Text = dgvProducts.CurrentRow.Cells[1].Value.ToString();
+            tbxLenght.Text = dgvProducts.CurrentRow.Cells[2].Value.ToString();
+            tbxWidth.Text = dgvProducts.CurrentRow.Cells[3].Value.ToString();
+        }
     }
 }