Man kann jetzt im objekt ansicht die Massenstatistik erzeugen

This commit is contained in:
Husky
2018-07-15 15:44:48 +02:00
parent c4872276ac
commit e63929f403
10 changed files with 101 additions and 17 deletions

View File

@@ -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.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.Location = new System.Drawing.Point(374, 12);
this.btn_start.Name = "btn_start"; 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.TabIndex = 0;
this.btn_start.Text = "button1"; this.btn_start.Text = "Bericht erzeugen";
this.btn_start.UseVisualStyleBackColor = true; this.btn_start.UseVisualStyleBackColor = true;
this.btn_start.Click += new System.EventHandler(this.btn_start_Click); this.btn_start.Click += new System.EventHandler(this.btn_start_Click);
// //
@@ -109,7 +109,7 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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.label1);
this.Controls.Add(this.rb_no); this.Controls.Add(this.rb_no);
this.Controls.Add(this.rb_yes); this.Controls.Add(this.rb_yes);

View File

@@ -70,7 +70,7 @@
this.Controls.Add(this.dt_targetDatum); this.Controls.Add(this.dt_targetDatum);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Name = "FrmSelectMassenDate"; this.Name = "FrmSelectMassenDate";
this.Text = "FrmSelectMassenDate"; this.Text = "Datum auswählen";
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();

View File

@@ -1,4 +1,5 @@
using Database; using Database;
using KlassenBIB;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -13,14 +14,25 @@ namespace SanSystem
{ {
public partial class FrmSelectMassenDate : Form public partial class FrmSelectMassenDate : Form
{ {
public FrmSelectMassenDate()
List<Inspektionsobjekt> inspektionsobjekts = null;
/// <summary>
///
/// </summary>
public FrmSelectMassenDate(List<Inspektionsobjekt> objekte = null)
{ {
InitializeComponent(); InitializeComponent();
if (objekte != null)
inspektionsobjekts = objekte;
} }
private void btn_gen_Click(object sender, EventArgs e) 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);
} }
} }

View File

@@ -47,7 +47,7 @@ namespace SanSystem
} }
else else
{ {
dr["vorbereitet"] = "nein wurde am " + objekt.HaltungGemessen.ToShortDateString(); dr["vorbereitet"] = "nein am " + objekt.HaltungGemessen.ToShortDateString();
} }
int schachtanbindungen = 0; int schachtanbindungen = 0;
foreach (Sanieren mainsan in objekt.Sanierung) foreach (Sanieren mainsan in objekt.Sanierung)

View File

@@ -60,6 +60,8 @@
this.btn_close = new System.Windows.Forms.Button(); this.btn_close = new System.Windows.Forms.Button();
this.btn_add_san = new System.Windows.Forms.Button(); this.btn_add_san = new System.Windows.Forms.Button();
this.btn_delete = 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.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
@@ -81,6 +83,8 @@
// //
// tabPage1 // 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.txt_ort);
this.tabPage1.Controls.Add(this.label7); this.tabPage1.Controls.Add(this.label7);
this.tabPage1.Controls.Add(this.txt_bemerkung); this.tabPage1.Controls.Add(this.txt_bemerkung);
@@ -119,7 +123,7 @@
this.txt_ort.Location = new System.Drawing.Point(745, 139); this.txt_ort.Location = new System.Drawing.Point(745, 139);
this.txt_ort.Name = "txt_ort"; this.txt_ort.Name = "txt_ort";
this.txt_ort.Size = new System.Drawing.Size(191, 26); this.txt_ort.Size = new System.Drawing.Size(191, 26);
this.txt_ort.TabIndex = 28; this.txt_ort.TabIndex = 9;
// //
// label7 // label7
// //
@@ -133,11 +137,11 @@
// //
// txt_bemerkung // 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.Multiline = true;
this.txt_bemerkung.Name = "txt_bemerkung"; this.txt_bemerkung.Name = "txt_bemerkung";
this.txt_bemerkung.Size = new System.Drawing.Size(333, 253); this.txt_bemerkung.Size = new System.Drawing.Size(333, 253);
this.txt_bemerkung.TabIndex = 26; this.txt_bemerkung.TabIndex = 14;
// //
// txt_objekt_name // txt_objekt_name
// //
@@ -159,6 +163,8 @@
// //
// cb_material // 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.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.FormattingEnabled = true;
this.cb_material.Items.AddRange(new object[] { this.cb_material.Items.AddRange(new object[] {
@@ -352,6 +358,7 @@
this.txt_punkt_von.Name = "txt_punkt_von"; this.txt_punkt_von.Name = "txt_punkt_von";
this.txt_punkt_von.Size = new System.Drawing.Size(330, 26); this.txt_punkt_von.Size = new System.Drawing.Size(330, 26);
this.txt_punkt_von.TabIndex = 3; this.txt_punkt_von.TabIndex = 3;
this.txt_punkt_von.TextChanged += new System.EventHandler(this.txt_punkt_von_TextChanged);
// //
// txt_pro_nr // txt_pro_nr
// //
@@ -449,6 +456,27 @@
this.btn_delete.UseVisualStyleBackColor = true; this.btn_delete.UseVisualStyleBackColor = true;
this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click); 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 // frmObjektEdit
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 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_bemerkung;
private System.Windows.Forms.TextBox txt_ort; private System.Windows.Forms.TextBox txt_ort;
private System.Windows.Forms.Label label7; private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.CheckBox cb_objekname_man;
} }
} }

View File

