Work with Chel
This commit is contained in:
		
							
								
								
									
										220
									
								
								MainForms/ChelForm.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										220
									
								
								MainForms/ChelForm.Designer.cs
									
									
									
										generated
									
									
									
								
							@@ -36,18 +36,28 @@ namespace Diplom_O
 | 
			
		||||
			this.chelRodMI = new System.Windows.Forms.ToolStripMenuItem();
 | 
			
		||||
			this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
 | 
			
		||||
			this.statusStrip1 = new System.Windows.Forms.StatusStrip();
 | 
			
		||||
			this.shtatGridView = new System.Windows.Forms.DataGridView();
 | 
			
		||||
			this.groupBox1 = new System.Windows.Forms.GroupBox();
 | 
			
		||||
			this.button1 = new System.Windows.Forms.Button();
 | 
			
		||||
			this.delRodButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.changeRodButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.addRodButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.linkLabel1 = new System.Windows.Forms.LinkLabel();
 | 
			
		||||
			this.comboBox1 = new System.Windows.Forms.ComboBox();
 | 
			
		||||
			this.rodGridView = new System.Windows.Forms.DataGridView();
 | 
			
		||||
			this.chelGridView = new System.Windows.Forms.DataGridView();
 | 
			
		||||
			this.selectButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.delButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.changeButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.addButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.freeShtatCheckBox = new System.Windows.Forms.CheckBox();
 | 
			
		||||
			this.showWorkerCheckBox = new System.Windows.Forms.CheckBox();
 | 
			
		||||
			this.dropFindButton = new System.Windows.Forms.Button();
 | 
			
		||||
			this.label1 = new System.Windows.Forms.Label();
 | 
			
		||||
			this.findBox = new System.Windows.Forms.TextBox();
 | 
			
		||||
			this.menuStrip.SuspendLayout();
 | 
			
		||||
			this.statusStrip1.SuspendLayout();
 | 
			
		||||
			((System.ComponentModel.ISupportInitialize)(this.shtatGridView)).BeginInit();
 | 
			
		||||
			this.groupBox1.SuspendLayout();
 | 
			
		||||
			((System.ComponentModel.ISupportInitialize)(this.rodGridView)).BeginInit();
 | 
			
		||||
			((System.ComponentModel.ISupportInitialize)(this.chelGridView)).BeginInit();
 | 
			
		||||
			this.SuspendLayout();
 | 
			
		||||
			// 
 | 
			
		||||
			// menuStrip
 | 
			
		||||
@@ -59,7 +69,7 @@ namespace Diplom_O
 | 
			
		||||
            this.chelRodMI});
 | 
			
		||||
			this.menuStrip.Location = new System.Drawing.Point(0, 0);
 | 
			
		||||
			this.menuStrip.Name = "menuStrip";
 | 
			
		||||
			this.menuStrip.Size = new System.Drawing.Size(1055, 24);
 | 
			
		||||
			this.menuStrip.Size = new System.Drawing.Size(1102, 24);
 | 
			
		||||
			this.menuStrip.TabIndex = 1;
 | 
			
		||||
			this.menuStrip.Text = "menuStrip1";
 | 
			
		||||
			// 
 | 
			
		||||
