Man kann nun vorimprignierte berichte auswählenb

This commit is contained in:
HuskyTeufel
2019-10-25 11:34:10 +02:00
parent 9747e129cc
commit 10ef0f2b40
3 changed files with 117 additions and 63 deletions

View File

@@ -147,7 +147,7 @@ namespace KlassenBIB
grunddaten["hausnummer"] = Inspektionsobjekt.Hausnummer; grunddaten["hausnummer"] = Inspektionsobjekt.Hausnummer;
grunddaten["AG_Vorname"] = projekt.Auftraggeber.Name; grunddaten["AG_Vorname"] = projekt.Auftraggeber.Name;
grunddaten["KLP_Nummer"] = Inspektionsobjekt.Sanierungsnummer; grunddaten["KLP_Nummer"] = Inspektionsobjekt.Sanierungsnummer;
grunddaten["KLP_Datum"] = this.Datum.ToShortDateString();//DateTime.Now.ToShortDateString(); grunddaten["KLP_Datum"] = this.Datum.ToShortDateString();
grunddaten["AG_Ort"] = projekt.Auftraggeber.Ort; grunddaten["AG_Ort"] = projekt.Auftraggeber.Ort;
grunddaten["AG_Strasse"] = projekt.Auftraggeber.Strasse; grunddaten["AG_Strasse"] = projekt.Auftraggeber.Strasse;
grunddaten["AG_Ansprechpartner"] = projekt.Auftraggeber.Ansprechpartner; grunddaten["AG_Ansprechpartner"] = projekt.Auftraggeber.Ansprechpartner;
@@ -170,14 +170,14 @@ namespace KlassenBIB
grunddaten["KL_HD_date"] = this.Datum.ToShortDateString(); grunddaten["KL_HD_date"] = this.Datum.ToShortDateString();
grunddaten["KL_Besatzung"] = this.Besatzung; grunddaten["KL_Besatzung"] = this.Besatzung;
grunddaten["liner_laenge"] = Inspektionsobjekt.Haltungslaenge; //LaengeGesamt; grunddaten["liner_laenge"] = Inspektionsobjekt.Haltungslaenge; //LaengeGesamt;
grunddaten["Charge_Liner"] = this.LinerChargenummer; grunddaten["Charge_Liner"] = this.imprägnierungsbericht == null ? this.LinerChargenummer : this.imprägnierungsbericht.Schlauchnummer;
grunddaten["Charge_Harz"] = this.HarzChargenummer; grunddaten["Charge_Harz"] = this.imprägnierungsbericht == null ? this.HarzChargenummer : (this.imprägnierungsbericht as WerkseitigImprägniert).Imprägniernummer;
grunddaten["harz_bedarf_m"] = harzbedarf; grunddaten["harz_bedarf_m"] = this.imprägnierungsbericht == null ? harzbedarf : this.imprägnierungsbericht.Harzmenge;
grunddaten["gesamt_harz"] = Inspektionsobjekt.Haltungslaenge * harzbedarf; grunddaten["gesamt_harz"] = Inspektionsobjekt.Haltungslaenge * harzbedarf;
grunddaten["temperatur_harz"] = this.HarzKalibrierTemperatur; grunddaten["temperatur_harz"] = this.imprägnierungsbericht == null ? this.HarzKalibrierTemperatur : this.imprägnierungsbericht.HarzTemperatur;
grunddaten["datum_kalibrierung"] = this.DatumKalibrierung.ToShortDateString(); grunddaten["datum_kalibrierung"] = this.imprägnierungsbericht == null ? this.DatumKalibrierung.ToShortDateString() : this.imprägnierungsbericht.ImprägnierDatum;
grunddaten["walzen_abstand"] = this.KalibierWalzenAbstand; grunddaten["walzen_abstand"] = this.imprägnierungsbericht == null ? this.KalibierWalzenAbstand : this.imprägnierungsbericht.Walzenabstand;
grunddaten["vakuum"] = this.KalibrierUnterdruck; grunddaten["vakuum"] = this.imprägnierungsbericht == null ? this.KalibrierUnterdruck : this.imprägnierungsbericht.Vakuum;
grunddaten["time_start"] = this.AnfangAushaertung; grunddaten["time_start"] = this.AnfangAushaertung;
grunddaten["time_ende"] = this.EndeAushaertung; grunddaten["time_ende"] = this.EndeAushaertung;
grunddaten["UVImageTemp"] = Path.Combine(destinationPath, "linerGraph_temp.jpg"); grunddaten["UVImageTemp"] = Path.Combine(destinationPath, "linerGraph_temp.jpg");
@@ -185,7 +185,7 @@ namespace KlassenBIB
grunddaten["UVImageSpeed"] = Path.Combine(destinationPath, "linerGraph_speed.jpg"); grunddaten["UVImageSpeed"] = Path.Combine(destinationPath, "linerGraph_speed.jpg");
grunddaten["rueckhol_speed"] = rueckholgeschwindigkeit; grunddaten["rueckhol_speed"] = rueckholgeschwindigkeit;
grunddaten["liner_type"] = LinerTyp; grunddaten["liner_type"] = LinerTyp;
grunddaten["harz_type"] = HarzTyp; grunddaten["harz_type"] = this.imprägnierungsbericht == null ? HarzTyp : this.imprägnierungsbericht.HarzTyp;
return grunddaten; return grunddaten;
} }

