Preliner auswahl + MassenStatistik berechnung hinzugefügt

This commit is contained in:
Husky
2019-05-31 23:00:36 +02:00
parent 1cae6bbb7a
commit 7656f0d7b7
4 changed files with 51 additions and 38 deletions

View File

@@ -42,20 +42,9 @@ namespace SanSystem
{
DataRow dr = inliner.NewRow();
dr["hausnummer"] = objekt.Hausnummer;
/*if(objekt.HaltungGemessen.Day == targetDatum.Day &&
objekt.HaltungGemessen.Month == targetDatum.Month &&
objekt.HaltungGemessen.Year == targetDatum.Year)
/*{
dr["vorbereitet"] = "ja";
}
else
{
dr["vorbereitet"] = "nein am " + objekt.HaltungGemessen.ToShortDateString();
}*/
//{
dr["vorbereitet"] = "am " + objekt.HaltungGemessen.ToShortDateString();
//}
int schachtanbindungen = 0;
foreach (Sanieren mainsan in objekt.Sanierung)
{
@@ -71,7 +60,7 @@ namespace SanSystem
gesamtLiner += linerLang;
dr["liner_laenge"] = ConvertToDecimals(linerLang);
dr["kalibrierschlauch"] = ConvertToDecimals(objekt.Haltungslaenge + (objekt.Schachtlaenge * 2) + 0.3);
dr["preliner"] = ConvertToDecimals(linerLang - 0.5);
dr["preliner"] = (mainsan as InlinerSanierung).Preliner ? ConvertToDecimals(linerLang - 0.5): ConvertToDecimals(0.0);
dr["harzmenge"] = ConvertToDecimals(objekt.Haltungslaenge * (mainsan as InlinerSanierung).HarzBedarf);
gesamtHarz += objekt.Haltungslaenge * (mainsan as InlinerSanierung).Harzbedarf;
}

View File

@@ -53,6 +53,7 @@
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.cb_preliner = new System.Windows.Forms.CheckBox();
this.tabControl1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -75,6 +76,7 @@
//
// tabPage2
//
this.tabPage2.Controls.Add(this.cb_preliner);
this.tabPage2.Controls.Add(this.txt_besatzung);
this.tabPage2.Controls.Add(this.label2);
this.tabPage2.Controls.Add(this.groupBox1);
@@ -90,11 +92,11 @@
this.tabPage2.Controls.Add(this.cb_stvo);
this.tabPage2.Controls.Add(this.cb_wasserhaltung);
this.tabPage2.Controls.Add(this.cb_genehmigung);
this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Location = new System.Drawing.Point(4, 34);
this.tabPage2.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage2.Size = new System.Drawing.Size(1328, 579);
this.tabPage2.Size = new System.Drawing.Size(1328, 574);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Vorraussetzungen";
this.tabPage2.UseVisualStyleBackColor = true;
@@ -103,7 +105,7 @@
//
this.txt_besatzung.Location = new System.Drawing.Point(551, 192);
this.txt_besatzung.Name = "txt_besatzung";
this.txt_besatzung.Size = new System.Drawing.Size(296, 26);
this.txt_besatzung.Size = new System.Drawing.Size(296, 30);
this.txt_besatzung.TabIndex = 37;
//
// label2
@@ -111,7 +113,7 @@
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(392, 195);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(86, 20);
this.label2.Size = new System.Drawing.Size(105, 25);
this.label2.TabIndex = 36;
this.label2.Text = "Besatzung";
//
@@ -120,7 +122,7 @@
this.groupBox1.Controls.Add(this.cb_mech);
this.groupBox1.Controls.Add(this.cb_roboter);
this.groupBox1.Controls.Add(this.cb_hd);
this.groupBox1.Location = new System.Drawing.Point(8, 123);
this.groupBox1.Location = new System.Drawing.Point(7, 165);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(357, 125);
this.groupBox1.TabIndex = 35;
@@ -132,7 +134,7 @@
this.cb_mech.AutoSize = true;
this.cb_mech.Location = new System.Drawing.Point(6, 90);
this.cb_mech.Name = "cb_mech";
this.cb_mech.Size = new System.Drawing.Size(113, 24);
this.cb_mech.Size = new System.Drawing.Size(140, 29);
this.cb_mech.TabIndex = 2;
this.cb_mech.Text = "Mechanisch";
this.cb_mech.UseVisualStyleBackColor = true;
@@ -142,7 +144,7 @@
this.cb_roboter.AutoSize = true;
this.cb_roboter.Location = new System.Drawing.Point(6, 60);
this.cb_roboter.Name = "cb_roboter";
this.cb_roboter.Size = new System.Drawing.Size(86, 24);
this.cb_roboter.Size = new System.Drawing.Size(102, 29);
this.cb_roboter.TabIndex = 1;
this.cb_roboter.Text = "Roboter";
this.cb_roboter.UseVisualStyleBackColor = true;
@@ -154,7 +156,7 @@
this.cb_hd.CheckState = System.Windows.Forms.CheckState.Checked;
this.cb_hd.Location = new System.Drawing.Point(6, 29);
this.cb_hd.Name = "cb_hd";
this.cb_hd.Size = new System.Drawing.Size(56, 24);
this.cb_hd.Size = new System.Drawing.Size(67, 29);
this.cb_hd.TabIndex = 0;
this.cb_hd.Text = "HD ";
this.cb_hd.UseVisualStyleBackColor = true;
@@ -171,14 +173,14 @@
//
// ftpProgress
//
this.ftpProgress.Location = new System.Drawing.Point(141, 412);
this.ftpProgress.Location = new System.Drawing.Point(140, 454);
this.ftpProgress.Name = "ftpProgress";
this.ftpProgress.Size = new System.Drawing.Size(280, 37);
this.ftpProgress.TabIndex = 29;
//
// btn_transfer_ftp
//
this.btn_transfer_ftp.Location = new System.Drawing.Point(141, 254);
this.btn_transfer_ftp.Location = new System.Drawing.Point(140, 296);
this.btn_transfer_ftp.Name = "btn_transfer_ftp";
this.btn_transfer_ftp.Size = new System.Drawing.Size(224, 126);
this.btn_transfer_ftp.TabIndex = 28;
@@ -191,7 +193,7 @@
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(392, 165);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(108, 20);
this.label1.Size = new System.Drawing.Size(132, 25);
this.label1.TabIndex = 27;
this.label1.Text = "Eingebaut am";
//
@@ -199,7 +201,7 @@
//
this.dt_eingebaut.Location = new System.Drawing.Point(556, 160);
this.dt_eingebaut.Name = "dt_eingebaut";
this.dt_eingebaut.Size = new System.Drawing.Size(291, 26);
this.dt_eingebaut.Size = new System.Drawing.Size(291, 30);
this.dt_eingebaut.TabIndex = 26;
//
// cb_fertig
@@ -207,9 +209,9 @@
this.cb_fertig.AutoSize = true;
this.cb_fertig.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cb_fertig.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cb_fertig.Location = new System.Drawing.Point(14, 281);
this.cb_fertig.Location = new System.Drawing.Point(13, 323);
this.cb_fertig.Name = "cb_fertig";
this.cb_fertig.Size = new System.Drawing.Size(100, 35);
this.cb_fertig.Size = new System.Drawing.Size(122, 43);
this.cb_fertig.TabIndex = 25;
this.cb_fertig.Text = "Fertig";
this.cb_fertig.UseVisualStyleBackColor = true;
@@ -225,7 +227,7 @@
"Schnee - Eisschmelze"});
this.cbb_wetter.Location = new System.Drawing.Point(551, 224);
this.cbb_wetter.Name = "cbb_wetter";
this.cbb_wetter.Size = new System.Drawing.Size(282, 28);
this.cbb_wetter.Size = new System.Drawing.Size(282, 33);
this.cbb_wetter.TabIndex = 23;
//
// label24
@@ -234,7 +236,7 @@
this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label24.Location = new System.Drawing.Point(392, 228);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(57, 20);
this.label24.Size = new System.Drawing.Size(70, 25);
this.label24.TabIndex = 24;
this.label24.Text = "Wetter";
//
@@ -266,14 +268,14 @@
//
this.txt_temp_kanal.Location = new System.Drawing.Point(114, 77);
this.txt_temp_kanal.Name = "txt_temp_kanal";
this.txt_temp_kanal.Size = new System.Drawing.Size(100, 26);
this.txt_temp_kanal.Size = new System.Drawing.Size(100, 30);
this.txt_temp_kanal.TabIndex = 18;
//
// txt_temp_aussen
//
this.txt_temp_aussen.Location = new System.Drawing.Point(114, 34);
this.txt_temp_aussen.Name = "txt_temp_aussen";
this.txt_temp_aussen.Size = new System.Drawing.Size(100, 26);
this.txt_temp_aussen.Size = new System.Drawing.Size(100, 30);
this.txt_temp_aussen.TabIndex = 17;
//
// label23
@@ -281,7 +283,7 @@
this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(15, 80);
this.label23.Name = "label23";
this.label23.Size = new System.Drawing.Size(49, 20);
this.label23.Size = new System.Drawing.Size(63, 25);
this.label23.TabIndex = 1;
this.label23.Text = "Kanal";
//
@@ -290,7 +292,7 @@
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(15, 34);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(63, 20);
this.label22.Size = new System.Drawing.Size(79, 25);
this.label22.TabIndex = 0;
this.label22.Text = "Aussen";
//
@@ -303,7 +305,7 @@
this.cb_stvo.Location = new System.Drawing.Point(8, 91);
this.cb_stvo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_stvo.Name = "cb_stvo";
this.cb_stvo.Size = new System.Drawing.Size(263, 24);
this.cb_stvo.Size = new System.Drawing.Size(323, 29);
this.cb_stvo.TabIndex = 16;
this.cb_stvo.Text = "Es wurde nach StVO abgesichert";
this.cb_stvo.UseVisualStyleBackColor = true;
@@ -317,7 +319,7 @@
this.cb_wasserhaltung.Location = new System.Drawing.Point(8, 57);
this.cb_wasserhaltung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_wasserhaltung.Name = "cb_wasserhaltung";
this.cb_wasserhaltung.Size = new System.Drawing.Size(269, 24);
this.cb_wasserhaltung.Size = new System.Drawing.Size(329, 29);
this.cb_wasserhaltung.TabIndex = 15;
this.cb_wasserhaltung.Text = "Wasserhaltung wurde eingerichtet";
this.cb_wasserhaltung.UseVisualStyleBackColor = true;
@@ -331,14 +333,28 @@
this.cb_genehmigung.Location = new System.Drawing.Point(8, 23);
this.cb_genehmigung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_genehmigung.Name = "cb_genehmigung";
this.cb_genehmigung.Size = new System.Drawing.Size(245, 24);
this.cb_genehmigung.Size = new System.Drawing.Size(299, 29);
this.cb_genehmigung.TabIndex = 14;
this.cb_genehmigung.Text = "Genehmigung wurde eingeholt";
this.cb_genehmigung.UseVisualStyleBackColor = true;
//
// cb_preliner
//
this.cb_preliner.AutoSize = true;
this.cb_preliner.Checked = true;
this.cb_preliner.CheckState = System.Windows.Forms.CheckState.Checked;
this.cb_preliner.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cb_preliner.Location = new System.Drawing.Point(8, 130);
this.cb_preliner.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_preliner.Name = "cb_preliner";
this.cb_preliner.Size = new System.Drawing.Size(253, 29);
this.cb_preliner.TabIndex = 38;
this.cb_preliner.Text = "Preliner wurde verwendet";
this.cb_preliner.UseVisualStyleBackColor = true;
//
// UCInliner
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tabControl1);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -384,5 +400,6 @@
private System.Windows.Forms.CheckBox cb_hd;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txt_besatzung;
private System.Windows.Forms.CheckBox cb_preliner;
}
}

View File

@@ -73,9 +73,11 @@ namespace SanSystem
txt_temp_kanal.DataBindings.Clear();
cbb_wetter.DataBindings.Clear();
txt_besatzung.DataBindings.Clear();
cb_preliner.DataBindings.Clear();
txt_besatzung.DataBindings.Add(new Binding("Text", inliner, "Besatzung"));
cb_fertig.DataBindings.Add(new Binding("Checked", inliner, "fertig"));
cb_preliner.DataBindings.Add(new Binding("Checked", inliner, "Preliner"));
cbb_wetter.DataBindings.Add(new Binding("Text", inliner, "Wetter"));
if (inliner.Datum != null)
{