diff --git a/Database/Datenbank.cs b/Database/Datenbank.cs index 04e236d..92aa2b9 100644 --- a/Database/Datenbank.cs +++ b/Database/Datenbank.cs @@ -61,9 +61,9 @@ namespace Database } catch(XamlObjectWriterException ex) { - string msg = ex.Message; - if (msg.ToLower().Contains("kann nicht festgelegt werden")) - throw new DataBaseVersionMismatchException(); + if (ex.HResult.Equals(-2146233088)) + throw new DataBaseVersionMismatchException(ex.Message); + } } else diff --git a/KlassenBIB/AusgefuehrteTaetigkeiten.cs b/KlassenBIB/AusgefuehrteTaetigkeiten.cs index d4475f0..1abc094 100644 --- a/KlassenBIB/AusgefuehrteTaetigkeiten.cs +++ b/KlassenBIB/AusgefuehrteTaetigkeiten.cs @@ -22,6 +22,10 @@ namespace KlassenBIB /// /// /// + public decimal Menge { get; set; } + /// + /// + /// public decimal Station { get; set; } } } diff --git a/KlassenBIB/Inspektionsobjekt.cs b/KlassenBIB/Inspektionsobjekt.cs index 3bd47a1..7d46bb3 100644 --- a/KlassenBIB/Inspektionsobjekt.cs +++ b/KlassenBIB/Inspektionsobjekt.cs @@ -79,6 +79,10 @@ namespace KlassenBIB /// public SanierungCollection Sanierung { get;set; } /// + /// + /// + public AusgefuehrteTaetigkeitenCollection AusgefuehrteTaetigkeiten { get; set; } + /// /// In welcher Richtung wurde Inspiziert /// public string Inspektionsrichtung { get; set; } @@ -97,6 +101,7 @@ namespace KlassenBIB { Schadenskuerzeln = new InspektionskuerzelnCollection(); Sanierung = new SanierungCollection(); + AusgefuehrteTaetigkeiten = new AusgefuehrteTaetigkeitenCollection(); if (HaltungGemessen <= DateTime.MinValue || HaltungGemessen >= DateTime.MaxValue) HaltungGemessen = DateTime.Now; } } diff --git a/KlassenBIB/LeistungsVerzeichnis.cs b/KlassenBIB/LeistungsVerzeichnis.cs index 1319adf..290ebde 100644 --- a/KlassenBIB/LeistungsVerzeichnis.cs +++ b/KlassenBIB/LeistungsVerzeichnis.cs @@ -23,5 +23,13 @@ namespace KlassenBIB /// /// public string PositionsEinheit { get; set; } + /// + /// + /// + /// + public override string ToString() + { + return PositionsBeschreibung; + } } } diff --git a/KlassenBIB/Projekt.cs b/KlassenBIB/Projekt.cs index 3e06119..33adc0d 100644 --- a/KlassenBIB/Projekt.cs +++ b/KlassenBIB/Projekt.cs @@ -30,6 +30,10 @@ namespace KlassenBIB /// /// /// + public LeistungsverzeichnisCollection Leistungsverzeichnis { get; set; } + /// + /// + /// public AbwasserTechnischeAnlageCollection Objekte { get; set; } /// /// @@ -37,6 +41,7 @@ namespace KlassenBIB public Projekt() { Objekte = new AbwasserTechnischeAnlageCollection(); + Leistungsverzeichnis = new LeistungsverzeichnisCollection(); Auftraggeber = new Auftraggeber(); } } diff --git a/SanSystem/frmObjektEdit.Designer.cs b/SanSystem/frmObjektEdit.Designer.cs index d8c974e..4718106 100644 --- a/SanSystem/frmObjektEdit.Designer.cs +++ b/SanSystem/frmObjektEdit.Designer.cs @@ -30,6 +30,8 @@ { this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.txt_san_nr = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); this.btn_delete = new System.Windows.Forms.Button(); this.btn_close = new System.Windows.Forms.Button(); this.cb_objekname_man = new System.Windows.Forms.CheckBox(); @@ -64,19 +66,22 @@ this.Kanalinformationen = new System.Windows.Forms.TabPage(); this.dgv_schadenkuerzel = new System.Windows.Forms.DataGridView(); this.btn_add_san = new System.Windows.Forms.Button(); - this.label9 = new System.Windows.Forms.Label(); - this.txt_san_nr = new System.Windows.Forms.TextBox(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.dgv_sanierungen = new System.Windows.Forms.DataGridView(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.Kanalinformationen.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgv_schadenkuerzel)).BeginInit(); + this.tabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.dgv_sanierungen)).BeginInit(); this.SuspendLayout(); // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.Kanalinformationen); + this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); @@ -126,6 +131,24 @@ this.tabPage1.Text = "Grunddaten"; this.tabPage1.UseVisualStyleBackColor = true; // + // txt_san_nr + // + this.txt_san_nr.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txt_san_nr.Location = new System.Drawing.Point(745, 29); + this.txt_san_nr.Name = "txt_san_nr"; + this.txt_san_nr.Size = new System.Drawing.Size(191, 30); + this.txt_san_nr.TabIndex = 7; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label9.Location = new System.Drawing.Point(585, 32); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(84, 25); + this.label9.TabIndex = 32; + this.label9.Text = "SAN. Nr"; + // // btn_delete // this.btn_delete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); @@ -518,23 +541,27 @@ this.btn_add_san.UseVisualStyleBackColor = true; this.btn_add_san.Click += new System.EventHandler(this.btn_add_san_Click); // - // label9 + // tabPage2 // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label9.Location = new System.Drawing.Point(585, 32); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(84, 25); - this.label9.TabIndex = 32; - this.label9.Text = "SAN. Nr"; + this.tabPage2.Controls.Add(this.dgv_sanierungen); + this.tabPage2.Location = new System.Drawing.Point(4, 34); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(1282, 664); + this.tabPage2.TabIndex = 2; + this.tabPage2.Text = "tabPage2"; + this.tabPage2.UseVisualStyleBackColor = true; // - // txt_san_nr + // dgv_sanierungen // - this.txt_san_nr.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txt_san_nr.Location = new System.Drawing.Point(745, 29); - this.txt_san_nr.Name = "txt_san_nr"; - this.txt_san_nr.Size = new System.Drawing.Size(191, 30); - this.txt_san_nr.TabIndex = 7; + this.dgv_sanierungen.AllowUserToOrderColumns = true; + this.dgv_sanierungen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgv_sanierungen.Location = new System.Drawing.Point(51, 6); + this.dgv_sanierungen.Name = "dgv_sanierungen"; + this.dgv_sanierungen.RowHeadersWidth = 51; + this.dgv_sanierungen.RowTemplate.Height = 24; + this.dgv_sanierungen.Size = new System.Drawing.Size(824, 208); + this.dgv_sanierungen.TabIndex = 0; // // frmObjektEdit // @@ -558,6 +585,8 @@ this.groupBox2.PerformLayout(); this.Kanalinformationen.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.dgv_schadenkuerzel)).EndInit(); + this.tabPage2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dgv_sanierungen)).EndInit(); this.ResumeLayout(false); } @@ -602,5 +631,7 @@ private System.Windows.Forms.DataGridView dgv_schadenkuerzel; private System.Windows.Forms.TextBox txt_san_nr; private System.Windows.Forms.Label label9; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.DataGridView dgv_sanierungen; } } \ No newline at end of file diff --git a/SanSystem/frmObjektEdit.cs b/SanSystem/frmObjektEdit.cs index 278ddc1..2c66a58 100644 --- a/SanSystem/frmObjektEdit.cs +++ b/SanSystem/frmObjektEdit.cs @@ -36,7 +36,9 @@ namespace SanSystem btn_close.Text = Global.Instance.language.Labels["btn_close"]; this.inspektionsobjekt = inspektion; + dgv_schadenkuerzel.DataSource = inspektion.Schadenskuerzeln; + dgv_sanierungen.DataSource = inspektion.AusgefuehrteTaetigkeiten; foreach(Sanierung san in inspektion.Sanierung) {