Work on Chel
This commit is contained in:
130
MainForms/ChelForm.Designer.cs
generated
130
MainForms/ChelForm.Designer.cs
generated
@@ -37,13 +37,13 @@ namespace Diplom_O
|
||||
this.errorLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
this.rodGridView = new System.Windows.Forms.DataGridView();
|
||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.delRodButton = new System.Windows.Forms.Button();
|
||||
this.button1 = 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();
|
||||
@@ -69,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(1102, 24);
|
||||
this.menuStrip.Size = new System.Drawing.Size(1144, 24);
|
||||
this.menuStrip.TabIndex = 1;
|
||||
this.menuStrip.Text = "menuStrip1";
|
||||
//
|
||||
@@ -110,16 +110,15 @@ namespace Diplom_O
|
||||
//
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.errorLabel});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 545);
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 386);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1102, 22);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(1144, 22);
|
||||
this.statusStrip1.TabIndex = 16;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBox1.Controls.Add(this.rodGridView);
|
||||
this.groupBox1.Controls.Add(this.comboBox1);
|
||||
@@ -128,21 +127,50 @@ namespace Diplom_O
|
||||
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.Location = new System.Drawing.Point(802, 27);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(330, 515);
|
||||
this.groupBox1.Size = new System.Drawing.Size(330, 356);
|
||||
this.groupBox1.TabIndex = 26;
|
||||
this.groupBox1.TabStop = false;
|
||||
this.groupBox1.Text = "Родственники";
|
||||
//
|
||||
// button1
|
||||
// rodGridView
|
||||
//
|
||||
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;
|
||||
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, 265);
|
||||
this.rodGridView.TabIndex = 32;
|
||||
//
|
||||
// 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;
|
||||
//
|
||||
// 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 = "Фамилия И.О.";
|
||||
//
|
||||
// delRodButton
|
||||
//
|
||||
@@ -153,6 +181,15 @@ namespace Diplom_O
|
||||
this.delRodButton.Text = "Удалить";
|
||||
this.delRodButton.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// 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;
|
||||
//
|
||||
// changeRodButton
|
||||
//
|
||||
this.changeRodButton.Location = new System.Drawing.Point(87, 56);
|
||||
@@ -171,44 +208,6 @@ namespace Diplom_O
|
||||
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;
|
||||
@@ -217,13 +216,13 @@ namespace Diplom_O
|
||||
| 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.Location = new System.Drawing.Point(12, 56);
|
||||
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.Size = new System.Drawing.Size(784, 298);
|
||||
this.chelGridView.TabIndex = 35;
|
||||
//
|
||||
// selectButton
|
||||
@@ -244,6 +243,7 @@ namespace Diplom_O
|
||||
this.delButton.TabIndex = 33;
|
||||
this.delButton.Text = "Удалить";
|
||||
this.delButton.UseVisualStyleBackColor = true;
|
||||
this.delButton.Click += new System.EventHandler(this.delButton_Click);
|
||||
//
|
||||
// changeButton
|
||||
//
|
||||
@@ -253,6 +253,7 @@ namespace Diplom_O
|
||||
this.changeButton.TabIndex = 32;
|
||||
this.changeButton.Text = "Изменить";
|
||||
this.changeButton.UseVisualStyleBackColor = true;
|
||||
this.changeButton.Click += new System.EventHandler(this.changeButton_Click);
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
@@ -262,13 +263,14 @@ namespace Diplom_O
|
||||
this.addButton.TabIndex = 31;
|
||||
this.addButton.Text = "Добавить";
|
||||
this.addButton.UseVisualStyleBackColor = true;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// showWorkerCheckBox
|
||||
//
|
||||
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.Location = new System.Drawing.Point(336, 31);
|
||||
this.showWorkerCheckBox.Name = "showWorkerCheckBox";
|
||||
this.showWorkerCheckBox.Size = new System.Drawing.Size(204, 17);
|
||||
this.showWorkerCheckBox.TabIndex = 30;
|
||||
@@ -278,7 +280,7 @@ namespace Diplom_O
|
||||
// dropFindButton
|
||||
//
|
||||
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.Location = new System.Drawing.Point(721, 360);
|
||||
this.dropFindButton.Name = "dropFindButton";
|
||||
this.dropFindButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.dropFindButton.TabIndex = 29;
|
||||
@@ -289,7 +291,7 @@ namespace Diplom_O
|
||||
//
|
||||
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, 524);
|
||||
this.label1.Location = new System.Drawing.Point(12, 365);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(39, 13);
|
||||
this.label1.TabIndex = 28;
|
||||
@@ -299,16 +301,16 @@ namespace Diplom_O
|
||||
//
|
||||
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.Location = new System.Drawing.Point(57, 362);
|
||||
this.findBox.Name = "findBox";
|
||||
this.findBox.Size = new System.Drawing.Size(616, 20);
|
||||
this.findBox.Size = new System.Drawing.Size(658, 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(1102, 567);
|
||||
this.ClientSize = new System.Drawing.Size(1144, 408);
|
||||
this.Controls.Add(this.chelGridView);
|
||||
this.Controls.Add(this.selectButton);
|
||||
this.Controls.Add(this.delButton);
|
||||
|
@@ -37,8 +37,8 @@ namespace Diplom_O
|
||||
var fd = filterDrop.Id;
|
||||
Task.Delay(1000).Wait();
|
||||
if (filterDrop.Id == fd)
|
||||
if (InvokeRequired) Invoke((Action)(() => { resetShatTable(); }));
|
||||
else resetShatTable();
|
||||
if (InvokeRequired) Invoke((Action)(() => { resetChelTable(); }));
|
||||
else resetChelTable();
|
||||
});
|
||||
filterDrop.Start();
|
||||
}
|
||||
@@ -47,7 +47,7 @@ namespace Diplom_O
|
||||
{
|
||||
findBox.Text = "";
|
||||
filterDrop = new Task(() => { return; });
|
||||
resetShatTable();
|
||||
resetChelTable();
|
||||
}
|
||||
|
||||
private void resetChelTable()
|
||||
@@ -59,7 +59,7 @@ namespace Diplom_O
|
||||
chelGridView.Columns.Clear();
|
||||
var c = chelGridView.Columns;
|
||||
c.Add("Id", "№");
|
||||
c.Add("FIO", "Должность");
|
||||
c.Add("FIO", "Фамилия И.О.");
|
||||
c.Add("Male", "Пол");
|
||||
c.Add("Birthday", "Дата рождения");
|
||||
c.Add("Adress", "Адрес");
|
||||
@@ -69,11 +69,11 @@ namespace Diplom_O
|
||||
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[3].Width = 80;
|
||||
c[4].Width = 140;
|
||||
c[5].Width = 90;
|
||||
c[6].Width = 100;
|
||||
c[7].Width = 140;
|
||||
c[4].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
|
||||
c[7].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ namespace Diplom_O
|
||||
var arr = FuncDB.ListChel(findBox.Text);
|
||||
var r = chelGridView.Rows;
|
||||
foreach (var chel in arr)
|
||||
if (showWorkerCheckBox.Checked || !FuncDB.HaveChelFromRabotniky(chel.Id))
|
||||
if (showWorkerCheckBox.Checked || !FuncDB.HaveChelRabotnik(chel.Id))
|
||||
r.Add(new object[] {
|
||||
chel.Id,
|
||||
chel.FName +
|
||||
@@ -148,6 +148,7 @@ namespace Diplom_O
|
||||
{
|
||||
var chel = selectedChel();
|
||||
if (chel == null) { ShowError("Человек не выбран."); return; }
|
||||
if (FuncDB.HaveChelToChel(chel.Id)) { ShowError("Человек есть в таблице родственников."); return; }
|
||||
try
|
||||
{
|
||||
FuncDB.DelChel(chel);
|
||||
|
Reference in New Issue
Block a user