Your Name 2 tahun lalu
induk
melakukan
9df592036c
6 mengubah file dengan 269 tambahan dan 33 penghapusan
  1. 15 14
      FormKlad.Designer.cs
  2. 180 19
      FormMen.Designer.cs
  3. 14 0
      FormMen.cs
  4. 9 0
      FormMen.resx
  5. 42 0
      FormSpisMaterial.cs
  6. 9 0
      СУБД Фабрика.csproj

+ 15 - 14
FormKlad.Designer.cs

@@ -37,11 +37,11 @@
             this.LblName = new System.Windows.Forms.Label();
             this.LblFam = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.usersTableAdapter = new СУБД_Фабрика.SewingFactoryMURDataSetTableAdapters.UsersTableAdapter();
             this.BtnProfile = new System.Windows.Forms.Button();
             this.BtnGetMaterial = new System.Windows.Forms.Button();
             this.button1 = new System.Windows.Forms.Button();
-            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.panel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.BsUsers)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.sewingFactoryMURDataSet1)).BeginInit();
@@ -118,6 +118,18 @@
             this.label1.TabIndex = 1;
             this.label1.Text = "Кладовщик";
             // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Right;
+            this.pictureBox1.Image = global::СУБД_Фабрика.Properties.Resources.fabric_logo;
+            this.pictureBox1.Location = new System.Drawing.Point(532, 0);
+            this.pictureBox1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(106, 102);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox1.TabIndex = 0;
+            this.pictureBox1.TabStop = false;
+            // 
             // usersTableAdapter
             // 
             this.usersTableAdapter.ClearBeforeFill = true;
@@ -155,24 +167,12 @@
             this.button1.UseVisualStyleBackColor = false;
             this.button1.Click += new System.EventHandler(this.button1_Click);
             // 
-            // pictureBox1
-            // 
-            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Right;
-            this.pictureBox1.Image = global::СУБД_Фабрика.Properties.Resources.fabric_logo;
-            this.pictureBox1.Location = new System.Drawing.Point(532, 0);
-            this.pictureBox1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
-            this.pictureBox1.Name = "pictureBox1";
-            this.pictureBox1.Size = new System.Drawing.Size(106, 102);
-            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
-            this.pictureBox1.TabIndex = 0;
-            this.pictureBox1.TabStop = false;
-            // 
             // FormKlad
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
-            this.ClientSize = new System.Drawing.Size(638, 440);
+            this.ClientSize = new System.Drawing.Size(638, 204);
             this.Controls.Add(this.button1);
             this.Controls.Add(this.BtnGetMaterial);
             this.Controls.Add(this.BtnProfile);
@@ -180,6 +180,7 @@
             this.Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.MinimumSize = new System.Drawing.Size(654, 243);
             this.Name = "FormKlad";
             this.Text = "СУБД \"Швейная фабрика\"";
             this.Load += new System.EventHandler(this.FormKlad_Load);

+ 180 - 19
FormMen.Designer.cs

@@ -29,21 +29,38 @@
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMen));
             this.panel1 = new System.Windows.Forms.Panel();
             this.LblOtch = new System.Windows.Forms.Label();
+            this.BsUsers = new System.Windows.Forms.BindingSource(this.components);
+            this.sewingFactoryMURDataSet1 = new СУБД_Фабрика.SewingFactoryMURDataSet();
             this.LblName = new System.Windows.Forms.Label();
             this.LblFam = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.pictureBox1 = new System.Windows.Forms.PictureBox();
-            this.sewingFactoryMURDataSet1 = new СУБД_Фабрика.SewingFactoryMURDataSet();
-            this.BsUsers = new System.Windows.Forms.BindingSource(this.components);
             this.usersTableAdapter = new СУБД_Фабрика.SewingFactoryMURDataSetTableAdapters.UsersTableAdapter();
             this.BtnProfile = new System.Windows.Forms.Button();
