diff --git a/BerichtGen/FrmOptions.Designer.cs b/BerichtGen/FrmOptions.Designer.cs index ef3f04c..8e73558 100644 --- a/BerichtGen/FrmOptions.Designer.cs +++ b/BerichtGen/FrmOptions.Designer.cs @@ -41,9 +41,9 @@ this.btn_start.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_start.Location = new System.Drawing.Point(374, 12); this.btn_start.Name = "btn_start"; - this.btn_start.Size = new System.Drawing.Size(75, 67); + this.btn_start.Size = new System.Drawing.Size(91, 74); this.btn_start.TabIndex = 0; - this.btn_start.Text = "button1"; + this.btn_start.Text = "Bericht erzeugen"; this.btn_start.UseVisualStyleBackColor = true; this.btn_start.Click += new System.EventHandler(this.btn_start_Click); // @@ -109,7 +109,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(477, 113); + this.ClientSize = new System.Drawing.Size(477, 97); this.Controls.Add(this.label1); this.Controls.Add(this.rb_no); this.Controls.Add(this.rb_yes); diff --git a/SanSystem/FrmSelectMassenDate.Designer.cs b/SanSystem/FrmSelectMassenDate.Designer.cs index 25f55f8..f001bad 100644 --- a/SanSystem/FrmSelectMassenDate.Designer.cs +++ b/SanSystem/FrmSelectMassenDate.Designer.cs @@ -70,7 +70,7 @@ this.Controls.Add(this.dt_targetDatum); this.Controls.Add(this.label1); this.Name = "FrmSelectMassenDate"; - this.Text = "FrmSelectMassenDate"; + this.Text = "Datum auswählen"; this.ResumeLayout(false); this.PerformLayout(); diff --git a/SanSystem/FrmSelectMassenDate.cs b/SanSystem/FrmSelectMassenDate.cs index 9b29208..47068fd 100644 --- a/SanSystem/FrmSelectMassenDate.cs +++ b/SanSystem/FrmSelectMassenDate.cs @@ -1,4 +1,5 @@ using Database; +using KlassenBIB; using System; using System.Collections.Generic; using System.ComponentModel; @@ -13,14 +14,25 @@ namespace SanSystem { public partial class FrmSelectMassenDate : Form { - public FrmSelectMassenDate() + + List inspektionsobjekts = null; + /// + /// + /// + public FrmSelectMassenDate(List objekte = null) { InitializeComponent(); + if (objekte != null) + inspektionsobjekts = objekte; } private void btn_gen_Click(object sender, EventArgs e) { - MassenStatistik massenStatistik = new MassenStatistik(Datenbank.Instance.loadedProjekt.Objekte, dt_targetDatum.Value); + MassenStatistik massenStatistik = null; + if (inspektionsobjekts == null) + massenStatistik = new MassenStatistik(Datenbank.Instance.loadedProjekt.Objekte, dt_targetDatum.Value); + else + massenStatistik = new MassenStatistik(inspektionsobjekts, dt_targetDatum.Value); } } diff --git a/SanSystem/MassenStatistik.cs b/SanSystem/MassenStatistik.cs index d4eaf01..200084f 100644 --- a/SanSystem/MassenStatistik.cs +++ b/SanSystem/MassenStatistik.cs @@ -47,7 +47,7 @@ namespace SanSystem } else { - dr["vorbereitet"] = "nein wurde am " + objekt.HaltungGemessen.ToShortDateString(); + dr["vorbereitet"] = "nein am " + objekt.HaltungGemessen.ToShortDateString(); } int schachtanbindungen = 0; foreach (Sanieren mainsan in objekt.Sanierung) diff --git a/SanSystem/documents/JUME/Massenstatistik.docx b/SanSystem/documents/JUME/Massenstatistik.docx index c8a0709..b3a0b9e 100644 Binary files a/SanSystem/documents/JUME/Massenstatistik.docx and b/SanSystem/documents/JUME/Massenstatistik.docx differ diff --git a/SanSystem/frmObjektEdit.Designer.cs b/SanSystem/frmObjektEdit.Designer.cs index c96bbcd..d6f4c7a 100644 --- a/SanSystem/frmObjektEdit.Designer.cs +++ b/SanSystem/frmObjektEdit.Designer.cs @@ -60,6 +60,8 @@ this.btn_close = new System.Windows.Forms.Button(); this.btn_add_san = new System.Windows.Forms.Button(); this.btn_delete = new System.Windows.Forms.Button(); + this.label8 = new System.Windows.Forms.Label(); + this.cb_objekname_man = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -81,6 +83,8 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.cb_objekname_man); + this.tabPage1.Controls.Add(this.label8); this.tabPage1.Controls.Add(this.txt_ort); this.tabPage1.Controls.Add(this.label7); this.tabPage1.Controls.Add(this.txt_bemerkung); @@ -119,7 +123,7 @@ this.txt_ort.Location = new System.Drawing.Point(745, 139); this.txt_ort.Name = "txt_ort"; this.txt_ort.Size = new System.Drawing.Size(191, 26); - this.txt_ort.TabIndex = 28; + this.txt_ort.TabIndex = 9; // // label7 // @@ -133,11 +137,11 @@ // // txt_bemerkung // - this.txt_bemerkung.Location = new System.Drawing.Point(730, 191); + this.txt_bemerkung.Location = new System.Drawing.Point(729, 318); this.txt_bemerkung.Multiline = true; this.txt_bemerkung.Name = "txt_bemerkung"; this.txt_bemerkung.Size = new System.Drawing.Size(333, 253); - this.txt_bemerkung.TabIndex = 26; + this.txt_bemerkung.TabIndex = 14; // // txt_objekt_name // @@ -159,6 +163,8 @@ // // cb_material // + this.cb_material.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest; + this.cb_material.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; this.cb_material.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_material.FormattingEnabled = true; this.cb_material.Items.AddRange(new object[] { @@ -352,6 +358,7 @@ this.txt_punkt_von.Name = "txt_punkt_von"; this.txt_punkt_von.Size = new System.Drawing.Size(330, 26); this.txt_punkt_von.TabIndex = 3; + this.txt_punkt_von.TextChanged += new System.EventHandler(this.txt_punkt_von_TextChanged); // // txt_pro_nr // @@ -449,6 +456,27 @@ this.btn_delete.UseVisualStyleBackColor = true; this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click); // + // label8 + // + this.label8.AutoSize = true; + this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label8.Location = new System.Drawing.Point(725, 276); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(91, 20); + this.label8.TabIndex = 28; + this.label8.Text = "Bemerkung"; + // + // cb_objekname_man + // + this.cb_objekname_man.AutoSize = true; + this.cb_objekname_man.Location = new System.Drawing.Point(108, 70); + this.cb_objekname_man.Name = "cb_objekname_man"; + this.cb_objekname_man.Size = new System.Drawing.Size(60, 20); + this.cb_objekname_man.TabIndex = 29; + this.cb_objekname_man.Text = "man?"; + this.cb_objekname_man.UseVisualStyleBackColor = true; + this.cb_objekname_man.CheckedChanged += new System.EventHandler(this.cb_objekname_man_CheckedChanged); + // // frmObjektEdit // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); @@ -509,5 +537,7 @@ private System.Windows.Forms.TextBox txt_bemerkung; private System.Windows.Forms.TextBox txt_ort; private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.CheckBox cb_objekname_man; } } \ No newline at end of file diff --git a/SanSystem/frmObjektEdit.cs b/SanSystem/frmObjektEdit.cs index 0efbebe..ed2c0b1 100644 --- a/SanSystem/frmObjektEdit.cs +++ b/SanSystem/frmObjektEdit.cs @@ -59,7 +59,8 @@ namespace SanSystem private void frmObjektEdit_Load(object sender, EventArgs e) { - + txt_objekt_name.Enabled = false; + txt_laenge_schacht.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Schachtlaenge")); txt_objekt_name.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Objektbezeichnung")); txt_ort.DataBindings.Add(new Binding("Text", inspektionsobjekt, "OrtName")); @@ -159,5 +160,20 @@ namespace SanSystem { Datenbank.Instance.loadedProjekt.Objekte.Remove(inspektionsobjekt); } + + private void cb_objekname_man_CheckedChanged(object sender, EventArgs e) + { + txt_objekt_name.Enabled = cb_objekname_man.Checked; + } + + private void txt_punkt_von_TextChanged(object sender, EventArgs e) + { + if(!cb_objekname_man.Checked) + { + txt_objekt_name.DataBindings.Clear(); + inspektionsobjekt.Objektbezeichnung = txt_punkt_von.Text; + txt_objekt_name.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Objektbezeichnung")); + } + } } } diff --git a/SanSystem/frmObjekteList.Designer.cs b/SanSystem/frmObjekteList.Designer.cs index fbbcfa6..2c9f215 100644 --- a/SanSystem/frmObjekteList.Designer.cs +++ b/SanSystem/frmObjekteList.Designer.cs @@ -50,6 +50,7 @@ this.btn_search = new System.Windows.Forms.Button(); this.btn_make_ausdruck = new System.Windows.Forms.Button(); this.btn_set_kali = new System.Windows.Forms.Button(); + this.btn_statistik = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.dGObjekte)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.strasseBindingSource)).BeginInit(); this.gb_error_messages.SuspendLayout(); @@ -73,6 +74,7 @@ // // btn_add // + this.btn_add.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_add.Location = new System.Drawing.Point(510, 154); this.btn_add.Margin = new System.Windows.Forms.Padding(2); this.btn_add.Name = "btn_add"; @@ -220,13 +222,15 @@ this.gb_error_messages.Controls.Add(this.label5); this.gb_error_messages.Location = new System.Drawing.Point(515, 46); this.gb_error_messages.Name = "gb_error_messages"; - this.gb_error_messages.Size = new System.Drawing.Size(351, 103); + this.gb_error_messages.Size = new System.Drawing.Size(480, 103); this.gb_error_messages.TabIndex = 16; this.gb_error_messages.TabStop = false; this.gb_error_messages.Text = "error_messages"; // // btn_search // + this.btn_search.Enabled = false; + this.btn_search.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_search.Location = new System.Drawing.Point(617, 154); this.btn_search.Name = "btn_search"; this.btn_search.Size = new System.Drawing.Size(102, 101); @@ -236,16 +240,18 @@ // // btn_make_ausdruck // + this.btn_make_ausdruck.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_make_ausdruck.Location = new System.Drawing.Point(725, 155); this.btn_make_ausdruck.Name = "btn_make_ausdruck"; this.btn_make_ausdruck.Size = new System.Drawing.Size(102, 101); this.btn_make_ausdruck.TabIndex = 18; - this.btn_make_ausdruck.Text = "Ausdruck für Pregnieren"; + this.btn_make_ausdruck.Text = "Ausdruck für Kalibrieren"; this.btn_make_ausdruck.UseVisualStyleBackColor = true; this.btn_make_ausdruck.Click += new System.EventHandler(this.btn_make_ausdruck_Click); // // btn_set_kali // + this.btn_set_kali.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_set_kali.Location = new System.Drawing.Point(510, 262); this.btn_set_kali.Name = "btn_set_kali"; this.btn_set_kali.Size = new System.Drawing.Size(317, 53); @@ -254,11 +260,23 @@ this.btn_set_kali.UseVisualStyleBackColor = true; this.btn_set_kali.Click += new System.EventHandler(this.btn_set_kali_Click); // + // btn_statistik + // + this.btn_statistik.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btn_statistik.Location = new System.Drawing.Point(833, 155); + this.btn_statistik.Name = "btn_statistik"; + this.btn_statistik.Size = new System.Drawing.Size(100, 101); + this.btn_statistik.TabIndex = 20; + this.btn_statistik.Text = "Statistik"; + this.btn_statistik.UseVisualStyleBackColor = true; + this.btn_statistik.Click += new System.EventHandler(this.btn_statistik_Click); + // // frmObjekteList // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(879, 338); + this.ClientSize = new System.Drawing.Size(1007, 338); + this.Controls.Add(this.btn_statistik); this.Controls.Add(this.btn_set_kali); this.Controls.Add(this.btn_make_ausdruck); this.Controls.Add(this.btn_search); @@ -313,5 +331,6 @@ private System.Windows.Forms.Button btn_search; private System.Windows.Forms.Button btn_make_ausdruck; private System.Windows.Forms.Button btn_set_kali; + private System.Windows.Forms.Button btn_statistik; } } \ No newline at end of file diff --git a/SanSystem/frmObjekteList.cs b/SanSystem/frmObjekteList.cs index 61afca5..674bac5 100644 --- a/SanSystem/frmObjekteList.cs +++ b/SanSystem/frmObjekteList.cs @@ -320,5 +320,11 @@ namespace SanSystem FrmKalibrierungFestlegung frmKalibrierungFestlegung = new FrmKalibrierungFestlegung(ausdruck); frmKalibrierungFestlegung.ShowDialog(); } + + private void btn_statistik_Click(object sender, EventArgs e) + { + FrmSelectMassenDate frmSelectMassenDate = new FrmSelectMassenDate(inspektionsobjekte); + frmSelectMassenDate.ShowDialog(); + } } } diff --git a/SanSystem/frmStrassenList.Designer.cs b/SanSystem/frmStrassenList.Designer.cs index 70ed384..f5689f6 100644 --- a/SanSystem/frmStrassenList.Designer.cs +++ b/SanSystem/frmStrassenList.Designer.cs @@ -40,18 +40,19 @@ this.lst_strassen.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lst_strassen.FormattingEnabled = true; this.lst_strassen.ItemHeight = 20; - this.lst_strassen.Location = new System.Drawing.Point(12, 59); + this.lst_strassen.Location = new System.Drawing.Point(12, 79); this.lst_strassen.Margin = new System.Windows.Forms.Padding(2); this.lst_strassen.Name = "lst_strassen"; - this.lst_strassen.Size = new System.Drawing.Size(190, 484); + this.lst_strassen.Size = new System.Drawing.Size(190, 464); this.lst_strassen.TabIndex = 0; this.lst_strassen.DoubleClick += new System.EventHandler(this.lst_strassen_DoubleClick); // // btn_add // + this.btn_add.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_add.Location = new System.Drawing.Point(12, 12); this.btn_add.Name = "btn_add"; - this.btn_add.Size = new System.Drawing.Size(188, 42); + this.btn_add.Size = new System.Drawing.Size(188, 59); this.btn_add.TabIndex = 1; this.btn_add.Text = "Neues Objekt hinzufügen"; this.btn_add.UseVisualStyleBackColor = true;