View File

@@ -41,13 +41,9 @@
this.txt_mischungtyp = new System.Windows.Forms.TextBox(); this.txt_mischungtyp = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.textBox11 = new System.Windows.Forms.TextBox();
this.textBox10 = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
@@ -57,9 +53,13 @@
this.txt_wanddicke = new System.Windows.Forms.TextBox(); this.txt_wanddicke = new System.Windows.Forms.TextBox();
this.txt_walzenabstand = new System.Windows.Forms.TextBox(); this.txt_walzenabstand = new System.Windows.Forms.TextBox();
this.txt_bediener = new System.Windows.Forms.TextBox(); this.txt_bediener = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button(); this.btn_save = new System.Windows.Forms.Button();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.txt_laengeCode = new System.Windows.Forms.TextBox(); this.txt_laengeCode = new System.Windows.Forms.TextBox();
this.mtxt_impanfang_datum = new System.Windows.Forms.MaskedTextBox();
this.mtxt_impanfang_uhrzeit = new System.Windows.Forms.MaskedTextBox();
this.mtxt_impende_datum = new System.Windows.Forms.MaskedTextBox();
this.mtxt_impende_uhrzeit = new System.Windows.Forms.MaskedTextBox();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
@@ -187,8 +187,8 @@
// //
// groupBox2 // groupBox2
// //
this.groupBox2.Controls.Add(this.textBox9); this.groupBox2.Controls.Add(this.mtxt_impanfang_uhrzeit);
this.groupBox2.Controls.Add(this.textBox8); this.groupBox2.Controls.Add(this.mtxt_impanfang_datum);
this.groupBox2.Controls.Add(this.label9); this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.label8); this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -199,22 +199,6 @@
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "Imprägnier Anfang"; this.groupBox2.Text = "Imprägnier Anfang";
// //
// textBox9
//
this.textBox9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox9.Location = new System.Drawing.Point(117, 79);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(192, 30);
this.textBox9.TabIndex = 3;
//
// textBox8
//
this.textBox8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox8.Location = new System.Drawing.Point(117, 43);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(192, 30);
this.textBox8.TabIndex = 2;
//
// label9 // label9
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
@@ -237,8 +221,8 @@
// //
// groupBox3 // groupBox3
// //
this.groupBox3.Controls.Add(this.textBox11); this.groupBox3.Controls.Add(this.mtxt_impende_uhrzeit);
this.groupBox3.Controls.Add(this.textBox10); this.groupBox3.Controls.Add(this.mtxt_impende_datum);
this.groupBox3.Controls.Add(this.label10); this.groupBox3.Controls.Add(this.label10);
this.groupBox3.Controls.Add(this.label11); this.groupBox3.Controls.Add(this.label11);
this.groupBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -249,22 +233,6 @@
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "Imprägnier Ende"; this.groupBox3.Text = "Imprägnier Ende";
// //
// textBox11
//
this.textBox11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox11.Location = new System.Drawing.Point(117, 64);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(192, 30);
this.textBox11.TabIndex = 3;
//
// textBox10
//
this.textBox10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox10.Location = new System.Drawing.Point(117, 28);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(192, 30);
this.textBox10.TabIndex = 2;
//
// label10 // label10
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
@@ -343,14 +311,15 @@
this.txt_bediener.Size = new System.Drawing.Size(219, 30); this.txt_bediener.Size = new System.Drawing.Size(219, 30);
this.txt_bediener.TabIndex = 18; this.txt_bediener.TabIndex = 18;
// //
// button1 // btn_save
// //
this.button1.Location = new System.Drawing.Point(827, 36); this.btn_save.Location = new System.Drawing.Point(827, 36);
this.button1.Name = "button1"; this.btn_save.Name = "btn_save";
this.button1.Size = new System.Drawing.Size(209, 384); this.btn_save.Size = new System.Drawing.Size(209, 384);
this.button1.TabIndex = 19; this.btn_save.TabIndex = 19;
this.button1.Text = "button1"; this.btn_save.Text = "button1";
this.button1.UseVisualStyleBackColor = true; this.btn_save.UseVisualStyleBackColor = true;
this.btn_save.Click += new System.EventHandler(this.Btn_save_Click);
// //
// label14 // label14
// //
@@ -370,6 +339,42 @@
this.txt_laengeCode.Size = new System.Drawing.Size(219, 30); this.txt_laengeCode.Size = new System.Drawing.Size(219, 30);
this.txt_laengeCode.TabIndex = 21; this.txt_laengeCode.TabIndex = 21;
// //
// mtxt_impanfang_datum
//
this.mtxt_impanfang_datum.Location = new System.Drawing.Point(117, 41);
this.mtxt_impanfang_datum.Mask = "00/00/0000";
this.mtxt_impanfang_datum.Name = "mtxt_impanfang_datum";
this.mtxt_impanfang_datum.Size = new System.Drawing.Size(192, 30);
this.mtxt_impanfang_datum.TabIndex = 4;
this.mtxt_impanfang_datum.ValidatingType = typeof(System.DateTime);
//
// mtxt_impanfang_uhrzeit
//
this.mtxt_impanfang_uhrzeit.Location = new System.Drawing.Point(117, 77);
this.mtxt_impanfang_uhrzeit.Mask = "90:00";
this.mtxt_impanfang_uhrzeit.Name = "mtxt_impanfang_uhrzeit";
this.mtxt_impanfang_uhrzeit.Size = new System.Drawing.Size(100, 30);
this.mtxt_impanfang_uhrzeit.TabIndex = 5;
this.mtxt_impanfang_uhrzeit.ValidatingType = typeof(System.DateTime);
//
// mtxt_impende_datum
//
this.mtxt_impende_datum.Location = new System.Drawing.Point(145, 31);
this.mtxt_impende_datum.Mask = "00/00/0000";
this.mtxt_impende_datum.Name = "mtxt_impende_datum";
this.mtxt_impende_datum.Size = new System.Drawing.Size(153, 30);
this.mtxt_impende_datum.TabIndex = 2;
this.mtxt_impende_datum.ValidatingType = typeof(System.DateTime);
//
// mtxt_impende_uhrzeit
//
this.mtxt_impende_uhrzeit.Location = new System.Drawing.Point(145, 64);
this.mtxt_impende_uhrzeit.Mask = "90:00";
this.mtxt_impende_uhrzeit.Name = "mtxt_impende_uhrzeit";
this.mtxt_impende_uhrzeit.Size = new System.Drawing.Size(153, 30);
this.mtxt_impende_uhrzeit.TabIndex = 3;
this.mtxt_impende_uhrzeit.ValidatingType = typeof(System.DateTime);
//
// frmImprägnierBerichtEdit // frmImprägnierBerichtEdit
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
@@ -377,7 +382,7 @@
this.ClientSize = new System.Drawing.Size(1056, 558); this.ClientSize = new System.Drawing.Size(1056, 558);
this.Controls.Add(this.txt_laengeCode); this.Controls.Add(this.txt_laengeCode);
this.Controls.Add(this.label14); this.Controls.Add(this.label14);
this.Controls.Add(this.button1); this.Controls.Add(this.btn_save);
this.Controls.Add(this.txt_bediener); this.Controls.Add(this.txt_bediener);
this.Controls.Add(this.txt_walzenabstand); this.Controls.Add(this.txt_walzenabstand);
this.Controls.Add(this.txt_wanddicke); this.Controls.Add(this.txt_wanddicke);
@@ -395,6 +400,7 @@
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Name = "frmImprägnierBerichtEdit"; this.Name = "frmImprägnierBerichtEdit";
this.Text = "frmImprägnierBerichtEdit"; this.Text = "frmImprägnierBerichtEdit";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmImprägnierBerichtEdit_FormClosing);
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false); this.groupBox2.ResumeLayout(false);
@@ -426,10 +432,6 @@
private System.Windows.Forms.Label label13; private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txt_harzmenge; private System.Windows.Forms.TextBox txt_harzmenge;
private System.Windows.Forms.TextBox txt_mischungtyp; private System.Windows.Forms.TextBox txt_mischungtyp;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.TextBox textBox11;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.TextBox txt_imprägniernr; private System.Windows.Forms.TextBox txt_imprägniernr;
private System.Windows.Forms.TextBox txt_vakuum; private System.Windows.Forms.TextBox txt_vakuum;
private System.Windows.Forms.TextBox txt_schlauchnummer; private System.Windows.Forms.TextBox txt_schlauchnummer;
@@ -437,8 +439,12 @@
private System.Windows.Forms.TextBox txt_walzenabstand; private System.Windows.Forms.TextBox txt_walzenabstand;
private System.Windows.Forms.TextBox txt_harzTemperatur; private System.Windows.Forms.TextBox txt_harzTemperatur;
private System.Windows.Forms.TextBox txt_bediener; private System.Windows.Forms.TextBox txt_bediener;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button btn_save;
private System.Windows.Forms.Label label14; private System.Windows.Forms.Label label14;
private System.Windows.Forms.TextBox txt_laengeCode; private System.Windows.Forms.TextBox txt_laengeCode;
private System.Windows.Forms.MaskedTextBox mtxt_impanfang_uhrzeit;
private System.Windows.Forms.MaskedTextBox mtxt_impanfang_datum;
private System.Windows.Forms.MaskedTextBox mtxt_impende_uhrzeit;
private System.Windows.Forms.MaskedTextBox mtxt_impende_datum;
} }
} }