+            this.izdeliaBindingSource = new System.Windows.Forms.BindingSource(this.components);
+            this.izdeliaTableAdapter = new СУБД_Фабрика.SewingFactoryMURDataSetTableAdapters.IzdeliaTableAdapter();
+            this.tableAdapterManager = new СУБД_Фабрика.SewingFactoryMURDataSetTableAdapters.TableAdapterManager();
+            this.izdeliaDataGridView = new System.Windows.Forms.DataGridView();
+            this.BtnSave = new System.Windows.Forms.Button();
+            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.RbtWord = new System.Windows.Forms.RadioButton();
+            this.RbtCsV = new System.Windows.Forms.RadioButton();
+            this.BtnAll = new System.Windows.Forms.Button();
+            this.BtnSelected = new System.Windows.Forms.Button();
             this.panel1.SuspendLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.sewingFactoryMURDataSet1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.BsUsers)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.sewingFactoryMURDataSet1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.izdeliaBindingSource)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.izdeliaDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
             // panel1
@@ -59,7 +76,7 @@
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(531, 102);
+            this.panel1.Size = new System.Drawing.Size(448, 102);
             this.panel1.TabIndex = 4;
             // 
             // LblOtch
@@ -73,6 +90,16 @@
             this.LblOtch.TabIndex = 4;
             this.LblOtch.Text = "Otch";
             // 
+            // BsUsers
+            // 
+            this.BsUsers.DataMember = "Users";
+            this.BsUsers.DataSource = this.sewingFactoryMURDataSet1;
+            // 
+            // sewingFactoryMURDataSet1
+            // 
+            this.sewingFactoryMURDataSet1.DataSetName = "SewingFactoryMURDataSet";
+            this.sewingFactoryMURDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
+            // 
             // LblName
             // 
             this.LblName.AutoSize = true;
@@ -110,7 +137,7 @@
             // 
             this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Right;
             this.pictureBox1.Image = global::СУБД_Фабрика.Properties.Resources.fabric_logo;
-            this.pictureBox1.Location = new System.Drawing.Point(425, 0);
+            this.pictureBox1.Location = new System.Drawing.Point(342, 0);
             this.pictureBox1.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6);
             this.pictureBox1.Name = "pictureBox1";
             this.pictureBox1.Size = new System.Drawing.Size(106, 102);
@@ -118,16 +145,6 @@
             this.pictureBox1.TabIndex = 0;
             this.pictureBox1.TabStop = false;
             // 
-            // sewingFactoryMURDataSet1
-            // 
-            this.sewingFactoryMURDataSet1.DataSetName = "SewingFactoryMURDataSet";
-            this.sewingFactoryMURDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
-            // 
-            // BsUsers
-            // 
-            this.BsUsers.DataMember = "Users";
-            this.BsUsers.DataSource = this.sewingFactoryMURDataSet1;
-            // 
             // usersTableAdapter
             // 
             this.usersTableAdapter.ClearBeforeFill = true;
@@ -143,12 +160,140 @@
             this.BtnProfile.UseVisualStyleBackColor = false;
             this.BtnProfile.Click += new System.EventHandler(this.BtnProfile_Click);
             // 
