Bug behoben, wegen datum

es wird jetzt die gesamtliner maße und harzmenge ausgegeben
This commit is contained in:
Husky
2018-07-16 21:29:44 +02:00
parent e63929f403
commit b8c8a6cbfa
4 changed files with 41 additions and 25 deletions

View File

@@ -57,12 +57,15 @@
// //
// tabControl1 // tabControl1
// //
this.tabControl1.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.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(4, 0); this.tabControl1.Location = new System.Drawing.Point(4, 0);
this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0; this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1131, 612); this.tabControl1.Size = new System.Drawing.Size(1336, 612);
this.tabControl1.TabIndex = 0; this.tabControl1.TabIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
// //
@@ -83,11 +86,11 @@
this.tabPage2.Controls.Add(this.cb_stvo); this.tabPage2.Controls.Add(this.cb_stvo);
this.tabPage2.Controls.Add(this.cb_wasserhaltung); this.tabPage2.Controls.Add(this.cb_wasserhaltung);
this.tabPage2.Controls.Add(this.cb_genehmigung); 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.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tabPage2.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage2.Size = new System.Drawing.Size(1123, 579); this.tabPage2.Size = new System.Drawing.Size(1328, 574);
this.tabPage2.TabIndex = 1; this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "Vorraussetzungen"; this.tabPage2.Text = "Vorraussetzungen";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
@@ -124,7 +127,7 @@
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(47, 439); this.label1.Location = new System.Drawing.Point(47, 439);
this.label1.Name = "label1"; 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.TabIndex = 27;
this.label1.Text = "Eingebaut am"; this.label1.Text = "Eingebaut am";
// //
@@ -132,7 +135,7 @@
// //
this.dt_eingebaut.Location = new System.Drawing.Point(205, 434); this.dt_eingebaut.Location = new System.Drawing.Point(205, 434);
this.dt_eingebaut.Name = "dt_eingebaut"; 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; this.dt_eingebaut.TabIndex = 26;
// //
// cb_fertig // cb_fertig
@@ -142,7 +145,7 @@
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.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(573, 347); this.cb_fertig.Location = new System.Drawing.Point(573, 347);
this.cb_fertig.Name = "cb_fertig"; 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.TabIndex = 25;
this.cb_fertig.Text = "Fertig"; this.cb_fertig.Text = "Fertig";
this.cb_fertig.UseVisualStyleBackColor = true; this.cb_fertig.UseVisualStyleBackColor = true;
@@ -158,7 +161,7 @@
"Schnee - Eisschmelze"}); "Schnee - Eisschmelze"});
this.cbb_wetter.Location = new System.Drawing.Point(205, 348); this.cbb_wetter.Location = new System.Drawing.Point(205, 348);
this.cbb_wetter.Name = "cbb_wetter"; 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; this.cbb_wetter.TabIndex = 23;
// //
// label24 // label24
@@ -167,7 +170,7 @@
this.label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 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(8, 351); this.label24.Location = new System.Drawing.Point(8, 351);
this.label24.Name = "label24"; 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.TabIndex = 24;
this.label24.Text = "Wetter"; this.label24.Text = "Wetter";
// //
@@ -199,14 +202,14 @@
// //
this.txt_temp_kanal.Location = new System.Drawing.Point(114, 77); this.txt_temp_kanal.Location = new System.Drawing.Point(114, 77);
this.txt_temp_kanal.Name = "txt_temp_kanal"; 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; this.txt_temp_kanal.TabIndex = 18;
// //
// txt_temp_aussen // txt_temp_aussen
// //
this.txt_temp_aussen.Location = new System.Drawing.Point(114, 34); this.txt_temp_aussen.Location = new System.Drawing.Point(114, 34);
this.txt_temp_aussen.Name = "txt_temp_aussen"; 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; this.txt_temp_aussen.TabIndex = 17;
// //
// label23 // label23
@@ -214,7 +217,7 @@
this.label23.AutoSize = true; this.label23.AutoSize = true;
this.label23.Location = new System.Drawing.Point(15, 80); this.label23.Location = new System.Drawing.Point(15, 80);
this.label23.Name = "label23"; 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.TabIndex = 1;
this.label23.Text = "Kanal"; this.label23.Text = "Kanal";
// //
@@ -223,7 +226,7 @@
this.label22.AutoSize = true; this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(15, 34); this.label22.Location = new System.Drawing.Point(15, 34);
this.label22.Name = "label22"; 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.TabIndex = 0;
this.label22.Text = "Aussen"; this.label22.Text = "Aussen";
// //
@@ -234,7 +237,7 @@
this.label8.Location = new System.Drawing.Point(468, 221); this.label8.Location = new System.Drawing.Point(468, 221);
this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(88, 20); this.label8.Size = new System.Drawing.Size(107, 25);
this.label8.TabIndex = 6; this.label8.TabIndex = 6;
this.label8.Text = "Vorbereitet"; this.label8.Text = "Vorbereitet";
// //
@@ -245,7 +248,7 @@
this.label7.Location = new System.Drawing.Point(8, 221); this.label7.Location = new System.Drawing.Point(8, 221);
this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(134, 20); this.label7.Size = new System.Drawing.Size(164, 25);
this.label7.TabIndex = 5; this.label7.TabIndex = 5;
this.label7.Text = "Leitung wurde mit"; this.label7.Text = "Leitung wurde mit";
// //
@@ -260,7 +263,7 @@
this.cb_lb_vorbereitung.Location = new System.Drawing.Point(218, 221); this.cb_lb_vorbereitung.Location = new System.Drawing.Point(218, 221);
this.cb_lb_vorbereitung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb_lb_vorbereitung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_lb_vorbereitung.Name = "cb_lb_vorbereitung"; this.cb_lb_vorbereitung.Name = "cb_lb_vorbereitung";
this.cb_lb_vorbereitung.Size = new System.Drawing.Size(211, 88); this.cb_lb_vorbereitung.Size = new System.Drawing.Size(211, 79);
this.cb_lb_vorbereitung.TabIndex = 19; this.cb_lb_vorbereitung.TabIndex = 19;
// //
// cb_stvo // cb_stvo
@@ -270,7 +273,7 @@
this.cb_stvo.Location = new System.Drawing.Point(8, 130); this.cb_stvo.Location = new System.Drawing.Point(8, 130);
this.cb_stvo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb_stvo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_stvo.Name = "cb_stvo"; 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.TabIndex = 16;
this.cb_stvo.Text = "Es wurde nach StVO abgesichert"; this.cb_stvo.Text = "Es wurde nach StVO abgesichert";
this.cb_stvo.UseVisualStyleBackColor = true; this.cb_stvo.UseVisualStyleBackColor = true;
@@ -282,7 +285,7 @@
this.cb_wasserhaltung.Location = new System.Drawing.Point(8, 79); this.cb_wasserhaltung.Location = new System.Drawing.Point(8, 79);
this.cb_wasserhaltung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cb_wasserhaltung.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_wasserhaltung.Name = "cb_wasserhaltung"; 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.TabIndex = 15;
this.cb_wasserhaltung.Text = "Wasserhaltung wurde eingerichtet"; this.cb_wasserhaltung.Text = "Wasserhaltung wurde eingerichtet";
this.cb_wasserhaltung.UseVisualStyleBackColor = true; this.cb_wasserhaltung.UseVisualStyleBackColor = true;
@@ -294,20 +297,20 @@
this.cb_genehmigung.Location = new System.Drawing.Point(8, 23); 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.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.cb_genehmigung.Name = "cb_genehmigung"; 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.TabIndex = 14;
this.cb_genehmigung.Text = "Genehmigung wurde eingeholt"; this.cb_genehmigung.Text = "Genehmigung wurde eingeholt";
this.cb_genehmigung.UseVisualStyleBackColor = true; this.cb_genehmigung.UseVisualStyleBackColor = true;
// //
// UCInliner // 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.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tabControl1); 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))); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.Name = "UCInliner"; this.Name = "UCInliner";
this.Size = new System.Drawing.Size(1131, 702); this.Size = new System.Drawing.Size(1344, 702);
this.Load += new System.EventHandler(this.UCInliner_Load); this.Load += new System.EventHandler(this.UCInliner_Load);
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false); this.tabPage2.ResumeLayout(false);