@@ -102,123 +112,225 @@ namespace Diplom_O
 | 
			
		||||
            this.errorLabel});
 | 
			
		||||
			this.statusStrip1.Location = new System.Drawing.Point(0, 545);
 | 
			
		||||
			this.statusStrip1.Name = "statusStrip1";
 | 
			
		||||
			this.statusStrip1.Size = new System.Drawing.Size(1055, 22);
 | 
			
		||||
			this.statusStrip1.Size = new System.Drawing.Size(1102, 22);
 | 
			
		||||
			this.statusStrip1.TabIndex = 16;
 | 
			
		||||
			this.statusStrip1.Text = "statusStrip1";
 | 
			
		||||
			// 
 | 
			
		||||
			// shtatGridView
 | 
			
		||||
			// groupBox1
 | 
			
		||||
			// 
 | 
			
		||||
			this.shtatGridView.AllowUserToAddRows = false;
 | 
			
		||||
			this.shtatGridView.AllowUserToDeleteRows = false;
 | 
			
		||||
			this.shtatGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
 | 
			
		||||
			this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Left) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Right)));
 | 
			
		||||
			this.shtatGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
 | 
			
		||||
			this.shtatGridView.Location = new System.Drawing.Point(12, 112);
 | 
			
		||||
			this.shtatGridView.MultiSelect = false;
 | 
			
		||||
			this.shtatGridView.Name = "shtatGridView";
 | 
			
		||||
			this.shtatGridView.ReadOnly = true;
 | 
			
		||||
			this.shtatGridView.RowHeadersVisible = false;
 | 
			
		||||
			this.shtatGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
 | 
			
		||||
			this.shtatGridView.Size = new System.Drawing.Size(318, 430);
 | 
			
		||||
			this.shtatGridView.TabIndex = 25;
 | 
			
		||||
			this.groupBox1.Controls.Add(this.rodGridView);
 | 
			
		||||
			this.groupBox1.Controls.Add(this.comboBox1);
 | 
			
		||||
			this.groupBox1.Controls.Add(this.linkLabel1);
 | 
			
		||||
			this.groupBox1.Controls.Add(this.delRodButton);
 | 
			
		||||
			this.groupBox1.Controls.Add(this.button1);
 | 
			
		||||
			this.groupBox1.Controls.Add(this.changeRodButton);
 | 
			
		||||
			this.groupBox1.Controls.Add(this.addRodButton);
 | 
			
		||||
			this.groupBox1.Location = new System.Drawing.Point(760, 27);
 | 
			
		||||
			this.groupBox1.Name = "groupBox1";
 | 
			
		||||
			this.groupBox1.Size = new System.Drawing.Size(330, 515);
 | 
			
		||||
			this.groupBox1.TabIndex = 26;
 | 
			
		||||
			this.groupBox1.TabStop = false;
 | 
			
		||||
			this.groupBox1.Text = "Родственники";
 | 
			
		||||
			// 
 | 
			
		||||
			// button1
 | 
			
		||||
			// 
 | 
			
		||||
			this.button1.Location = new System.Drawing.Point(6, 19);
 | 
			
		||||
			this.button1.Name = "button1";
 | 
			
		||||
			this.button1.Size = new System.Drawing.Size(25, 23);
 | 
			
		||||
			this.button1.TabIndex = 27;
 | 
			
		||||
			this.button1.Text = "...";
 | 
			
		||||
			this.button1.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// delRodButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.delRodButton.Location = new System.Drawing.Point(168, 56);
 | 
			
		||||
			this.delRodButton.Name = "delRodButton";
 | 
			
		||||
			this.delRodButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.delRodButton.TabIndex = 29;
 | 
			
		||||
			this.delRodButton.Text = "Удалить";
 | 
			
		||||
			this.delRodButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// changeRodButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.changeRodButton.Location = new System.Drawing.Point(87, 56);
 | 
			
		||||
			this.changeRodButton.Name = "changeRodButton";
 | 
			
		||||
			this.changeRodButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.changeRodButton.TabIndex = 28;
 | 
			
		||||
			this.changeRodButton.Text = "Изменить";
 | 
			
		||||
			this.changeRodButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// addRodButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.addRodButton.Location = new System.Drawing.Point(6, 56);
 | 
			
		||||
			this.addRodButton.Name = "addRodButton";
 | 
			
		||||
			this.addRodButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.addRodButton.TabIndex = 27;
 | 
			
		||||
			this.addRodButton.Text = "Добавить";
 | 
			
		||||
			this.addRodButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// linkLabel1
 | 
			
		||||
			// 
 | 
			
		||||
			this.linkLabel1.AutoSize = true;
 | 
			
		||||
			this.linkLabel1.Location = new System.Drawing.Point(37, 24);
 | 
			
		||||
			this.linkLabel1.Name = "linkLabel1";
 | 
			
		||||
			this.linkLabel1.Size = new System.Drawing.Size(81, 13);
 | 
			
		||||
			this.linkLabel1.TabIndex = 30;
 | 
			
		||||
			this.linkLabel1.TabStop = true;
 | 
			
		||||
			this.linkLabel1.Text = "Фамилия И.О.";
 | 
			
		||||
			// 
 | 
			
		||||
			// comboBox1
 | 
			
		||||
			// 
 | 
			
		||||
			this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
 | 
			
		||||
			this.comboBox1.FormattingEnabled = true;
 | 
			
		||||
			this.comboBox1.Items.AddRange(new object[] {
 | 
			
		||||
            "Родственная связь"});
 | 
			
		||||
			this.comboBox1.Location = new System.Drawing.Point(168, 21);
 | 
			
		||||
			this.comboBox1.Name = "comboBox1";
 | 
			
		||||
			this.comboBox1.Size = new System.Drawing.Size(156, 21);
 | 
			
		||||
			this.comboBox1.TabIndex = 31;
 | 
			
		||||
			// 
 | 
			
		||||
			// rodGridView
 | 
			
		||||
			// 
 | 
			
		||||
			this.rodGridView.AllowUserToAddRows = false;
 | 
			
		||||
			this.rodGridView.AllowUserToDeleteRows = false;
 | 
			
		||||
			this.rodGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Left) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Right)));
 | 
			
		||||
			this.rodGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
 | 
			
		||||
			this.rodGridView.Location = new System.Drawing.Point(6, 85);
 | 
			
		||||
			this.rodGridView.MultiSelect = false;
 | 
			
		||||
			this.rodGridView.Name = "rodGridView";
 | 
			
		||||
			this.rodGridView.ReadOnly = true;
 | 
			
		||||
			this.rodGridView.RowHeadersVisible = false;
 | 
			
		||||
			this.rodGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
 | 
			
		||||
			this.rodGridView.Size = new System.Drawing.Size(318, 424);
 | 
			
		||||
			this.rodGridView.TabIndex = 32;
 | 
			
		||||
			// 
 | 
			
		||||
			// chelGridView
 | 
			
		||||
			// 
 | 
			
		||||
			this.chelGridView.AllowUserToAddRows = false;
 | 
			
		||||
			this.chelGridView.AllowUserToDeleteRows = false;
 | 
			
		||||
			this.chelGridView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Left) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Right)));
 | 
			
		||||
			this.chelGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
 | 
			
		||||
			this.chelGridView.Location = new System.Drawing.Point(12, 79);
 | 
			
		||||
			this.chelGridView.MultiSelect = false;
 | 
			
		||||
			this.chelGridView.Name = "chelGridView";
 | 
			
		||||
			this.chelGridView.ReadOnly = true;
 | 
			
		||||
			this.chelGridView.RowHeadersVisible = false;
 | 
			
		||||
			this.chelGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
 | 
			
		||||
			this.chelGridView.Size = new System.Drawing.Size(742, 434);
 | 
			
		||||
			this.chelGridView.TabIndex = 35;
 | 
			
		||||
			// 
 | 
			
		||||
			// selectButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.selectButton.Location = new System.Drawing.Point(255, 83);
 | 
			
		||||
			this.selectButton.Location = new System.Drawing.Point(12, 27);
 | 
			
		||||
			this.selectButton.Name = "selectButton";
 | 
			
		||||
			this.selectButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.selectButton.TabIndex = 24;
 | 
			
		||||
			this.selectButton.TabIndex = 34;
 | 
			
		||||
			this.selectButton.Text = "Выбрать";
 | 
			
		||||
			this.selectButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			this.selectButton.Visible = false;
 | 
			
		||||
			// 
 | 
			
		||||
			// delButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.delButton.Location = new System.Drawing.Point(174, 83);
 | 
			
		||||
			this.delButton.Location = new System.Drawing.Point(255, 27);
 | 
			
		||||
			this.delButton.Name = "delButton";
 | 
			
		||||
			this.delButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.delButton.TabIndex = 23;
 | 
			
		||||
			this.delButton.TabIndex = 33;
 | 
			
		||||
			this.delButton.Text = "Удалить";
 | 
			
		||||
			this.delButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// changeButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.changeButton.Location = new System.Drawing.Point(93, 83);
 | 
			
		||||
			this.changeButton.Location = new System.Drawing.Point(174, 27);
 | 
			
		||||
			this.changeButton.Name = "changeButton";
 | 
			
		||||
			this.changeButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.changeButton.TabIndex = 22;
 | 
			
		||||
			this.changeButton.TabIndex = 32;
 | 
			
		||||
			this.changeButton.Text = "Изменить";
 | 
			
		||||
			this.changeButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// addButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.addButton.Location = new System.Drawing.Point(12, 83);
 | 
			
		||||
			this.addButton.Location = new System.Drawing.Point(93, 27);
 | 
			
		||||
			this.addButton.Name = "addButton";
 | 
			
		||||
			this.addButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.addButton.TabIndex = 21;
 | 
			
		||||
			this.addButton.TabIndex = 31;
 | 
			
		||||
			this.addButton.Text = "Добавить";
 | 
			
		||||
			this.addButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// freeShtatCheckBox
 | 
			
		||||
			// showWorkerCheckBox
 | 
			
		||||
			// 
 | 
			
		||||
			this.freeShtatCheckBox.AutoSize = true;
 | 
			
		||||
			this.freeShtatCheckBox.Checked = true;
 | 
			
		||||
			this.freeShtatCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
 | 
			
		||||
			this.freeShtatCheckBox.Location = new System.Drawing.Point(15, 58);
 | 
			
		||||
			this.freeShtatCheckBox.Name = "freeShtatCheckBox";
 | 
			
		||||
			this.freeShtatCheckBox.Size = new System.Drawing.Size(218, 17);
 | 
			
		||||
			this.freeShtatCheckBox.TabIndex = 20;
 | 
			
		||||
			this.freeShtatCheckBox.Text = "Поrазать/скрыть занятые должности";
 | 
			
		||||
			this.freeShtatCheckBox.UseVisualStyleBackColor = true;
 | 
			
		||||
			this.showWorkerCheckBox.AutoSize = true;
 | 
			
		||||
			this.showWorkerCheckBox.Checked = true;
 | 
			
		||||
			this.showWorkerCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
 | 
			
		||||
			this.showWorkerCheckBox.Location = new System.Drawing.Point(12, 56);
 | 
			
		||||
			this.showWorkerCheckBox.Name = "showWorkerCheckBox";
 | 
			
		||||
			this.showWorkerCheckBox.Size = new System.Drawing.Size(204, 17);
 | 
			
		||||
			this.showWorkerCheckBox.TabIndex = 30;
 | 
			
		||||
			this.showWorkerCheckBox.Text = "Поrазать/скрыть трудоустроенных";
 | 
			
		||||
			this.showWorkerCheckBox.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// dropFindButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.dropFindButton.Location = new System.Drawing.Point(255, 25);
 | 
			
		||||
			this.dropFindButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
 | 
			
		||||
			this.dropFindButton.Location = new System.Drawing.Point(679, 519);
 | 
			
		||||
			this.dropFindButton.Name = "dropFindButton";
 | 
			
		||||
			this.dropFindButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.dropFindButton.TabIndex = 19;
 | 
			
		||||
			this.dropFindButton.TabIndex = 29;
 | 
			
		||||
			this.dropFindButton.Text = "Сбросить";
 | 
			
		||||
			this.dropFindButton.UseVisualStyleBackColor = true;
 | 
			
		||||
			// 
 | 
			
		||||
			// label1
 | 
			
		||||
			// 
 | 
			
		||||
			this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
 | 
			
		||||
			this.label1.AutoSize = true;
 | 
			
		||||
			this.label1.Location = new System.Drawing.Point(12, 30);
 | 
			
		||||
			this.label1.Location = new System.Drawing.Point(12, 524);
 | 
			
		||||
			this.label1.Name = "label1";
 | 
			
		||||
			this.label1.Size = new System.Drawing.Size(39, 13);
 | 
			
		||||
			this.label1.TabIndex = 18;
 | 
			
		||||
			this.label1.TabIndex = 28;
 | 
			
		||||
			this.label1.Text = "Поиск";
 | 
			
		||||
			// 
 | 
			
		||||
			// findBox
 | 
			
		||||
			// 
 | 
			
		||||
			this.findBox.Location = new System.Drawing.Point(57, 27);
 | 
			
		||||
			this.findBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 
 | 
			
		||||
            | System.Windows.Forms.AnchorStyles.Right)));
 | 
			
		||||
			this.findBox.Location = new System.Drawing.Point(57, 521);
 | 
			
		||||
			this.findBox.Name = "findBox";
 | 
			
		||||
			this.findBox.Size = new System.Drawing.Size(192, 20);
 | 
			
		||||
			this.findBox.TabIndex = 17;
 | 
			
		||||
			this.findBox.Size = new System.Drawing.Size(616, 20);
 | 
			
		||||
			this.findBox.TabIndex = 27;
 | 
			
		||||
			// 
 | 
			
		||||
			// ChelForm
 | 
			
		||||
			// 
 | 
			
		||||
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
 | 
			
		||||
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
 | 
			
		||||
			this.ClientSize = new System.Drawing.Size(1055, 567);
 | 
			
		||||
			this.Controls.Add(this.shtatGridView);
 | 
			
		||||
			this.ClientSize = new System.Drawing.Size(1102, 567);
 | 
			
		||||
			this.Controls.Add(this.chelGridView);
 | 
			
		||||
			this.Controls.Add(this.selectButton);
 | 
			
		||||
			this.Controls.Add(this.delButton);
 | 
			
		||||
			this.Controls.Add(this.changeButton);
 | 
			
		||||
			this.Controls.Add(this.addButton);
 | 
			
		||||
			this.Controls.Add(this.freeShtatCheckBox);
 | 
			
		||||
			this.Controls.Add(this.showWorkerCheckBox);
 | 
			
		||||
			this.Controls.Add(this.dropFindButton);
 | 
			
		||||
			this.Controls.Add(this.label1);
 | 
			
		||||
			this.Controls.Add(this.findBox);
 | 
			
		||||
			this.Controls.Add(this.groupBox1);
 | 
			
		||||
			this.Controls.Add(this.statusStrip1);
 | 
			
		||||
			this.Controls.Add(this.menuStrip);
 | 
			
		||||
			this.Name = "ChelForm";
 | 
			
		||||
			this.Text = "ChelForm";
 | 
			
		||||
			this.Text = "Люди / Родственники";
 | 
			
		||||
			this.menuStrip.ResumeLayout(false);
 | 
			
		||||
			this.menuStrip.PerformLayout();
 | 
			
		||||
			this.statusStrip1.ResumeLayout(false);
 | 
			
		||||
			this.statusStrip1.PerformLayout();
 | 
			
		||||
			((System.ComponentModel.ISupportInitialize)(this.shtatGridView)).EndInit();
 | 
			
		||||
			this.groupBox1.ResumeLayout(false);
 | 
			
		||||
			this.groupBox1.PerformLayout();
 | 
			
		||||
			((System.ComponentModel.ISupportInitialize)(this.rodGridView)).EndInit();
 | 
			
		||||
			((System.ComponentModel.ISupportInitialize)(this.chelGridView)).EndInit();
 | 
			
		||||
			this.ResumeLayout(false);
 | 
			
		||||
			this.PerformLayout();
 | 
			
		||||
 | 
			
		||||