+            // izdeliaBindingSource
+            // 
+            this.izdeliaBindingSource.DataMember = "Izdelia";
+            this.izdeliaBindingSource.DataSource = this.sewingFactoryMURDataSet1;
+            // 
+            // izdeliaTableAdapter
+            // 
+            this.izdeliaTableAdapter.ClearBeforeFill = true;
+            // 
+            // tableAdapterManager
+            // 
+            this.tableAdapterManager.BackupDataSetBeforeUpdate = false;
+            this.tableAdapterManager.ClothTableAdapter = null;
+            this.tableAdapterManager.FurnituraTableAdapter = null;
+            this.tableAdapterManager.IzdeliaTableAdapter = this.izdeliaTableAdapter;
+            this.tableAdapterManager.OrdersTableAdapter = null;
+            this.tableAdapterManager.RolesTableAdapter = null;
+            this.tableAdapterManager.UpdateOrder = СУБД_Фабрика.SewingFactoryMURDataSetTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
+            this.tableAdapterManager.UsersTableAdapter = this.usersTableAdapter;
+            // 
+            // izdeliaDataGridView
+            // 
+            this.izdeliaDataGridView.AllowUserToResizeColumns = false;
+            this.izdeliaDataGridView.AutoGenerateColumns = false;
+            this.izdeliaDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.izdeliaDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+            this.dataGridViewTextBoxColumn1,
+            this.dataGridViewTextBoxColumn2,
+            this.dataGridViewTextBoxColumn3,
+            this.dataGridViewTextBoxColumn4});
+            this.izdeliaDataGridView.DataSource = this.izdeliaBindingSource;
+            this.izdeliaDataGridView.Location = new System.Drawing.Point(47, 165);
+            this.izdeliaDataGridView.Name = "izdeliaDataGridView";
+            this.izdeliaDataGridView.Size = new System.Drawing.Size(349, 273);
+            this.izdeliaDataGridView.TabIndex = 20;
+            // 
+            // BtnSave
+            // 
+            this.BtnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.BtnSave.Location = new System.Drawing.Point(270, 111);
+            this.BtnSave.Name = "BtnSave";
+            this.BtnSave.Size = new System.Drawing.Size(166, 31);
+            this.BtnSave.TabIndex = 21;
+            this.BtnSave.Text = "Сохранить изменения";
+            this.BtnSave.UseVisualStyleBackColor = false;
+            this.BtnSave.Click += new System.EventHandler(this.BtnSave_Click);
+            // 
+            // dataGridViewTextBoxColumn1
+            // 
+            this.dataGridViewTextBoxColumn1.DataPropertyName = "IDIzd";
+            this.dataGridViewTextBoxColumn1.HeaderText = "IDIzd";
+            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
+            this.dataGridViewTextBoxColumn1.ReadOnly = true;
+            this.dataGridViewTextBoxColumn1.Visible = false;
+            // 
+            // dataGridViewTextBoxColumn2
+            // 
+            this.dataGridViewTextBoxColumn2.DataPropertyName = "Title";
+            this.dataGridViewTextBoxColumn2.HeaderText = "Название";
+            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
+            // 
+            // dataGridViewTextBoxColumn3
+            // 
+            this.dataGridViewTextBoxColumn3.DataPropertyName = "Lenght";
+            dataGridViewCellStyle1.Format = "N2";
+            dataGridViewCellStyle1.NullValue = null;
+            this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle1;
+            this.dataGridViewTextBoxColumn3.HeaderText = "Длина";
+            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
+            // 
+            // dataGridViewTextBoxColumn4
+            // 
+            this.dataGridViewTextBoxColumn4.DataPropertyName = "Width";
+            dataGridViewCellStyle2.Format = "N2";
+            dataGridViewCellStyle2.NullValue = null;
+            this.dataGridViewTextBoxColumn4.DefaultCellStyle = dataGridViewCellStyle2;
+            this.dataGridViewTextBoxColumn4.HeaderText = "Ширина";
+            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
+            // 
+            // RbtWord
+            // 
+            this.RbtWord.AutoSize = true;
+            this.RbtWord.Checked = true;
+            this.RbtWord.Location = new System.Drawing.Point(88, 459);
+            this.RbtWord.Name = "RbtWord";
+            this.RbtWord.Size = new System.Drawing.Size(72, 24);
+            this.RbtWord.TabIndex = 22;
+            this.RbtWord.TabStop = true;
+            this.RbtWord.Text = "В Word";
+            this.RbtWord.UseVisualStyleBackColor = true;
+            // 
+            // RbtCsV
+            // 
+            this.RbtCsV.AutoSize = true;
+            this.RbtCsV.Location = new System.Drawing.Point(270, 459);
+            this.RbtCsV.Name = "RbtCsV";
+            this.RbtCsV.Size = new System.Drawing.Size(63, 24);
+            this.RbtCsV.TabIndex = 23;
+            this.RbtCsV.Text = "В Csv";
+            this.RbtCsV.UseVisualStyleBackColor = true;
+            // 
+            // BtnAll
+            // 
+            this.BtnAll.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.BtnAll.Location = new System.Drawing.Point(25, 499);
+            this.BtnAll.Name = "BtnAll";
+            this.BtnAll.Size = new System.Drawing.Size(148, 31);
+            this.BtnAll.TabIndex = 24;
+            this.BtnAll.Text = "Экспорт всех";
+            this.BtnAll.UseVisualStyleBackColor = false;
+            this.BtnAll.Click += new System.EventHandler(this.BtnAll_Click);
+            // 
+            // BtnSelected
+            // 
+            this.BtnSelected.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(156)))), ((int)(((byte)(26)))));
+            this.BtnSelected.Location = new System.Drawing.Point(270, 499);
+            this.BtnSelected.Name = "BtnSelected";
+            this.BtnSelected.Size = new System.Drawing.Size(151, 31);
+            this.BtnSelected.TabIndex = 25;
+            this.BtnSelected.Text = "Экспорт выделенных";
+            this.BtnSelected.UseVisualStyleBackColor = false;
+            // 
             // FormMen
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.White;
-            this.ClientSize = new System.Drawing.Size(531, 423);
+            this.ClientSize = new System.Drawing.Size(448, 578);
+            this.Controls.Add(this.BtnSelected);
+            this.Controls.Add(this.BtnAll);
+            this.Controls.Add(this.RbtCsV);
+            this.Controls.Add(this.RbtWord);
+            this.Controls.Add(this.BtnSave);
+            this.Controls.Add(this.izdeliaDataGridView);
             this.Controls.Add(this.BtnProfile);
             this.Controls.Add(this.panel1);
             this.Font = new System.Drawing.Font("Arial Narrow", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
@@ -159,10 +304,13 @@
             this.Load += new System.EventHandler(this.FormMen_Load);
             this.panel1.ResumeLayout(false);
             this.panel1.PerformLayout();
-            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.sewingFactoryMURDataSet1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.BsUsers)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.sewingFactoryMURDataSet1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.izdeliaBindingSource)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.izdeliaDataGridView)).EndInit();
             this.ResumeLayout(false);