View File

@@ -69,9 +69,13 @@ namespace SanSystem
cb_fertig.DataBindings.Add(new Binding("Checked", inliner, "fertig")); cb_fertig.DataBindings.Add(new Binding("Checked", inliner, "fertig"));
cbb_wetter.DataBindings.Add(new Binding("Text", inliner, "Wetter")); cbb_wetter.DataBindings.Add(new Binding("Text", inliner, "Wetter"));
if (inliner.Datum != null) if (inliner.Datum != null)
{
if (inliner.Datum <= DateTime.MinValue || inliner.Datum >= DateTime.MaxValue)
inliner.Datum = new DateTime(2018, 01, 01, 12, 0, 0);
}
dt_eingebaut.DataBindings.Add(new Binding("Value", inliner, "Datum")); dt_eingebaut.DataBindings.Add(new Binding("Value", inliner, "Datum"));
else /*else
dt_eingebaut.Enabled = false; dt_eingebaut.Enabled = false;*/
cb_genehmigung.DataBindings.Add(new Binding("Checked", inliner, "genehmigungVorhanden")); cb_genehmigung.DataBindings.Add(new Binding("Checked", inliner, "genehmigungVorhanden"));
cb_stvo.DataBindings.Add(new Binding("Checked", inliner, "sTVOAbsicherung")); cb_stvo.DataBindings.Add(new Binding("Checked", inliner, "sTVOAbsicherung"));
cb_wasserhaltung.DataBindings.Add(new Binding("Checked", inliner, "wasserhaltungEingerichtet")); cb_wasserhaltung.DataBindings.Add(new Binding("Checked", inliner, "wasserhaltungEingerichtet"));