@@ -233,12 +345,20 @@ namespace Diplom_O
 | 
			
		||||
		private System.Windows.Forms.ToolStripMenuItem chelRodMI;
 | 
			
		||||
		private System.Windows.Forms.ToolStripStatusLabel errorLabel;
 | 
			
		||||
		private System.Windows.Forms.StatusStrip statusStrip1;
 | 
			
		||||
		private System.Windows.Forms.DataGridView shtatGridView;
 | 
			
		||||
		private System.Windows.Forms.GroupBox groupBox1;
 | 
			
		||||
		private System.Windows.Forms.DataGridView rodGridView;
 | 
			
		||||
		private System.Windows.Forms.ComboBox comboBox1;
 | 
			
		||||
		private System.Windows.Forms.LinkLabel linkLabel1;
 | 
			
		||||
		private System.Windows.Forms.Button delRodButton;
 | 
			
		||||
		private System.Windows.Forms.Button button1;
 | 
			
		||||
		private System.Windows.Forms.Button changeRodButton;
 | 
			
		||||
		private System.Windows.Forms.Button addRodButton;
 | 
			
		||||
		private System.Windows.Forms.DataGridView chelGridView;
 | 
			
		||||
		private System.Windows.Forms.Button selectButton;
 | 
			
		||||
		private System.Windows.Forms.Button delButton;
 | 
			
		||||
		private System.Windows.Forms.Button changeButton;
 | 
			
		||||
		private System.Windows.Forms.Button addButton;
 | 
			
		||||
		private System.Windows.Forms.CheckBox freeShtatCheckBox;
 | 
			
		||||
		private System.Windows.Forms.CheckBox showWorkerCheckBox;
 | 
			
		||||
		private System.Windows.Forms.Button dropFindButton;
 | 
			
		||||
		private System.Windows.Forms.Label label1;
 | 
			
		||||
		private System.Windows.Forms.TextBox findBox;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,5 @@
 | 
			
		||||
