From 54b637575c994eebe322312315322ecef9aa9d3d Mon Sep 17 00:00:00 2001 From: Husky Date: Sat, 14 Jul 2018 19:45:21 +0200 Subject: [PATCH] =?UTF-8?q?Linergrundlagen=20k=C3=B6nnen=20nun=20=C3=BCber?= =?UTF-8?q?=20mehrfachauswahl=20ausgew=C3=A4hlt=20werden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FrmKalibrierungFestlegung.Designer.cs | 23 +- SanSystem/FrmKalibrierungFestlegung.cs | 6 +- SanSystem/FrmKalibrierungFestlegung.resx | 120 ++++++++ SanSystem/SanSystem.csproj | 18 ++ SanSystem/UCInliner.Designer.cs | 271 +----------------- SanSystem/UCInliner.cs | 26 +- SanSystem/UCLinerGrundlagen.Designer.cs | 43 ++- SanSystem/UCLinerGrundlagen.cs | 78 +++++ SanSystem/frmObjektEdit.Designer.cs | 2 +- SanSystem/frmObjekteList.Designer.cs | 1 + SanSystem/frmObjekteList.cs | 45 ++- 11 files changed, 321 insertions(+), 312 deletions(-) create mode 100644 SanSystem/FrmKalibrierungFestlegung.resx diff --git a/SanSystem/FrmKalibrierungFestlegung.Designer.cs b/SanSystem/FrmKalibrierungFestlegung.Designer.cs index d5f7abf..bd01d41 100644 --- a/SanSystem/FrmKalibrierungFestlegung.Designer.cs +++ b/SanSystem/FrmKalibrierungFestlegung.Designer.cs @@ -28,12 +28,31 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); + this.ucLinerGrundlagen1 = new SanSystem.UCLinerGrundlagen(); + this.SuspendLayout(); + // + // ucLinerGrundlagen1 + // + this.ucLinerGrundlagen1.BackColor = System.Drawing.SystemColors.Window; + this.ucLinerGrundlagen1.Location = new System.Drawing.Point(12, 12); + this.ucLinerGrundlagen1.Name = "ucLinerGrundlagen1"; + this.ucLinerGrundlagen1.Size = new System.Drawing.Size(731, 456); + this.ucLinerGrundlagen1.TabIndex = 0; + // + // FrmKalibrierungFestlegung + // + 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(757, 478); + this.Controls.Add(this.ucLinerGrundlagen1); + this.Name = "FrmKalibrierungFestlegung"; this.Text = "FrmKalibrierungFestlegung"; + this.ResumeLayout(false); + } #endregion + + private UCLinerGrundlagen ucLinerGrundlagen1; } } \ No newline at end of file diff --git a/SanSystem/FrmKalibrierungFestlegung.cs b/SanSystem/FrmKalibrierungFestlegung.cs index 484db5b..14a68f3 100644 --- a/SanSystem/FrmKalibrierungFestlegung.cs +++ b/SanSystem/FrmKalibrierungFestlegung.cs @@ -1,4 +1,5 @@ -using System; +using KlassenBIB; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -12,9 +13,10 @@ namespace SanSystem { public partial class FrmKalibrierungFestlegung : Form { - public FrmKalibrierungFestlegung() + public FrmKalibrierungFestlegung(List inspektionsobjekts) { InitializeComponent(); + ucLinerGrundlagen1.inspektionsobjekts = inspektionsobjekts; } } } diff --git a/SanSystem/FrmKalibrierungFestlegung.resx b/SanSystem/FrmKalibrierungFestlegung.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/SanSystem/FrmKalibrierungFestlegung.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SanSystem/SanSystem.csproj b/SanSystem/SanSystem.csproj index d25791f..a69374d 100644 --- a/SanSystem/SanSystem.csproj +++ b/SanSystem/SanSystem.csproj @@ -70,6 +70,12 @@ + + Form + + + FrmKalibrierungFestlegung.cs + Form @@ -116,12 +122,21 @@ UCInliner.cs + + UserControl + + + UCLinerGrundlagen.cs + UserControl UCSchachtanbindung.cs + + FrmKalibrierungFestlegung.cs + frmObjektEdit.cs @@ -152,6 +167,9 @@ UCInliner.cs + + UCLinerGrundlagen.cs + UCSchachtanbindung.cs diff --git a/SanSystem/UCInliner.Designer.cs b/SanSystem/UCInliner.Designer.cs index 359a77c..d4e9980 100644 --- a/SanSystem/UCInliner.Designer.cs +++ b/SanSystem/UCInliner.Designer.cs @@ -50,37 +50,14 @@ this.cb_stvo = new System.Windows.Forms.CheckBox(); this.cb_wasserhaltung = new System.Windows.Forms.CheckBox(); this.cb_genehmigung = new System.Windows.Forms.CheckBox(); - this.tabPage3 = new System.Windows.Forms.TabPage(); - this.txt_liner = new System.Windows.Forms.TextBox(); - this.txt_harzbedarf = new System.Windows.Forms.TextBox(); - this.txt_harz = new System.Windows.Forms.TextBox(); - this.txt_charge_liner = new System.Windows.Forms.TextBox(); - this.txt_charge_harz = new System.Windows.Forms.TextBox(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.dt_kalibrierdatum = new System.Windows.Forms.DateTimePicker(); - this.txt_vakuum = new System.Windows.Forms.TextBox(); - this.txt_temp_harz = new System.Windows.Forms.TextBox(); - this.txt_walze_distance = new System.Windows.Forms.TextBox(); - this.label17 = new System.Windows.Forms.Label(); - this.label14 = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.label15 = new System.Windows.Forms.Label(); - this.label13 = new System.Windows.Forms.Label(); - this.label12 = new System.Windows.Forms.Label(); - this.label11 = new System.Windows.Forms.Label(); - this.label10 = new System.Windows.Forms.Label(); - this.label9 = new System.Windows.Forms.Label(); this.tabControl1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.groupBox3.SuspendLayout(); - this.tabPage3.SuspendLayout(); - this.groupBox1.SuspendLayout(); this.SuspendLayout(); // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage2); - this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Location = new System.Drawing.Point(4, 0); this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tabControl1.Name = "tabControl1"; @@ -206,7 +183,7 @@ this.groupBox3.Size = new System.Drawing.Size(485, 131); this.groupBox3.TabIndex = 7; this.groupBox3.TabStop = false; - this.groupBox3.Text = "groupBox3"; + this.groupBox3.Text = "Temperatur"; // // btn_get_temp // @@ -322,228 +299,6 @@ this.cb_genehmigung.Text = "Genehmigung wurde eingeholt"; this.cb_genehmigung.UseVisualStyleBackColor = true; // - // tabPage3 - // - this.tabPage3.Controls.Add(this.txt_liner); - this.tabPage3.Controls.Add(this.txt_harzbedarf); - this.tabPage3.Controls.Add(this.txt_harz); - this.tabPage3.Controls.Add(this.txt_charge_liner); - this.tabPage3.Controls.Add(this.txt_charge_harz); - this.tabPage3.Controls.Add(this.groupBox1); - this.tabPage3.Controls.Add(this.label13); - this.tabPage3.Controls.Add(this.label12); - this.tabPage3.Controls.Add(this.label11); - this.tabPage3.Controls.Add(this.label10); - this.tabPage3.Controls.Add(this.label9); - this.tabPage3.Location = new System.Drawing.Point(4, 29); - this.tabPage3.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.tabPage3.Size = new System.Drawing.Size(1123, 579); - this.tabPage3.TabIndex = 2; - this.tabPage3.Text = "LinerGrundlagen"; - this.tabPage3.UseVisualStyleBackColor = true; - // - // txt_liner - // - this.txt_liner.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_liner.Location = new System.Drawing.Point(162, 148); - this.txt_liner.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_liner.Name = "txt_liner"; - this.txt_liner.Size = new System.Drawing.Size(148, 26); - this.txt_liner.TabIndex = 23; - // - // txt_harzbedarf - // - this.txt_harzbedarf.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_harzbedarf.Location = new System.Drawing.Point(162, 97); - this.txt_harzbedarf.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_harzbedarf.Name = "txt_harzbedarf"; - this.txt_harzbedarf.Size = new System.Drawing.Size(148, 26); - this.txt_harzbedarf.TabIndex = 22; - // - // txt_harz - // - this.txt_harz.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_harz.Location = new System.Drawing.Point(162, 43); - this.txt_harz.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_harz.Name = "txt_harz"; - this.txt_harz.Size = new System.Drawing.Size(148, 26); - this.txt_harz.TabIndex = 20; - // - // txt_charge_liner - // - this.txt_charge_liner.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_charge_liner.Location = new System.Drawing.Point(558, 148); - this.txt_charge_liner.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_charge_liner.Name = "txt_charge_liner"; - this.txt_charge_liner.Size = new System.Drawing.Size(300, 26); - this.txt_charge_liner.TabIndex = 24; - // - // txt_charge_harz - // - this.txt_charge_harz.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_charge_harz.Location = new System.Drawing.Point(558, 46); - this.txt_charge_harz.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_charge_harz.Name = "txt_charge_harz"; - this.txt_charge_harz.Size = new System.Drawing.Size(300, 26); - this.txt_charge_harz.TabIndex = 21; - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.dt_kalibrierdatum); - this.groupBox1.Controls.Add(this.txt_vakuum); - this.groupBox1.Controls.Add(this.txt_temp_harz); - this.groupBox1.Controls.Add(this.txt_walze_distance); - this.groupBox1.Controls.Add(this.label17); - this.groupBox1.Controls.Add(this.label14); - this.groupBox1.Controls.Add(this.label16); - this.groupBox1.Controls.Add(this.label15); - this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.groupBox1.Location = new System.Drawing.Point(40, 228); - this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.groupBox1.Size = new System.Drawing.Size(688, 278); - this.groupBox1.TabIndex = 9; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Kalibrierung"; - // - // dt_kalibrierdatum - // - this.dt_kalibrierdatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.dt_kalibrierdatum.Location = new System.Drawing.Point(212, 48); - this.dt_kalibrierdatum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.dt_kalibrierdatum.Name = "dt_kalibrierdatum"; - this.dt_kalibrierdatum.Size = new System.Drawing.Size(283, 26); - this.dt_kalibrierdatum.TabIndex = 25; - // - // txt_vakuum - // - this.txt_vakuum.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_vakuum.Location = new System.Drawing.Point(518, 118); - this.txt_vakuum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_vakuum.Name = "txt_vakuum"; - this.txt_vakuum.Size = new System.Drawing.Size(148, 26); - this.txt_vakuum.TabIndex = 27; - // - // txt_temp_harz - // - this.txt_temp_harz.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_temp_harz.Location = new System.Drawing.Point(212, 232); - this.txt_temp_harz.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_temp_harz.Name = "txt_temp_harz"; - this.txt_temp_harz.Size = new System.Drawing.Size(148, 26); - this.txt_temp_harz.TabIndex = 28; - // - // txt_walze_distance - // - this.txt_walze_distance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_walze_distance.Location = new System.Drawing.Point(212, 118); - this.txt_walze_distance.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txt_walze_distance.Name = "txt_walze_distance"; - this.txt_walze_distance.Size = new System.Drawing.Size(148, 26); - this.txt_walze_distance.TabIndex = 26; - // - // label17 - // - this.label17.AutoSize = true; - this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label17.Location = new System.Drawing.Point(406, 123); - this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(68, 20); - this.label17.TabIndex = 8; - this.label17.Text = "Vakuum"; - // - // label14 - // - this.label14.AutoSize = true; - this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label14.Location = new System.Drawing.Point(9, 235); - this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(129, 20); - this.label14.TabIndex = 5; - this.label14.Text = "Temperatur Harz"; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label16.Location = new System.Drawing.Point(3, 123); - this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(127, 20); - this.label16.TabIndex = 7; - this.label16.Text = "Walzen-Abstand"; - // - // label15 - // - this.label15.AutoSize = true; - this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label15.Location = new System.Drawing.Point(3, 48); - this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(166, 20); - this.label15.TabIndex = 6; - this.label15.Text = "Datum der Kalibierung"; - // - // label13 - // - this.label13.AutoSize = true; - this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.Location = new System.Drawing.Point(368, 154); - this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(126, 20); - this.label13.TabIndex = 4; - this.label13.Text = "Charge-Nummer"; - // - // label12 - // - this.label12.AutoSize = true; - this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label12.Location = new System.Drawing.Point(36, 154); - this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(44, 20); - this.label12.TabIndex = 3; - this.label12.Text = "Liner"; - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label11.Location = new System.Drawing.Point(36, 100); - this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(110, 20); - this.label11.TabIndex = 2; - this.label11.Text = "Harzbedarf /m"; - // - // label10 - // - this.label10.AutoSize = true; - this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.Location = new System.Drawing.Point(368, 46); - this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(126, 20); - this.label10.TabIndex = 1; - this.label10.Text = "Charge-Nummer"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.Location = new System.Drawing.Point(36, 46); - this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(43, 20); - this.label9.TabIndex = 0; - this.label9.Text = "Harz"; - // // UCInliner // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); @@ -559,10 +314,6 @@ this.tabPage2.PerformLayout(); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); - this.tabPage3.ResumeLayout(false); - this.tabPage3.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); this.ResumeLayout(false); } @@ -577,26 +328,6 @@ private System.Windows.Forms.CheckBox cb_genehmigung; private System.Windows.Forms.Label label8; private System.Windows.Forms.Label label7; - private System.Windows.Forms.TabPage tabPage3; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Label label17; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label12; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox txt_liner; - private System.Windows.Forms.TextBox txt_harzbedarf; - private System.Windows.Forms.TextBox txt_harz; - private System.Windows.Forms.TextBox txt_charge_liner; - private System.Windows.Forms.TextBox txt_charge_harz; - private System.Windows.Forms.DateTimePicker dt_kalibrierdatum; - private System.Windows.Forms.TextBox txt_vakuum; - private System.Windows.Forms.TextBox txt_temp_harz; - private System.Windows.Forms.TextBox txt_walze_distance; private System.Windows.Forms.GroupBox groupBox3; private System.Windows.Forms.Button btn_get_temp; private System.Windows.Forms.TextBox txt_temp_kanal; diff --git a/SanSystem/UCInliner.cs b/SanSystem/UCInliner.cs index 4b4f9ff..22e7d0e 100644 --- a/SanSystem/UCInliner.cs +++ b/SanSystem/UCInliner.cs @@ -27,11 +27,18 @@ namespace SanSystem } InlinerSanierung inliner = null; string destinationPath = string.Empty; + UCLinerGrundlagen UCLinerGrundlagen = null; List filenames = new List(); public UCInliner(InlinerSanierung san) { InitializeComponent(); inliner = san; + UCLinerGrundlagen = new UCLinerGrundlagen(san); + + TabPage tab = new TabPage("Linergrundlagen"); + UCLinerGrundlagen.Dock = DockStyle.Fill; + tab.Controls.Add(UCLinerGrundlagen); + tabControl1.TabPages.Add(tab); } private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) @@ -43,23 +50,8 @@ namespace SanSystem { case (int)TabPages.LINERGRUNDLAGEN: - txt_walze_distance.DataBindings.Clear(); - txt_vakuum.DataBindings.Clear(); - txt_temp_harz.DataBindings.Clear(); - txt_charge_harz.DataBindings.Clear(); - txt_charge_liner.DataBindings.Clear(); - dt_kalibrierdatum.DataBindings.Clear(); - txt_liner.DataBindings.Clear(); - txt_harz.DataBindings.Clear(); - - txt_harz.DataBindings.Add(new Binding("Text", inliner, "HarzTyp")); - txt_liner.DataBindings.Add(new Binding("Text", inliner, "LinerTyp")); - txt_walze_distance.DataBindings.Add(new Binding("Text", inliner, "KalibierWalzenAbstand")); - txt_vakuum.DataBindings.Add(new Binding("Text", inliner, "KalibrierUnterdruck")); - txt_temp_harz.DataBindings.Add(new Binding("Text", inliner, "HarzKalibrierTemperatur")); - txt_charge_harz.DataBindings.Add(new Binding("Text", inliner, "HarzChargenummer")); - txt_charge_liner.DataBindings.Add(new Binding("Text", inliner, "LinerChargenummer")); - dt_kalibrierdatum.DataBindings.Add(new Binding("Value", inliner, "DatumKalibrierung")); + + break; } } diff --git a/SanSystem/UCLinerGrundlagen.Designer.cs b/SanSystem/UCLinerGrundlagen.Designer.cs index 05e00e0..5af7e4f 100644 --- a/SanSystem/UCLinerGrundlagen.Designer.cs +++ b/SanSystem/UCLinerGrundlagen.Designer.cs @@ -47,6 +47,7 @@ this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); + this.btn_save_for_liners = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // @@ -80,7 +81,7 @@ // txt_charge_liner // this.txt_charge_liner.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_charge_liner.Location = new System.Drawing.Point(530, 117); + this.txt_charge_liner.Location = new System.Drawing.Point(422, 117); this.txt_charge_liner.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_charge_liner.Name = "txt_charge_liner"; this.txt_charge_liner.Size = new System.Drawing.Size(300, 26); @@ -89,7 +90,7 @@ // txt_charge_harz // this.txt_charge_harz.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_charge_harz.Location = new System.Drawing.Point(530, 15); + this.txt_charge_harz.Location = new System.Drawing.Point(424, 12); this.txt_charge_harz.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_charge_harz.Name = "txt_charge_harz"; this.txt_charge_harz.Size = new System.Drawing.Size(300, 26); @@ -97,6 +98,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.btn_save_for_liners); this.groupBox1.Controls.Add(this.dt_kalibrierdatum); this.groupBox1.Controls.Add(this.txt_vakuum); this.groupBox1.Controls.Add(this.txt_temp_harz); @@ -106,7 +108,7 @@ this.groupBox1.Controls.Add(this.label16); this.groupBox1.Controls.Add(this.label15); this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.groupBox1.Location = new System.Drawing.Point(12, 197); + this.groupBox1.Location = new System.Drawing.Point(12, 153); this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.groupBox1.Name = "groupBox1"; this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); @@ -118,7 +120,7 @@ // dt_kalibrierdatum // this.dt_kalibrierdatum.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.dt_kalibrierdatum.Location = new System.Drawing.Point(212, 48); + this.dt_kalibrierdatum.Location = new System.Drawing.Point(182, 27); this.dt_kalibrierdatum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.dt_kalibrierdatum.Name = "dt_kalibrierdatum"; this.dt_kalibrierdatum.Size = new System.Drawing.Size(283, 26); @@ -127,7 +129,7 @@ // txt_vakuum // this.txt_vakuum.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_vakuum.Location = new System.Drawing.Point(518, 118); + this.txt_vakuum.Location = new System.Drawing.Point(375, 93); this.txt_vakuum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_vakuum.Name = "txt_vakuum"; this.txt_vakuum.Size = new System.Drawing.Size(148, 26); @@ -136,7 +138,7 @@ // txt_temp_harz // this.txt_temp_harz.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_temp_harz.Location = new System.Drawing.Point(212, 232); + this.txt_temp_harz.Location = new System.Drawing.Point(145, 143); this.txt_temp_harz.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_temp_harz.Name = "txt_temp_harz"; this.txt_temp_harz.Size = new System.Drawing.Size(148, 26); @@ -145,7 +147,7 @@ // txt_walze_distance // this.txt_walze_distance.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_walze_distance.Location = new System.Drawing.Point(212, 118); + this.txt_walze_distance.Location = new System.Drawing.Point(143, 93); this.txt_walze_distance.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_walze_distance.Name = "txt_walze_distance"; this.txt_walze_distance.Size = new System.Drawing.Size(148, 26); @@ -155,7 +157,7 @@ // this.label17.AutoSize = true; this.label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label17.Location = new System.Drawing.Point(406, 123); + this.label17.Location = new System.Drawing.Point(299, 96); this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(68, 20); @@ -166,7 +168,7 @@ // this.label14.AutoSize = true; this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label14.Location = new System.Drawing.Point(9, 235); + this.label14.Location = new System.Drawing.Point(8, 146); this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label14.Name = "label14"; this.label14.Size = new System.Drawing.Size(129, 20); @@ -177,7 +179,7 @@ // this.label16.AutoSize = true; this.label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label16.Location = new System.Drawing.Point(3, 123); + this.label16.Location = new System.Drawing.Point(8, 96); this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(127, 20); @@ -188,7 +190,7 @@ // this.label15.AutoSize = true; this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label15.Location = new System.Drawing.Point(3, 48); + this.label15.Location = new System.Drawing.Point(8, 27); this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(166, 20); @@ -199,7 +201,7 @@ // this.label13.AutoSize = true; this.label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label13.Location = new System.Drawing.Point(340, 123); + this.label13.Location = new System.Drawing.Point(290, 120); this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label13.Name = "label13"; this.label13.Size = new System.Drawing.Size(126, 20); @@ -232,7 +234,7 @@ // this.label10.AutoSize = true; this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label10.Location = new System.Drawing.Point(340, 15); + this.label10.Location = new System.Drawing.Point(290, 12); this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(126, 20); @@ -250,10 +252,21 @@ this.label9.TabIndex = 25; this.label9.Text = "Harz"; // + // btn_save_for_liners + // + this.btn_save_for_liners.Location = new System.Drawing.Point(546, 44); + this.btn_save_for_liners.Name = "btn_save_for_liners"; + this.btn_save_for_liners.Size = new System.Drawing.Size(113, 166); + this.btn_save_for_liners.TabIndex = 29; + this.btn_save_for_liners.Text = "button1"; + this.btn_save_for_liners.UseVisualStyleBackColor = true; + this.btn_save_for_liners.Click += new System.EventHandler(this.btn_save_for_liners_Click); + // // UCLinerGrundlagen // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Window; this.Controls.Add(this.txt_liner); this.Controls.Add(this.txt_harzbedarf); this.Controls.Add(this.txt_harz); @@ -266,7 +279,8 @@ this.Controls.Add(this.label10); this.Controls.Add(this.label9); this.Name = "UCLinerGrundlagen"; - this.Size = new System.Drawing.Size(847, 503); + this.Size = new System.Drawing.Size(731, 456); + this.Load += new System.EventHandler(this.UCLinerGrundlagen_Load); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); this.ResumeLayout(false); @@ -295,5 +309,6 @@ private System.Windows.Forms.Label label11; private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label9; + private System.Windows.Forms.Button btn_save_for_liners; } } diff --git a/SanSystem/UCLinerGrundlagen.cs b/SanSystem/UCLinerGrundlagen.cs index b11e32d..47b706e 100644 --- a/SanSystem/UCLinerGrundlagen.cs +++ b/SanSystem/UCLinerGrundlagen.cs @@ -7,14 +7,92 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using KlassenBIB; namespace SanSystem { public partial class UCLinerGrundlagen : UserControl { + InlinerSanierung inliner = null; + public List inspektionsobjekts = null; + public UCLinerGrundlagen(InlinerSanierung inliner) + { + InitializeComponent(); + this.inliner = inliner; + } + public UCLinerGrundlagen() { InitializeComponent(); } + + + + private void UCLinerGrundlagen_Load(object sender, EventArgs e) + { + if(inliner != null) + { + btn_save_for_liners.Visible = btn_save_for_liners.Enabled = false; + txt_walze_distance.DataBindings.Clear(); + txt_vakuum.DataBindings.Clear(); + txt_temp_harz.DataBindings.Clear(); + txt_charge_harz.DataBindings.Clear(); + txt_charge_liner.DataBindings.Clear(); + dt_kalibrierdatum.DataBindings.Clear(); + txt_liner.DataBindings.Clear(); + txt_harz.DataBindings.Clear(); + + txt_harz.DataBindings.Add(new Binding("Text", inliner, "HarzTyp")); + txt_liner.DataBindings.Add(new Binding("Text", inliner, "LinerTyp")); + txt_walze_distance.DataBindings.Add(new Binding("Text", inliner, "KalibierWalzenAbstand")); + txt_vakuum.DataBindings.Add(new Binding("Text", inliner, "KalibrierUnterdruck")); + txt_temp_harz.DataBindings.Add(new Binding("Text", inliner, "HarzKalibrierTemperatur")); + txt_charge_harz.DataBindings.Add(new Binding("Text", inliner, "HarzChargenummer")); + txt_charge_liner.DataBindings.Add(new Binding("Text", inliner, "LinerChargenummer")); + dt_kalibrierdatum.DataBindings.Add(new Binding("Value", inliner, "DatumKalibrierung")); + } + + } + + private void btn_save_for_liners_Click(object sender, EventArgs e) + { + if (inliner != null) return; + if (inspektionsobjekts == null) throw new Exception("Inspektionsobjekte sind null"); + + double walzenabstand = double.Parse(txt_walze_distance.Text); + double vakuum = double.Parse(txt_vakuum.Text); + double temp_harz = double.Parse(txt_temp_harz.Text); + string charge_harz = txt_charge_harz.Text; + string charge_liner = txt_charge_liner.Text; + DateTime kalidatum = dt_kalibrierdatum.Value; + string harztyp = txt_harz.Text; + string linertyp = txt_liner.Text; + + foreach(Inspektionsobjekt iObj in inspektionsobjekts) + { + bool hasAllInliner = false; + for(int i = 0; i < iObj.Sanierung.Count; i++) + { + if (iObj.Sanierung[i] is InlinerSanierung) + { + hasAllInliner = true; + break; + } + } + if (hasAllInliner) continue; + InlinerSanierung inlinerSanierung = new InlinerSanierung(); + inlinerSanierung.DatumKalibrierung = kalidatum; + inlinerSanierung.HarzChargenummer = charge_harz; + inlinerSanierung.HarzKalibrierTemperatur = temp_harz; + inlinerSanierung.HarzTyp = harztyp; + inlinerSanierung.LinerTyp = linertyp; + inlinerSanierung.LinerChargenummer = charge_liner; + inlinerSanierung.KalibierWalzenAbstand = walzenabstand; + inlinerSanierung.KalibrierUnterdruck = vakuum; + inlinerSanierung.Inspektionsobjekt = iObj; + iObj.Sanierung.Add(inlinerSanierung); + } + + } } } diff --git a/SanSystem/frmObjektEdit.Designer.cs b/SanSystem/frmObjektEdit.Designer.cs index 8888ac9..c96bbcd 100644 --- a/SanSystem/frmObjektEdit.Designer.cs +++ b/SanSystem/frmObjektEdit.Designer.cs @@ -213,7 +213,7 @@ this.groupBox2.Size = new System.Drawing.Size(375, 203); this.groupBox2.TabIndex = 21; this.groupBox2.TabStop = false; - this.groupBox2.Text = "groupBox2"; + this.groupBox2.Text = "Längen"; // // txt_haltungslaenge // diff --git a/SanSystem/frmObjekteList.Designer.cs b/SanSystem/frmObjekteList.Designer.cs index 1d9164f..fbbcfa6 100644 --- a/SanSystem/frmObjekteList.Designer.cs +++ b/SanSystem/frmObjekteList.Designer.cs @@ -252,6 +252,7 @@ this.btn_set_kali.TabIndex = 19; this.btn_set_kali.Text = "Ausgewählte mit Linergrundlagen versehen"; this.btn_set_kali.UseVisualStyleBackColor = true; + this.btn_set_kali.Click += new System.EventHandler(this.btn_set_kali_Click); // // frmObjekteList // diff --git a/SanSystem/frmObjekteList.cs b/SanSystem/frmObjekteList.cs index c1337d8..61afca5 100644 --- a/SanSystem/frmObjekteList.cs +++ b/SanSystem/frmObjekteList.cs @@ -23,12 +23,7 @@ namespace SanSystem private void loadObjekte(string streetname) { - DataGridViewCheckBoxColumn checkBoxColumn = new DataGridViewCheckBoxColumn(); - checkBoxColumn.Name = "Auswahl"; - checkBoxColumn.HeaderText = "Auswahl"; - //checkBoxColumn.Width = objecteListSetting.configuration["Auswahl"]; - - dGObjekte.Columns.Add(checkBoxColumn); + dGObjekte.DataSource = null; inspektionsobjekte = Datenbank.Instance.loadedProjekt.Objekte.FindAll(x => x.StrasseName.Equals(streetname)); @@ -72,7 +67,12 @@ namespace SanSystem public frmObjekteList(string streetname) { InitializeComponent(); + DataGridViewCheckBoxColumn checkBoxColumn = new DataGridViewCheckBoxColumn(); + checkBoxColumn.Name = "Auswahl"; + checkBoxColumn.HeaderText = "Auswahl"; + //checkBoxColumn.Width = objecteListSetting.configuration["Auswahl"]; + dGObjekte.Columns.Add(checkBoxColumn); lbl_ort.Text = Global.Instance.language.Labels["ort"]; lbl_projekt.Text = Global.Instance.language.Labels["projekt"]; lbl_street.Text = Global.Instance.language.Labels["street"]; @@ -287,5 +287,38 @@ namespace SanSystem dataTable.Columns.Add(dataColumn); return dataTable; } + + private void btn_set_kali_Click(object sender, EventArgs e) + { + List ausdruck = new List(); + + DataGridViewCheckBoxCell checkBoxCell = null; + + foreach (DataGridViewRow dr in dGObjekte.Rows) + { + checkBoxCell = (DataGridViewCheckBoxCell)dr.Cells["Auswahl"]; + if (checkBoxCell == null) break; + if (checkBoxCell.Value == null) continue; + if ((bool)checkBoxCell.Value) + { + Inspektionsobjekt objekt = (dr.DataBoundItem as Inspektionsobjekt); + bool bereitsVorhanden = false; + foreach(Sanierung san in objekt.Sanierung) + { + if(san is InlinerSanierung) + { + bereitsVorhanden = true; + break; + } + } + if(!bereitsVorhanden) + ausdruck.Add(objekt); + } + } + + if (ausdruck.Count <= 0) return; + FrmKalibrierungFestlegung frmKalibrierungFestlegung = new FrmKalibrierungFestlegung(ausdruck); + frmKalibrierungFestlegung.ShowDialog(); + } } }