+            this.PerformLayout();
 
         }
 
@@ -178,5 +326,18 @@
         private System.Windows.Forms.BindingSource BsUsers;
         private SewingFactoryMURDataSetTableAdapters.UsersTableAdapter usersTableAdapter;
         private System.Windows.Forms.Button BtnProfile;
+        private System.Windows.Forms.BindingSource izdeliaBindingSource;
+        private SewingFactoryMURDataSetTableAdapters.IzdeliaTableAdapter izdeliaTableAdapter;
+        private SewingFactoryMURDataSetTableAdapters.TableAdapterManager tableAdapterManager;
+        private System.Windows.Forms.DataGridView izdeliaDataGridView;
+        private System.Windows.Forms.Button BtnSave;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
+        private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
+        private System.Windows.Forms.RadioButton RbtWord;
+        private System.Windows.Forms.RadioButton RbtCsV;
+        private System.Windows.Forms.Button BtnAll;
+        private System.Windows.Forms.Button BtnSelected;
     }
 }

+ 14 - 0
FormMen.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using Word = Microsoft.Office.Interop.Word;
 
 namespace СУБД_Фабрика
 {
@@ -19,6 +20,8 @@ namespace СУБД_Фабрика
 
         private void FormMen_Load(object sender, EventArgs e)
         {
+            // TODO: This line of code loads data into the 'sewingFactoryMURDataSet1.Izdelia' table. You can move, or remove it, as needed.
+            this.izdeliaTableAdapter.Fill(this.sewingFactoryMURDataSet1.Izdelia);
             // TODO: This line of code loads data into the 'sewingFactoryMURDataSet1.Users' table. You can move, or remove it, as needed.
             this.usersTableAdapter.Fill(this.sewingFactoryMURDataSet1.Users);
             BsUsers.Filter = $"IDUser = {FormMain.IDUser}";
@@ -32,5 +35,16 @@ namespace СУБД_Фабрика
                 this.usersTableAdapter.Fill(this.sewingFactoryMURDataSet1.Users);
             }
         }