using System;
 | 
			
		||||
using Diplom_O.DataBase;
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using System.ComponentModel;
 | 
			
		||||
using System.Data;
 | 
			
		||||
@@ -12,39 +13,174 @@ namespace Diplom_O
 | 
			
		||||
{
 | 
			
		||||
	public partial class ChelForm : Form
 | 
			
		||||
	{
 | 
			
		||||
		public ChelForm()
 | 
			
		||||
		private Task errDrop;
 | 
			
		||||
		private void ShowError(string msg = null)
 | 
			
		||||
		{
 | 
			
		||||
			InitializeComponent();
 | 
			
		||||
			errorLabel.Text = string.IsNullOrEmpty(msg) ? "Неизвестная ошибка." : msg;
 | 
			
		||||
			errorLabel.Visible = true;
 | 
			
		||||
			errDrop = new Task(() =>
 | 
			
		||||
			{
 | 
			
		||||
				var fd = errDrop.Id;
 | 
			
		||||
				Task.Delay(5000).Wait();
 | 
			
		||||
				if (errDrop.Id == fd)
 | 
			
		||||
					if (InvokeRequired) Invoke((Action)(() => { errorLabel.Visible = false; }));
 | 
			
		||||
					else errorLabel.Visible = false;
 | 
			
		||||
			});
 | 
			
		||||
			errDrop.Start();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void delButton_Click(object sender, EventArgs e)
 | 
			
		||||
		private Task filterDrop;
 | 
			
		||||
		private void findBox_TextChanged(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void changeButton_Click(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void addButton_Click(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void freeShtatCheckBox_CheckedChanged(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
			filterDrop = new Task(() =>
 | 
			
		||||
			{
 | 
			
		||||
				var fd = filterDrop.Id;
 | 
			
		||||
				Task.Delay(1000).Wait();
 | 
			
		||||
				if (filterDrop.Id == fd)
 | 
			
		||||
					if (InvokeRequired) Invoke((Action)(() => { resetShatTable(); }));
 | 
			
		||||
					else resetShatTable();
 | 
			
		||||
			});
 | 
			
		||||
			filterDrop.Start();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void dropFindButton_Click(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
			findBox.Text = "";
 | 
			
		||||
			filterDrop = new Task(() => { return; });
 | 
			
		||||
			resetShatTable();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void findBox_TextChanged(object sender, EventArgs e)
 | 
			
		||||
		private void resetChelTable()
 | 
			
		||||
		{
 | 
			
		||||
			try
 | 
			
		||||
			{
 | 
			
		||||
				{
 | 
			
		||||
					chelGridView.Rows.Clear();
 | 
			
		||||
					chelGridView.Columns.Clear();
 | 
			
		||||
					var c = chelGridView.Columns;
 | 
			
		||||
					c.Add("Id", "№");
 | 
			
		||||
					c.Add("FIO", "Должность");
 | 
			
		||||
					c.Add("Male", "Пол");
 | 
			
		||||
					c.Add("Birthday", "Дата рождения");
 | 
			
		||||
					c.Add("Adress", "Адрес");
 | 
			
		||||
					c.Add("INN", "ИНН");
 | 
			
		||||
					c.Add("SNILS", "СНИЛС");
 | 
			
		||||
					c.Add("Pasport", "Паспорт");
 | 
			
		||||
					c[0].Width = 40;
 | 
			
		||||
					c[1].Width = 120;
 | 
			
		||||
					c[2].Width = 40;
 | 
			
		||||
					c[3].Width = 40;
 | 
			
		||||
					c[4].Width = 120;
 | 
			
		||||
					c[5].Width = 40;
 | 
			
		||||
					c[6].Width = 40;
 | 
			
		||||
					c[7].Width = 120;
 | 
			
		||||
					c[4].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
 | 
			
		||||
					c[7].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
 | 
			
		||||
				}
 | 
			
		||||
				{
 | 
			
		||||
					var arr = FuncDB.ListChel(findBox.Text);
 | 
			
		||||
					var r = chelGridView.Rows;
 | 
			
		||||
					foreach (var chel in arr)
 | 
			
		||||
						if (showWorkerCheckBox.Checked || !FuncDB.HaveChelFromRabotniky(chel.Id))
 | 
			
		||||
							r.Add(new object[] {
 | 
			
		||||
								chel.Id,
 | 
			
		||||
								chel.FName +
 | 
			
		||||
									(string.IsNullOrEmpty(chel.SName) ? "" : (" " + chel.SName[0] + ".")) +
 | 
			
		||||
									(string.IsNullOrEmpty(chel.TName) ? "" : (" " + chel.TName[0] + ".")),
 | 
			
		||||
								chel.Male ? "Муж" : "Жен",
 | 
			
		||||
								chel.Birthday.ToString("yyyy.MM.dd"),
 | 
			
		||||
								chel.Address,
 | 
			
		||||
								chel.INN,
 | 
			
		||||
								chel.SNILS,
 | 
			
		||||
								chel.Pasport
 | 
			
		||||
							});
 | 
			
		||||
				}
 | 
			
		||||
				if (chelGridView.Rows.Count > 0)
 | 
			
		||||
					chelGridView.Rows[0].Selected = true;
 | 
			
		||||
			}
 | 
			
		||||
			catch (Exception e) { ShowError(e.Message); }
 | 
			
		||||
		}
 | 
			
		||||
		private Chel selectedChel()
 | 
			
		||||
		{
 | 
			
		||||
			try
 | 
			
		||||
			{
 | 
			
		||||
				if (chelGridView.SelectedRows.Count != 1) throw new Exception("Человек не выбран.");
 | 
			
		||||
				var chel = FuncDB.GetChel((int)chelGridView.SelectedRows[0].Cells[0].Value);
 | 
			
		||||
				return chel;
 | 
			
		||||
			}
 | 
			
		||||
			catch (Exception e) { ShowError(e.Message); return null; }
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		public Shtat formResult = null;
 | 
			
		||||
		public ChelForm(bool select = false)
 | 
			
		||||
		{
 | 
			
		||||
			try
 | 
			
		||||
			{
 | 
			
		||||
				InitializeComponent();
 | 
			
		||||
				Init(select);
 | 
			
		||||
				resetChelTable();
 | 
			
		||||
			}
 | 
			
		||||
			catch { this.Close(); }
 | 
			
		||||
		}
 | 
			
		||||
		public void Init(bool s)
 | 
			
		||||
		{
 | 
			
		||||
			if (s) selectButton.Visible = true;
 | 
			
		||||
			chelRodMI.Enabled = false;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void addButton_Click(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
			var res = new SupportForms.WorkChelForm();
 | 
			
		||||
			res.ShowDialog();
 | 
			
		||||
			if (!res.isCanceled)
 | 
			
		||||
				resetChelTable();
 | 
			
		||||
		}
 | 
			
		||||
		private void changeButton_Click(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
			var chel = selectedChel();
 | 
			
		||||
			if (chel == null) { ShowError("Человек не выбран."); return; }
 | 
			
		||||
			var res = new SupportForms.WorkChelForm(chel);
 | 
			
		||||
			res.ShowDialog();
 | 
			
		||||
			if (!res.isCanceled)
 | 
			
		||||
				resetChelTable();
 | 
			
		||||
		}
 | 
			
		||||
		private void delButton_Click(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
			var chel = selectedChel();
 | 
			
		||||
			if (chel == null) { ShowError("Человек не выбран."); return; }
 | 
			
		||||
			try
 | 
			
		||||
			{
 | 
			
		||||
				FuncDB.DelChel(chel);
 | 
			
		||||
				resetChelTable();
 | 
			
		||||
			}
 | 
			
		||||
			catch (Exception ex) { ShowError(ex.Message); }
 | 
			
		||||
		}
 | 
			
		||||
		public void MI_Click(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
			object form = null;
 | 
			
		||||
			var idxMenu = -1;
 | 
			
		||||
			try { idxMenu = menuStrip.Items.IndexOf((ToolStripMenuItem)sender); }
 | 
			
		||||
			catch { };
 | 
			
		||||
			switch (idxMenu)
 | 
			
		||||
			{
 | 
			
		||||
				case 0: form = new ShtatForm(); break;
 | 
			
		||||
				case 1: form = new RabForm(); break;
 | 
			
		||||
				case 2: form = new OtpForm(); break;
 | 
			
		||||
				case 3: form = new ChelForm(); break;
 | 
			
		||||
			}
 | 
			
		||||
			if (form != null)
 | 
			
		||||
			{
 | 
			
		||||
				this.Hide();
 | 
			
		||||
				((Form)form).Closed += (s, args) => this.Close();
 | 
			
		||||
				((Form)form).Show();
 | 
			
		||||
				return;
 | 
			
		||||
			}
 | 
			
		||||
			ShowError("Ошибка перехода на новую форму.");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void checkBox_CheckedChanged(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
			resetChelTable();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -123,4 +123,7 @@
 | 
			
		||||
  <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
 | 
			
		||||
    <value>248, 17</value>
 | 
			
		||||
  </metadata>
 | 
			
		||||
  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
 | 
			
		||||
    <value>58</value>
 | 
			
		||||
  </metadata>
 | 
			
		||||
</root>
 | 
			
		||||
							
								
								
									
										10
									
								
								MainForms/ShtatForm.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										10
									
								
								MainForms/ShtatForm.Designer.cs
									
									
									
										generated
									
									
									
								
							@@ -133,11 +133,11 @@ namespace Diplom_O
 | 
			
		||||
			this.freeShtatCheckBox.TabIndex = 6;
 | 
			
		||||
			this.freeShtatCheckBox.Text = "Поrазать/скрыть занятые должности";
 | 
			
		||||
			this.freeShtatCheckBox.UseVisualStyleBackColor = true;
 | 
			
		||||
			this.freeShtatCheckBox.CheckedChanged += new System.EventHandler(this.freeShtatCheckBox_CheckedChanged);
 | 
			
		||||
			this.freeShtatCheckBox.CheckedChanged += new System.EventHandler(this.checkBox_CheckedChanged);
 | 
			
		||||
			// 
 | 
			
		||||
			// addButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.addButton.Location = new System.Drawing.Point(12, 27);
 | 
			
		||||
			this.addButton.Location = new System.Drawing.Point(93, 27);
 | 
			
		||||
			this.addButton.Name = "addButton";
 | 
			
		||||
			this.addButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.addButton.TabIndex = 7;
 | 
			
		||||
@@ -147,7 +147,7 @@ namespace Diplom_O
 | 
			
		||||
			// 
 | 
			
		||||
			// changeButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.changeButton.Location = new System.Drawing.Point(93, 27);
 | 
			
		||||
			this.changeButton.Location = new System.Drawing.Point(174, 27);
 | 
			
		||||
			this.changeButton.Name = "changeButton";
 | 
			
		||||
			this.changeButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.changeButton.TabIndex = 8;
 | 
			
		||||
@@ -157,7 +157,7 @@ namespace Diplom_O
 | 
			
		||||
			// 
 | 
			
		||||
			// delButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.delButton.Location = new System.Drawing.Point(174, 27);
 | 
			
		||||
			this.delButton.Location = new System.Drawing.Point(255, 27);
 | 
			
		||||
			this.delButton.Name = "delButton";
 | 
			
		||||
			this.delButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.delButton.TabIndex = 9;
 | 
			
		||||
@@ -167,7 +167,7 @@ namespace Diplom_O
 | 
			
		||||
			// 
 | 
			
		||||
			// selectButton
 | 
			
		||||
			// 
 | 
			
		||||
			this.selectButton.Location = new System.Drawing.Point(255, 27);
 | 
			
		||||
			this.selectButton.Location = new System.Drawing.Point(12, 27);
 | 
			
		||||
			this.selectButton.Name = "selectButton";
 | 
			
		||||
			this.selectButton.Size = new System.Drawing.Size(75, 23);
 | 
			
		||||
			this.selectButton.TabIndex = 13;
 | 
			
		||||
 
 | 
			
		||||
@@ -161,7 +161,7 @@ namespace Diplom_O
 | 
			
		||||
			ShowError("Ошибка перехода на новую форму.");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private void freeShtatCheckBox_CheckedChanged(object sender, EventArgs e)
 | 
			
		||||
		private void checkBox_CheckedChanged(object sender, EventArgs e)
 | 
			
		||||
		{
 | 
			
		||||
			resetShatTable();
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user