View File

@@ -251,7 +251,9 @@ namespace SanSystem
{ {
{"Ausdruck_datum","" }, {"Ausdruck_datum","" },
{"Strasse","" }, {"Strasse","" },
{"Ort","" } {"Ort","" },
{"gesamt_liner","" },
{"harzmenge","" }
}; };
grundDaten["Ausdruck_datum"] = DateTime.Now.ToLongDateString(); grundDaten["Ausdruck_datum"] = DateTime.Now.ToLongDateString();
@@ -260,16 +262,21 @@ namespace SanSystem
grundDaten["Ort"] = txt_ort.Text; grundDaten["Ort"] = txt_ort.Text;
DataTable linereintraege = getLinerTable(); DataTable linereintraege = getLinerTable();
double linerges = 0;
foreach(Inspektionsobjekt obj in ausdruck) foreach(Inspektionsobjekt obj in ausdruck)
{ {
DataRow dr = linereintraege.NewRow(); DataRow dr = linereintraege.NewRow();
double linergesamt = obj.Haltungslaenge + obj.Schachtlaenge;
dr["hausnummer"] = obj.Hausnummer; dr["hausnummer"] = obj.Hausnummer;
dr["liner_laenge"] = obj.Haltungslaenge; dr["liner_laenge"] = obj.Haltungslaenge;
dr["schacht_laenge"] = obj.Schachtlaenge; dr["schacht_laenge"] = obj.Schachtlaenge;
dr["liner_gesamt"] = linergesamt;
dr["bemerkung"] = obj.Bemerkung; dr["bemerkung"] = obj.Bemerkung;
linerges += linergesamt;
linereintraege.Rows.Add(dr); linereintraege.Rows.Add(dr);
} }
grundDaten["gesamt_liner"] = linerges;
grundDaten["harzmenge"] = linerges * 1.8;
BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "KalibrierungAuflistung.docx", "","", grundDaten, null, linereintraege); BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "KalibrierungAuflistung.docx", "","", grundDaten, null, linereintraege);
options.ShowDialog(); options.ShowDialog();
} }
@@ -283,6 +290,8 @@ namespace SanSystem
dataTable.Columns.Add(dataColumn); dataTable.Columns.Add(dataColumn);
dataColumn = new DataColumn("schacht_laenge") { MaxLength = 50 }; dataColumn = new DataColumn("schacht_laenge") { MaxLength = 50 };
dataTable.Columns.Add(dataColumn); dataTable.Columns.Add(dataColumn);
dataColumn = new DataColumn("liner_gesamt") { MaxLength = 50 };
dataTable.Columns.Add(dataColumn);
dataColumn = new DataColumn("bemerkung") { MaxLength = 255 }; dataColumn = new DataColumn("bemerkung") { MaxLength = 255 };
dataTable.Columns.Add(dataColumn); dataTable.Columns.Add(dataColumn);
return dataTable; return dataTable;