View File

@@ -30,6 +30,54 @@ namespace SanSystem
txt_vakuum.DataBindings.Add("Text", werkseitigImprägniert, "Vakuum"); txt_vakuum.DataBindings.Add("Text", werkseitigImprägniert, "Vakuum");
txt_walzenabstand.DataBindings.Add("Text", werkseitigImprägniert, "Walzenabstand"); txt_walzenabstand.DataBindings.Add("Text", werkseitigImprägniert, "Walzenabstand");
if(werkseitigImprägniert.ImprägnierungBeginn != null)
{
mtxt_impanfang_datum.Text = werkseitigImprägniert.ImprägnierungBeginn.Zeitstempel.ToShortDateString();
mtxt_impanfang_uhrzeit.Text = werkseitigImprägniert.ImprägnierungBeginn.Zeitstempel.ToShortTimeString();
}
if(werkseitigImprägniert.ImprägnierungEnde != null)
{
mtxt_impende_datum.Text = werkseitigImprägniert.ImprägnierungEnde.Zeitstempel.ToShortDateString();
mtxt_impende_uhrzeit.Text = werkseitigImprägniert.ImprägnierungEnde.Zeitstempel.ToShortTimeString();
}
}
private void save()
{
DateTime timestampAnfang;
DateTime timestampEnde;
string anfang = string.Format("{0} {1}", mtxt_impanfang_datum.Text, mtxt_impanfang_uhrzeit.Text);
string ende = string.Format("{0} {1}", mtxt_impende_datum.Text, mtxt_impende_uhrzeit.Text);
if (!DateTime.TryParse(anfang, out timestampAnfang) || !DateTime.TryParse(ende, out timestampEnde))
{
MessageBox.Show("Sorry konnte Datum und Uhrzeit nicht parsen");
return;
}
ImprägnierungStrukture anfangStrukture = new ImprägnierungStrukture()
{
Zeitstempel = timestampAnfang
};
ImprägnierungStrukture endeStrukture = new ImprägnierungStrukture()
{
Zeitstempel = timestampEnde
};
werkseitigImprägniert.ImprägnierungBeginn = anfangStrukture;
werkseitigImprägniert.ImprägnierungEnde = endeStrukture;
}
private void Btn_save_Click(object sender, EventArgs e)
{
save();
}
private void FrmImprägnierBerichtEdit_FormClosing(object sender, FormClosingEventArgs e)
{
save();
} }
} }
} }