@@ -59,6 +59,7 @@ namespace SanSystem
private void frmObjektEdit_Load(object sender, EventArgs e) private void frmObjektEdit_Load(object sender, EventArgs e)
{ {
txt_objekt_name.Enabled = false;
txt_laenge_schacht.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Schachtlaenge")); txt_laenge_schacht.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Schachtlaenge"));
txt_objekt_name.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Objektbezeichnung")); txt_objekt_name.DataBindings.Add(new Binding("Text", inspektionsobjekt, "Objektbezeichnung"));
@@ -159,5 +160,20 @@ namespace SanSystem
{ {
Datenbank.Instance.loadedProjekt.Objekte.Remove(inspektionsobjekt); 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"));
}
}
} }
} }

View File

@@ -50,6 +50,7 @@
this.btn_search = new System.Windows.Forms.Button(); this.btn_search = new System.Windows.Forms.Button();
this.btn_make_ausdruck = 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_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.dGObjekte)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.strasseBindingSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.strasseBindingSource)).BeginInit();
this.gb_error_messages.SuspendLayout(); this.gb_error_messages.SuspendLayout();
@@ -73,6 +74,7 @@
// //
// btn_add // 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.Location = new System.Drawing.Point(510, 154);
this.btn_add.Margin = new System.Windows.Forms.Padding(2); this.btn_add.Margin = new System.Windows.Forms.Padding(2);
this.btn_add.Name = "btn_add"; this.btn_add.Name = "btn_add";
@@ -220,13 +222,15 @@
this.gb_error_messages.Controls.Add(this.label5); this.gb_error_messages.Controls.Add(this.label5);
this.gb_error_messages.Location = new System.Drawing.Point(515, 46); this.gb_error_messages.Location = new System.Drawing.Point(515, 46);
this.gb_error_messages.Name = "gb_error_messages"; 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.TabIndex = 16;
this.gb_error_messages.TabStop = false; this.gb_error_messages.TabStop = false;
this.gb_error_messages.Text = "error_messages"; this.gb_error_messages.Text = "error_messages";
// //
// btn_search // 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.Location = new System.Drawing.Point(617, 154);
this.btn_search.Name = "btn_search"; this.btn_search.Name = "btn_search";
this.btn_search.Size = new System.Drawing.Size(102, 101); this.btn_search.Size = new System.Drawing.Size(102, 101);
@@ -236,16 +240,18 @@
// //
// btn_make_ausdruck // 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.Location = new System.Drawing.Point(725, 155);
this.btn_make_ausdruck.Name = "btn_make_ausdruck"; this.btn_make_ausdruck.Name = "btn_make_ausdruck";
this.btn_make_ausdruck.Size = new System.Drawing.Size(102, 101); this.btn_make_ausdruck.Size = new System.Drawing.Size(102, 101);
this.btn_make_ausdruck.TabIndex = 18; 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.UseVisualStyleBackColor = true;
this.btn_make_ausdruck.Click += new System.EventHandler(this.btn_make_ausdruck_Click); this.btn_make_ausdruck.Click += new System.EventHandler(this.btn_make_ausdruck_Click);
// //
// btn_set_kali // 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.Location = new System.Drawing.Point(510, 262);
this.btn_set_kali.Name = "btn_set_kali"; this.btn_set_kali.Name = "btn_set_kali";
this.btn_set_kali.Size = new System.Drawing.Size(317, 53); 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.UseVisualStyleBackColor = true;
this.btn_set_kali.Click += new System.EventHandler(this.btn_set_kali_Click); 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 // frmObjekteList
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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_set_kali);
this.Controls.Add(this.btn_make_ausdruck); this.Controls.Add(this.btn_make_ausdruck);
this.Controls.Add(this.btn_search); this.Controls.Add(this.btn_search);
@@ -313,5 +331,6 @@
private System.Windows.Forms.Button btn_search; private System.Windows.Forms.Button btn_search;
private System.Windows.Forms.Button btn_make_ausdruck; private System.Windows.Forms.Button btn_make_ausdruck;
private System.Windows.Forms.Button btn_set_kali; private System.Windows.Forms.Button btn_set_kali;
private System.Windows.Forms.Button btn_statistik;
} }
} }

View File

@@ -320,5 +320,11 @@ namespace SanSystem
FrmKalibrierungFestlegung frmKalibrierungFestlegung = new FrmKalibrierungFestlegung(ausdruck); FrmKalibrierungFestlegung frmKalibrierungFestlegung = new FrmKalibrierungFestlegung(ausdruck);
frmKalibrierungFestlegung.ShowDialog(); frmKalibrierungFestlegung.ShowDialog();
} }
private void btn_statistik_Click(object sender, EventArgs e)
{
FrmSelectMassenDate frmSelectMassenDate = new FrmSelectMassenDate(inspektionsobjekte);
frmSelectMassenDate.ShowDialog();
}
} }
} }

View File

@@ -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.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.FormattingEnabled = true;
this.lst_strassen.ItemHeight = 20; 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.Margin = new System.Windows.Forms.Padding(2);
this.lst_strassen.Name = "lst_strassen"; 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.TabIndex = 0;
this.lst_strassen.DoubleClick += new System.EventHandler(this.lst_strassen_DoubleClick); this.lst_strassen.DoubleClick += new System.EventHandler(this.lst_strassen_DoubleClick);
// //
// btn_add // 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.Location = new System.Drawing.Point(12, 12);
this.btn_add.Name = "btn_add"; 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.TabIndex = 1;
this.btn_add.Text = "Neues Objekt hinzufügen"; this.btn_add.Text = "Neues Objekt hinzufügen";
this.btn_add.UseVisualStyleBackColor = true; this.btn_add.UseVisualStyleBackColor = true;