+
+        private void BtnSave_Click(object sender, EventArgs e)
+        {
+            izdeliaBindingSource.EndEdit();
+            this.izdeliaTableAdapter.Update(this.sewingFactoryMURDataSet1.Izdelia);
+        }
+
+        private void BtnAll_Click(object sender, EventArgs e)
+        {
+
+        }
     }
 }

+ 9 - 0
FormMen.resx

@@ -126,6 +126,15 @@
   <metadata name="usersTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>316, 17</value>
   </metadata>
+  <metadata name="izdeliaBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>469, 17</value>
+  </metadata>
+  <metadata name="izdeliaTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>634, 17</value>
+  </metadata>
+  <metadata name="tableAdapterManager.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>793, 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>

+ 42 - 0
FormSpisMaterial.cs

@@ -79,7 +79,49 @@ namespace СУБД_Фабрика
 
         private void BtnSpisMaterial_Click(object sender, EventArgs e)
         {
+            DialogResult rez = MessageBox.Show("Вы уверены, что нужно выбранные материалы?",
+                "Внимание!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+            if (rez == DialogResult.No)
+                return;
 
+            for (int i = 0; i <= DgvTkan.RowCount - 1; i++)
+            {
+                int CountSpis = 0;
+                try
+                {
+                    CountSpis = Convert.ToInt32(DgvTkan.Rows[i].Cells[3].Value);
+                }
+                catch { }
+                if (CountSpis == 0)
+                    continue;
+
+                int LengthTkan = Convert.ToInt32(DgvTkan.Rows[i].Cells[2].Value);
+                LengthTkan -= CountSpis;
+                DgvTkan.Rows[i].Cells[2].Value = LengthTkan;
+            }
+
+            BsClothes.EndEdit();
+            this.clothTableAdapter.Update(this.sewingFactoryMURDataSet1.Cloth);
+
+
+            for (int i = 0; i <= DgvFurn.RowCount - 1; i++)
+            {
+                int CountSpis = 0;
+                try
+                {
+                    CountSpis = Convert.ToInt32(DgvFurn.Rows[i].Cells[2].Value);
+                }
+                catch { }
+                if (CountSpis == 0)
+                    continue;
+
+                int CountFur = Convert.ToInt32(DgvFurn.Rows[i].Cells[1].Value);
+                CountFur -= CountSpis;
+                DgvFurn.Rows[i].Cells[1].Value = CountFur;
+            }
+
+            BsFurn.EndEdit();
+            this.furnituraTableAdapter.Update(this.sewingFactoryMURDataSet1.Furnitura);
         }
     }
 }

+ 9 - 0
СУБД Фабрика.csproj

@@ -246,6 +246,15 @@
       <Isolated>False</Isolated>
       <EmbedInteropTypes>True</EmbedInteropTypes>
     </COMReference>
+    <COMReference Include="Microsoft.Office.Interop.Word">
+      <Guid>{00020905-0000-0000-C000-000000000046}</Guid>
+      <VersionMajor>8</VersionMajor>
+      <VersionMinor>7</VersionMinor>
+      <Lcid>0</Lcid>
+      <WrapperTool>primary</WrapperTool>
+      <Isolated>False</Isolated>
+      <EmbedInteropTypes>True</EmbedInteropTypes>
+    </COMReference>
     <COMReference Include="VBIDE">
       <Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
       <VersionMajor>5</VersionMajor>