7 Commits

Author SHA1 Message Date
Damian Wessels
50fcb029b2 Datenbank erweitert 2025-06-24 19:31:04 +02:00
Damian Wessels
1f1cb3e7dd Datenbank hatte noch alte Verweise 2023-01-15 12:23:47 +01:00
Damian Wessels
215f0e4dd9 Merge branch 'SQLite'
# Conflicts:
#	SanSystem/Database/Datenbank.cs
2023-01-15 12:19:09 +01:00
Damian Wessels
cfbbcdfae1 Database removing 2023-01-15 12:17:16 +01:00
Damian Wessels
1c4f581f28 EF core added 2023-01-14 12:20:47 +01:00
Damian Wessels
a306dc1e57 wenn projekt null ist, soll man kein
Objekt hinzufügen dürfen
2022-12-11 14:50:09 +01:00
db636eb82a Ausdruck für kalibrierung deaktiviert. 2022-08-11 20:47:38 +02:00
34 changed files with 910 additions and 294 deletions

View File

@@ -58,7 +58,7 @@ namespace SanSystem
} }
else if (san is KlassenBIB.SchachtAnbindung) else if (san is KlassenBIB.SchachtAnbindung)
{ {
string sourceDirectory = san.CheckVerzeichnisse(Global.Instance.Projektpfad); /*string sourceDirectory = san.CheckVerzeichnisse(Global.Instance.Projektpfad);
SchachtAnbindung fotoDokumentation = (san as SchachtAnbindung); SchachtAnbindung fotoDokumentation = (san as SchachtAnbindung);
KlassenBIB.Collections.Bilder fotos = fotoDokumentation.SavedBilders; KlassenBIB.Collections.Bilder fotos = fotoDokumentation.SavedBilders;
foreach (SavedBilder foto in fotos) foreach (SavedBilder foto in fotos)
@@ -70,6 +70,7 @@ namespace SanSystem
File.Copy(foto.Speicherpfad, Path.Combine(tempPath, destinationName)); File.Copy(foto.Speicherpfad, Path.Combine(tempPath, destinationName));
} }
*/
} }
} }

View File

@@ -1,24 +1,18 @@
using System; using KlassenBIB;
using SanShared.Exceptions;
using SanSystem;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.IO.Compression;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xaml; using System.Xaml;
using System.IO.Compression;
using System.Diagnostics;
using KlassenBIB;
using SanShared.Exceptions;
namespace Database namespace Database
{ {
/* public class SanVerwaltungContext: DbContext
{
public DbSet<Projekt> Projekte { get; set; }
}
*/
public class Datenbank public class Datenbank
{ {
public string pfad; public string pfad;
@@ -44,7 +38,7 @@ namespace Database
return; return;
} }
//if (File.Exists(filepath)) //if (File.Exists(filepath))
//TeufelDB = XamlServices.Load(filepath) as KlassenBIB.DB; // TeufelDB = XamlServices.Load(filepath) as KlassenBIB.DB;
} }
public KlassenBIB.Projekt loadedProjekt = null; public KlassenBIB.Projekt loadedProjekt = null;
@@ -60,33 +54,13 @@ namespace Database
public bool LoadProjekt(string projekt) public bool LoadProjekt(string projekt)
{ {
this.projekt = projekt; this.projekt = projekt;
loadedProjekt = Datenbank.Instance.TeufelDB.Projekte.Find(x => x.Nummer != null && x.Nummer.Equals(projekt)); using (var context = new SanVerwalterContext())
string filepath = Path.Combine(pfad, "projekte", "TeufelDB.xaml");
if (!File.Exists(filepath))
{ {
if (!Directory.Exists("./projekte")) return true; loadedProjekt = context.Projekte.Where(x => x.Nummer != null && x.Nummer.Equals(projekt)).FirstOrDefault();
//UpdateDatabase.UpdateNewGuids(); }
return loadedProjekt != null;
//UpdateDatabase.TransferAuftraggeber();
//UpdateDatabase.MakeNewDatabaseSystem();
} else
{
//UpdateDatabase.GenerateNewBeziehungen();
} }
//UpdateDatabase.CreateSQLiteDB();
return true;
}
public bool InitProjekt(Projekt projekt,string projektpfad)
{
this.projektpfad = Path.Combine(projektpfad,string.Format("{0}.xaml",projekt.Nummer));
loadedProjekt = projekt;
SaveProjekt();
return true;
}
public void SaveProjekt() public void SaveProjekt()
{ {
@@ -96,3 +70,4 @@ namespace Database
} }
} }
} }

View File

@@ -42,9 +42,9 @@ namespace SanSystem
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 9); this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(415, 20); this.label1.Size = new System.Drawing.Size(475, 25);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "Wer möchte sich Heute die Weltherschaft an sich reißen?"; this.label1.Text = "Wer möchte Heute die Weltherrschaft an sich reißen?";
// //
// label2 // label2
// //
@@ -52,7 +52,7 @@ namespace SanSystem
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(244, 35); this.label2.Location = new System.Drawing.Point(244, 35);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(13, 20); this.label2.Size = new System.Drawing.Size(18, 25);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
this.label2.Text = "/"; this.label2.Text = "/";
// //
@@ -61,7 +61,7 @@ namespace SanSystem
this.txt_vorarbeiter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_vorarbeiter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_vorarbeiter.Location = new System.Drawing.Point(12, 32); this.txt_vorarbeiter.Location = new System.Drawing.Point(12, 32);
this.txt_vorarbeiter.Name = "txt_vorarbeiter"; this.txt_vorarbeiter.Name = "txt_vorarbeiter";
this.txt_vorarbeiter.Size = new System.Drawing.Size(226, 26); this.txt_vorarbeiter.Size = new System.Drawing.Size(226, 30);
this.txt_vorarbeiter.TabIndex = 2; this.txt_vorarbeiter.TabIndex = 2;
// //
// txt_nacharbeiter // txt_nacharbeiter
@@ -69,7 +69,7 @@ namespace SanSystem
this.txt_nacharbeiter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_nacharbeiter.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_nacharbeiter.Location = new System.Drawing.Point(263, 32); this.txt_nacharbeiter.Location = new System.Drawing.Point(263, 32);
this.txt_nacharbeiter.Name = "txt_nacharbeiter"; this.txt_nacharbeiter.Name = "txt_nacharbeiter";
this.txt_nacharbeiter.Size = new System.Drawing.Size(226, 26); this.txt_nacharbeiter.Size = new System.Drawing.Size(226, 30);
this.txt_nacharbeiter.TabIndex = 3; this.txt_nacharbeiter.TabIndex = 3;
// //
// btn_ok // btn_ok

View File

@@ -44,7 +44,8 @@
// //
this.label1.AutoSize = true; this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(7, 62); this.label1.Location = new System.Drawing.Point(5, 50);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 25); this.label1.Size = new System.Drawing.Size(64, 25);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
@@ -54,7 +55,8 @@
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(7, 101); this.label2.Location = new System.Drawing.Point(5, 82);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(79, 25); this.label2.Size = new System.Drawing.Size(79, 25);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
@@ -64,7 +66,8 @@
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(7, 137); this.label3.Location = new System.Drawing.Point(5, 111);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(39, 25); this.label3.Size = new System.Drawing.Size(39, 25);
this.label3.TabIndex = 2; this.label3.TabIndex = 2;
@@ -74,7 +77,8 @@
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(7, 183); this.label4.Location = new System.Drawing.Point(5, 149);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(157, 25); this.label4.Size = new System.Drawing.Size(157, 25);
this.label4.TabIndex = 3; this.label4.TabIndex = 3;
@@ -83,9 +87,10 @@
// btn_save // btn_save
// //
this.btn_save.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btn_save.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_save.Location = new System.Drawing.Point(12, 232); this.btn_save.Location = new System.Drawing.Point(9, 188);
this.btn_save.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.btn_save.Name = "btn_save"; this.btn_save.Name = "btn_save";
this.btn_save.Size = new System.Drawing.Size(581, 105); this.btn_save.Size = new System.Drawing.Size(436, 85);
this.btn_save.TabIndex = 4; this.btn_save.TabIndex = 4;
this.btn_save.Text = "Speichern"; this.btn_save.Text = "Speichern";
this.btn_save.UseVisualStyleBackColor = true; this.btn_save.UseVisualStyleBackColor = true;
@@ -94,50 +99,55 @@
// txt_name // txt_name
// //
this.txt_name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_name.Location = new System.Drawing.Point(210, 59); this.txt_name.Location = new System.Drawing.Point(158, 48);
this.txt_name.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_name.Name = "txt_name"; this.txt_name.Name = "txt_name";
this.txt_name.Size = new System.Drawing.Size(383, 30); this.txt_name.Size = new System.Drawing.Size(288, 30);
this.txt_name.TabIndex = 5; this.txt_name.TabIndex = 5;
// //
// txt_strasse // txt_strasse
// //
this.txt_strasse.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_strasse.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_strasse.Location = new System.Drawing.Point(210, 98); this.txt_strasse.Location = new System.Drawing.Point(158, 80);
this.txt_strasse.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_strasse.Name = "txt_strasse"; this.txt_strasse.Name = "txt_strasse";
this.txt_strasse.Size = new System.Drawing.Size(383, 30); this.txt_strasse.Size = new System.Drawing.Size(288, 30);
this.txt_strasse.TabIndex = 6; this.txt_strasse.TabIndex = 6;
// //
// txt_ort // txt_ort
// //
this.txt_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_ort.Location = new System.Drawing.Point(210, 137); this.txt_ort.Location = new System.Drawing.Point(158, 111);
this.txt_ort.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_ort.Name = "txt_ort"; this.txt_ort.Name = "txt_ort";
this.txt_ort.Size = new System.Drawing.Size(383, 30); this.txt_ort.Size = new System.Drawing.Size(288, 30);
this.txt_ort.TabIndex = 7; this.txt_ort.TabIndex = 7;
// //
// txt_ansp // txt_ansp
// //
this.txt_ansp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_ansp.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_ansp.Location = new System.Drawing.Point(210, 180); this.txt_ansp.Location = new System.Drawing.Point(158, 146);
this.txt_ansp.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.txt_ansp.Name = "txt_ansp"; this.txt_ansp.Name = "txt_ansp";
this.txt_ansp.Size = new System.Drawing.Size(383, 30); this.txt_ansp.Size = new System.Drawing.Size(288, 30);
this.txt_ansp.TabIndex = 8; this.txt_ansp.TabIndex = 8;
// //
// cb_auftraggeberlist // cb_auftraggeberlist
// //
this.cb_auftraggeberlist.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_auftraggeberlist.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cb_auftraggeberlist.FormattingEnabled = true; this.cb_auftraggeberlist.FormattingEnabled = true;
this.cb_auftraggeberlist.Location = new System.Drawing.Point(12, 12); this.cb_auftraggeberlist.Location = new System.Drawing.Point(9, 10);
this.cb_auftraggeberlist.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cb_auftraggeberlist.Name = "cb_auftraggeberlist"; this.cb_auftraggeberlist.Name = "cb_auftraggeberlist";
this.cb_auftraggeberlist.Size = new System.Drawing.Size(482, 33); this.cb_auftraggeberlist.Size = new System.Drawing.Size(362, 33);
this.cb_auftraggeberlist.TabIndex = 9; this.cb_auftraggeberlist.TabIndex = 9;
this.cb_auftraggeberlist.SelectionChangeCommitted += new System.EventHandler(this.Cb_auftraggeberlist_SelectionChangeCommitted); this.cb_auftraggeberlist.SelectionChangeCommitted += new System.EventHandler(this.Cb_auftraggeberlist_SelectionChangeCommitted);
// //
// frmAuftraggeberEdit // frmAuftraggeberEdit
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); 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(631, 365); this.ClientSize = new System.Drawing.Size(473, 297);
this.Controls.Add(this.cb_auftraggeberlist); this.Controls.Add(this.cb_auftraggeberlist);
this.Controls.Add(this.txt_ansp); this.Controls.Add(this.txt_ansp);
this.Controls.Add(this.txt_ort); this.Controls.Add(this.txt_ort);
@@ -148,8 +158,9 @@
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.label1); this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "frmAuftraggeberEdit"; this.Name = "frmAuftraggeberEdit";
this.Text = "FrmAuftraggeberEdit"; this.Text = "Auftraggeber Editieren";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAuftraggeberEdit_FormClosing); this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmAuftraggeberEdit_FormClosing);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();

View File

@@ -35,7 +35,7 @@ namespace SanSystem
InitializeComponent(); InitializeComponent();
if (auftraggeber == null) auftraggeber = new Auftraggeber(); if (auftraggeber == null) auftraggeber = new Auftraggeber();
this.auftraggeber = auftraggeber; this.auftraggeber = auftraggeber;
cb_auftraggeberlist.DataSource = Datenbank.Instance.TeufelDB.Auftraggeber; //Datenbank.Instance.MainDatenbank.AuftraggeberListe; //cb_auftraggeberlist.DataSource = Datenbank.Instance.TeufelDB.Auftraggeber; //Datenbank.Instance.MainDatenbank.AuftraggeberListe;
MakeBindings(); MakeBindings();
} }

View File

@@ -25,14 +25,11 @@ namespace SanSystem
InitializeComponent(); InitializeComponent();
} }
private bool project_already_excist(string projektnummer)
{
return Datenbank.Instance.TeufelDB.Projekte.FindAll(x => x.Nummer.Equals(projektnummer)).Count > 0;
}
private void btn_save_Click(object sender, EventArgs e) private void btn_save_Click(object sender, EventArgs e)
{ {
if(project_already_excist(txt_pro_nr.Text)) using (var context = new SanVerwalterContext())
{
if (project_already_exist(context, txt_pro_nr.Text))
{ {
MessageBox.Show(string.Format("Projekt mit den nummer {0} excistiert bereits. Projekt wird nicht angelegt", txt_pro_nr.Text)); MessageBox.Show(string.Format("Projekt mit den nummer {0} excistiert bereits. Projekt wird nicht angelegt", txt_pro_nr.Text));
return; return;
@@ -40,9 +37,16 @@ namespace SanSystem
Projekt projekt = new Projekt(); Projekt projekt = new Projekt();
projekt.Nummer = txt_pro_nr.Text; projekt.Nummer = txt_pro_nr.Text;
projekt.Ort = txt_ort.Text; projekt.Ort = txt_ort.Text;
Global.Instance.SetProjekt(projekt); context.Projekte.Add(projekt);
context.SaveChanges();
}
this.Close(); this.Close();
//Global.Instance.ChangeProjekt(txt_pro_nr.Text); Global.Instance.ChangeProjekt(txt_pro_nr.Text);
}
private bool project_already_exist(SanVerwalterContext context, string text)
{
return context.Projekte.Count(x => x.Nummer.Equals(text)) > 0;
} }
private void txt_pro_nr_KeyPress(object sender, KeyPressEventArgs e) private void txt_pro_nr_KeyPress(object sender, KeyPressEventArgs e)

View File

@@ -33,6 +33,8 @@ namespace SanSystem
{ {
MassenStatistik massenStatistik = null; MassenStatistik massenStatistik = null;
List<Inspektionsobjekt> objekte; List<Inspektionsobjekt> objekte;
// TODO Objekte können noch null sein, unter
if (inspektionsobjekts == null) if (inspektionsobjekts == null)
objekte = Datenbank.Instance.loadedProjekt.Objekte; objekte = Datenbank.Instance.loadedProjekt.Objekte;
else else

View File

@@ -95,18 +95,6 @@ namespace SanSystem
} }
} }
internal void SetProjekt(Projekt projekt)
{
Database.Datenbank.Instance.SaveProjekt();
this.ProjektNummer = projekt.Nummer;
Database.Datenbank.Instance.loadedProjekt = null;
Database.Datenbank.Instance.LoadProjekt(projekt.Nummer);
if (!Directory.Exists(Projektpfad)) Directory.CreateDirectory(Projektpfad);
Database.Datenbank.Instance.TeufelDB.Projekte.Add(projekt);
Database.Datenbank.Instance.InitProjekt(projekt, Projektpfad);
}
public string Projektpfad public string Projektpfad
{ {
get get

View File

@@ -10,7 +10,7 @@ namespace KlassenBIB
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public class Auftraggeber :IAuftraggeber public class Auftraggeber : DBModel, IAuftraggeber
{ {
/// <summary> /// <summary>
/// ///

View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace KlassenBIB
{
public abstract class DBModel
{
public int Id { get; set; }
}
}

View File

@@ -1,6 +1,7 @@
using SanShared; using SanShared;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -11,11 +12,11 @@ namespace KlassenBIB
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public class Inspektionsobjekt public class Inspektionsobjekt: DBModel
{ {
private string strasseName = "none"; private string strasseName = "none";
public IAuftraggeber OverrideAuftraggeber { get; set; } public Auftraggeber OverrideAuftraggeber { get; set; }
public bool GeschlossenesEnde { get; set; } public bool GeschlossenesEnde { get; set; }
public string StrasseName { get => strasseName; set => strasseName = value; } public string StrasseName { get => strasseName; set => strasseName = value; }
@@ -42,25 +43,26 @@ namespace KlassenBIB
public DateTime HaltungGemessen { get; set; } public DateTime HaltungGemessen { get; set; }
public Collections.Inspektionskuerzeln Schadenskuerzeln { get; set; } //public Collections.Inspektionskuerzeln Schadenskuerzeln { get; set; }
public string Bemerkung { get; set; } public string Bemerkung { get; set; }
[NotMapped]
public Collections.Sanierung Sanierung { get;set; } public Collections.Sanierung Sanierung { get;set; }
public Collections.AusgefuehrteTaetigkeiten AusgefuehrteTaetigkeiten { get; set; } //public Collections.AusgefuehrteTaetigkeiten AusgefuehrteTaetigkeiten { get; set; }
public string Inspektionsrichtung { get; set; } public string Inspektionsrichtung { get; set; }
public string Sanierungsnummer { get; set; } public string Sanierungsnummer { get; set; }
public Guid Guid { get; set; }
public Inspektionsobjekt() public Inspektionsobjekt()
{ {
Schadenskuerzeln = new Collections.Inspektionskuerzeln(); //Schadenskuerzeln = new Collections.Inspektionskuerzeln();
Sanierung = new Collections.Sanierung(); Sanierung = new Collections.Sanierung();
AusgefuehrteTaetigkeiten = new Collections.AusgefuehrteTaetigkeiten(); //AusgefuehrteTaetigkeiten = new Collections.AusgefuehrteTaetigkeiten();
if (HaltungGemessen <= DateTime.MinValue || HaltungGemessen >= DateTime.MaxValue) HaltungGemessen = DateTime.Now; if (HaltungGemessen <= DateTime.MinValue || HaltungGemessen >= DateTime.MaxValue) HaltungGemessen = DateTime.Now;
} }
} }

View File

@@ -8,12 +8,12 @@ using System.Windows.Markup;
namespace KlassenBIB namespace KlassenBIB
{ {
public class Projekt :IProjekt public class Projekt: DBModel //:IProjekt
{ {
public string Nummer { get; set; } public string Nummer { get; set; }
public string Ort { get; set; } public string Ort { get; set; }
public IAuftraggeber Auftraggeber { get; set; } public Auftraggeber Auftraggeber { get; set; }
public Collections.Leistungsverzeichnis Leistungsverzeichnis { get; set; } //public Collections.Leistungsverzeichnis Leistungsverzeichnis { get; set; }
public Collections.AbwasserTechnischeAnlage Objekte { get; set; } public Collections.AbwasserTechnischeAnlage Objekte { get; set; }
public string SanierungsIDPrefix { get; set; } public string SanierungsIDPrefix { get; set; }
public string SanierungsIDSuffix { get; set; } public string SanierungsIDSuffix { get; set; }
@@ -23,7 +23,7 @@ namespace KlassenBIB
public Projekt() public Projekt()
{ {
Objekte = new Collections.AbwasserTechnischeAnlage(); Objekte = new Collections.AbwasserTechnischeAnlage();
Leistungsverzeichnis = new Collections.Leistungsverzeichnis(); //Leistungsverzeichnis = new Collections.Leistungsverzeichnis();
Auftraggeber = new Auftraggeber(); Auftraggeber = new Auftraggeber();
} }
} }

View File

@@ -51,7 +51,7 @@ namespace KlassenBIB
return haltungslaenge * harzbedarf; return haltungslaenge * harzbedarf;
} }
public override string CheckVerzeichnisse(string projektpfad) public string CheckVerzeichnisse(string projektpfad)
{ {
string path = Path.Combine(projektpfad, PfadZurSan); string path = Path.Combine(projektpfad, PfadZurSan);
if (!Directory.Exists(path)) Directory.CreateDirectory(path); if (!Directory.Exists(path)) Directory.CreateDirectory(path);

View File

@@ -32,7 +32,7 @@ namespace KlassenBIB
/// </summary> /// </summary>
/// <param name="projektpfad"></param> /// <param name="projektpfad"></param>
/// <returns></returns> /// <returns></returns>
public override string CheckVerzeichnisse(string projektpfad) public string CheckVerzeichnisse(string projektpfad)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

@@ -10,7 +10,7 @@ namespace KlassenBIB
{ {
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
[Browsable(false)] [Browsable(false)]
public abstract class Sanierung : INotifyPropertyChanged public class Sanierung : INotifyPropertyChanged
{ {
Guid guid; Guid guid;
double tempAusen; double tempAusen;
@@ -37,7 +37,7 @@ namespace KlassenBIB
} }
public abstract string CheckVerzeichnisse(string projektpfad); //public string CheckVerzeichnisse(string projektpfad);
public Guid Guid { get => guid; set => guid = value; } public Guid Guid { get => guid; set => guid = value; }

View File

@@ -37,7 +37,7 @@ namespace KlassenBIB
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public override string CheckVerzeichnisse(string projektpfad) public string CheckVerzeichnisse(string projektpfad)
{ {
string path = Path.Combine(projektpfad, PfadZurSan); string path = Path.Combine(projektpfad, PfadZurSan);
if (!Directory.Exists(path)) Directory.CreateDirectory(path); if (!Directory.Exists(path)) Directory.CreateDirectory(path);

View File

@@ -0,0 +1,226 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SanSystem;
#nullable disable
namespace SanSystem.Migrations
{
[DbContext(typeof(SanVerwalterContext))]
[Migration("20230114101006_InitialCreate")]
partial class InitialCreate
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.0");
modelBuilder.Entity("KlassenBIB.Auftraggeber", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Ansprechpartner")
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<string>("Ort")
.HasColumnType("TEXT");
b.Property<string>("Strasse")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Auftraggebers");
});
modelBuilder.Entity("KlassenBIB.Inspektionsobjekt", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Bemerkung")
.HasColumnType("TEXT");
b.Property<string>("BisPunkt")
.HasColumnType("TEXT");
b.Property<bool>("GeschlossenesEnde")
.HasColumnType("INTEGER");
b.Property<Guid>("Guid")
.HasColumnType("TEXT");
b.Property<DateTime>("HaltungGemessen")
.HasColumnType("TEXT");
b.Property<double>("Haltungslaenge")
.HasColumnType("REAL");
b.Property<string>("Hausnummer")
.HasColumnType("TEXT");
b.Property<string>("Inspektionsrichtung")
.HasColumnType("TEXT");
b.Property<uint>("Kanalrohrweite")
.HasColumnType("INTEGER");
b.Property<string>("Objektbezeichnung")
.HasColumnType("TEXT");
b.Property<string>("OrtName")
.HasColumnType("TEXT");
b.Property<int?>("OverrideAuftraggeberId")
.HasColumnType("INTEGER");
b.Property<int?>("ProjektId")
.HasColumnType("INTEGER");
b.Property<string>("Projektnummer")
.HasColumnType("TEXT");
b.Property<string>("RohrMaterial")
.HasColumnType("TEXT");
b.Property<string>("Sanierungsnummer")
.HasColumnType("TEXT");
b.Property<double>("Schachtlaenge")
.HasColumnType("REAL");
b.Property<string>("StrasseName")
.HasColumnType("TEXT");
b.Property<string>("VonPunkt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("OverrideAuftraggeberId");
b.HasIndex("ProjektId");
b.ToTable("InspektionObjekte");
});
modelBuilder.Entity("KlassenBIB.Projekt", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int?>("AuftraggeberId")
.HasColumnType("INTEGER");
b.Property<string>("Nummer")
.HasColumnType("TEXT");
b.Property<string>("Ort")
.HasColumnType("TEXT");
b.Property<string>("SanierungsIDPrefix")
.HasColumnType("TEXT");
b.Property<string>("SanierungsIDSuffix")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AuftraggeberId");
b.ToTable("Projekte");
});
modelBuilder.Entity("KlassenBIB.Sanierung", b =>
{
b.Property<bool>("GenehmigungVorhanden")
.HasColumnType("INTEGER");
b.Property<Guid>("Guid")
.HasColumnType("TEXT");
b.Property<bool>("HDReinigung")
.HasColumnType("INTEGER");
b.Property<DateTime>("HDReinigungDatum")
.HasColumnType("TEXT");
b.Property<int?>("InspektionsobjektId")
.HasColumnType("INTEGER");
b.Property<bool>("STVOAbsicherung")
.HasColumnType("INTEGER");
b.Property<double>("TempAusen")
.HasColumnType("REAL");
b.Property<double>("TempKanal")
.HasColumnType("REAL");
b.Property<bool>("VorbereitetMechanisch")
.HasColumnType("INTEGER");
b.Property<bool>("VorbereitetRoboter")
.HasColumnType("INTEGER");
b.Property<bool>("WasserhaltungEingerichtet")
.HasColumnType("INTEGER");
b.Property<string>("Wetter")
.HasColumnType("TEXT");
b.HasIndex("InspektionsobjektId");
b.ToTable("Sanierung");
});
modelBuilder.Entity("KlassenBIB.Inspektionsobjekt", b =>
{
b.HasOne("KlassenBIB.Auftraggeber", "OverrideAuftraggeber")
.WithMany()
.HasForeignKey("OverrideAuftraggeberId");
b.HasOne("KlassenBIB.Projekt", null)
.WithMany("Objekte")
.HasForeignKey("ProjektId");
b.Navigation("OverrideAuftraggeber");
});
modelBuilder.Entity("KlassenBIB.Projekt", b =>
{
b.HasOne("KlassenBIB.Auftraggeber", "Auftraggeber")
.WithMany()
.HasForeignKey("AuftraggeberId");
b.Navigation("Auftraggeber");
});
modelBuilder.Entity("KlassenBIB.Sanierung", b =>
{
b.HasOne("KlassenBIB.Inspektionsobjekt", "Inspektionsobjekt")
.WithMany()
.HasForeignKey("InspektionsobjektId");
b.Navigation("Inspektionsobjekt");
});
modelBuilder.Entity("KlassenBIB.Projekt", b =>
{
b.Navigation("Objekte");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,153 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SanSystem.Migrations
{
public partial class InitialCreate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Auftraggebers",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Name = table.Column<string>(type: "TEXT", nullable: true),
Strasse = table.Column<string>(type: "TEXT", nullable: true),
Ort = table.Column<string>(type: "TEXT", nullable: true),
Ansprechpartner = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Auftraggebers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Projekte",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Nummer = table.Column<string>(type: "TEXT", nullable: true),
Ort = table.Column<string>(type: "TEXT", nullable: true),
AuftraggeberId = table.Column<int>(type: "INTEGER", nullable: true),
SanierungsIDPrefix = table.Column<string>(type: "TEXT", nullable: true),
SanierungsIDSuffix = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Projekte", x => x.Id);
table.ForeignKey(
name: "FK_Projekte_Auftraggebers_AuftraggeberId",
column: x => x.AuftraggeberId,
principalTable: "Auftraggebers",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "InspektionObjekte",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
OverrideAuftraggeberId = table.Column<int>(type: "INTEGER", nullable: true),
GeschlossenesEnde = table.Column<bool>(type: "INTEGER", nullable: false),
StrasseName = table.Column<string>(type: "TEXT", nullable: true),
OrtName = table.Column<string>(type: "TEXT", nullable: true),
Hausnummer = table.Column<string>(type: "TEXT", nullable: true),
Projektnummer = table.Column<string>(type: "TEXT", nullable: true),
Objektbezeichnung = table.Column<string>(type: "TEXT", nullable: true),
VonPunkt = table.Column<string>(type: "TEXT", nullable: true),
BisPunkt = table.Column<string>(type: "TEXT", nullable: true),
RohrMaterial = table.Column<string>(type: "TEXT", nullable: true),
Kanalrohrweite = table.Column<uint>(type: "INTEGER", nullable: false),
Haltungslaenge = table.Column<double>(type: "REAL", nullable: false),
Schachtlaenge = table.Column<double>(type: "REAL", nullable: false),
HaltungGemessen = table.Column<DateTime>(type: "TEXT", nullable: false),
Bemerkung = table.Column<string>(type: "TEXT", nullable: true),
Inspektionsrichtung = table.Column<string>(type: "TEXT", nullable: true),
Sanierungsnummer = table.Column<string>(type: "TEXT", nullable: true),
Guid = table.Column<Guid>(type: "TEXT", nullable: false),
ProjektId = table.Column<int>(type: "INTEGER", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_InspektionObjekte", x => x.Id);
table.ForeignKey(
name: "FK_InspektionObjekte_Auftraggebers_OverrideAuftraggeberId",
column: x => x.OverrideAuftraggeberId,
principalTable: "Auftraggebers",
principalColumn: "Id");
table.ForeignKey(
name: "FK_InspektionObjekte_Projekte_ProjektId",
column: x => x.ProjektId,
principalTable: "Projekte",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "Sanierung",
columns: table => new
{
Guid = table.Column<Guid>(type: "TEXT", nullable: false),
TempAusen = table.Column<double>(type: "REAL", nullable: false),
TempKanal = table.Column<double>(type: "REAL", nullable: false),
Wetter = table.Column<string>(type: "TEXT", nullable: true),
GenehmigungVorhanden = table.Column<bool>(type: "INTEGER", nullable: false),
WasserhaltungEingerichtet = table.Column<bool>(type: "INTEGER", nullable: false),
STVOAbsicherung = table.Column<bool>(type: "INTEGER", nullable: false),
HDReinigung = table.Column<bool>(type: "INTEGER", nullable: false),
HDReinigungDatum = table.Column<DateTime>(type: "TEXT", nullable: false),
InspektionsobjektId = table.Column<int>(type: "INTEGER", nullable: true),
VorbereitetMechanisch = table.Column<bool>(type: "INTEGER", nullable: false),
VorbereitetRoboter = table.Column<bool>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.ForeignKey(
name: "FK_Sanierung_InspektionObjekte_InspektionsobjektId",
column: x => x.InspektionsobjektId,
principalTable: "InspektionObjekte",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_InspektionObjekte_OverrideAuftraggeberId",
table: "InspektionObjekte",
column: "OverrideAuftraggeberId");
migrationBuilder.CreateIndex(
name: "IX_InspektionObjekte_ProjektId",
table: "InspektionObjekte",
column: "ProjektId");
migrationBuilder.CreateIndex(
name: "IX_Projekte_AuftraggeberId",
table: "Projekte",
column: "AuftraggeberId");
migrationBuilder.CreateIndex(
name: "IX_Sanierung_InspektionsobjektId",
table: "Sanierung",
column: "InspektionsobjektId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Sanierung");
migrationBuilder.DropTable(
name: "InspektionObjekte");
migrationBuilder.DropTable(
name: "Projekte");
migrationBuilder.DropTable(
name: "Auftraggebers");
}
}
}

View File

@@ -0,0 +1,224 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SanSystem;
#nullable disable
namespace SanSystem.Migrations
{
[DbContext(typeof(SanVerwalterContext))]
partial class SanVerwalterContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "6.0.0");
modelBuilder.Entity("KlassenBIB.Auftraggeber", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Ansprechpartner")
.HasColumnType("TEXT");
b.Property<string>("Name")
.HasColumnType("TEXT");
b.Property<string>("Ort")
.HasColumnType("TEXT");
b.Property<string>("Strasse")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Auftraggebers");
});
modelBuilder.Entity("KlassenBIB.Inspektionsobjekt", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Bemerkung")
.HasColumnType("TEXT");
b.Property<string>("BisPunkt")
.HasColumnType("TEXT");
b.Property<bool>("GeschlossenesEnde")
.HasColumnType("INTEGER");
b.Property<Guid>("Guid")
.HasColumnType("TEXT");
b.Property<DateTime>("HaltungGemessen")
.HasColumnType("TEXT");
b.Property<double>("Haltungslaenge")
.HasColumnType("REAL");
b.Property<string>("Hausnummer")
.HasColumnType("TEXT");
b.Property<string>("Inspektionsrichtung")
.HasColumnType("TEXT");
b.Property<uint>("Kanalrohrweite")
.HasColumnType("INTEGER");
b.Property<string>("Objektbezeichnung")
.HasColumnType("TEXT");
b.Property<string>("OrtName")
.HasColumnType("TEXT");
b.Property<int?>("OverrideAuftraggeberId")
.HasColumnType("INTEGER");
b.Property<int?>("ProjektId")
.HasColumnType("INTEGER");
b.Property<string>("Projektnummer")
.HasColumnType("TEXT");
b.Property<string>("RohrMaterial")
.HasColumnType("TEXT");
b.Property<string>("Sanierungsnummer")
.HasColumnType("TEXT");
b.Property<double>("Schachtlaenge")
.HasColumnType("REAL");
b.Property<string>("StrasseName")
.HasColumnType("TEXT");
b.Property<string>("VonPunkt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("OverrideAuftraggeberId");
b.HasIndex("ProjektId");
b.ToTable("InspektionObjekte");
});
modelBuilder.Entity("KlassenBIB.Projekt", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int?>("AuftraggeberId")
.HasColumnType("INTEGER");
b.Property<string>("Nummer")
.HasColumnType("TEXT");
b.Property<string>("Ort")
.HasColumnType("TEXT");
b.Property<string>("SanierungsIDPrefix")
.HasColumnType("TEXT");
b.Property<string>("SanierungsIDSuffix")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("AuftraggeberId");
b.ToTable("Projekte");
});
modelBuilder.Entity("KlassenBIB.Sanierung", b =>
{
b.Property<bool>("GenehmigungVorhanden")
.HasColumnType("INTEGER");
b.Property<Guid>("Guid")
.HasColumnType("TEXT");
b.Property<bool>("HDReinigung")
.HasColumnType("INTEGER");
b.Property<DateTime>("HDReinigungDatum")
.HasColumnType("TEXT");
b.Property<int?>("InspektionsobjektId")
.HasColumnType("INTEGER");
b.Property<bool>("STVOAbsicherung")
.HasColumnType("INTEGER");
b.Property<double>("TempAusen")
.HasColumnType("REAL");
b.Property<double>("TempKanal")
.HasColumnType("REAL");
b.Property<bool>("VorbereitetMechanisch")
.HasColumnType("INTEGER");
b.Property<bool>("VorbereitetRoboter")
.HasColumnType("INTEGER");
b.Property<bool>("WasserhaltungEingerichtet")
.HasColumnType("INTEGER");
b.Property<string>("Wetter")
.HasColumnType("TEXT");
b.HasIndex("InspektionsobjektId");
b.ToTable("Sanierung");
});
modelBuilder.Entity("KlassenBIB.Inspektionsobjekt", b =>
{
b.HasOne("KlassenBIB.Auftraggeber", "OverrideAuftraggeber")
.WithMany()
.HasForeignKey("OverrideAuftraggeberId");
b.HasOne("KlassenBIB.Projekt", null)
.WithMany("Objekte")
.HasForeignKey("ProjektId");
b.Navigation("OverrideAuftraggeber");
});
modelBuilder.Entity("KlassenBIB.Projekt", b =>
{
b.HasOne("KlassenBIB.Auftraggeber", "Auftraggeber")
.WithMany()
.HasForeignKey("AuftraggeberId");
b.Navigation("Auftraggeber");
});
modelBuilder.Entity("KlassenBIB.Sanierung", b =>
{
b.HasOne("KlassenBIB.Inspektionsobjekt", "Inspektionsobjekt")
.WithMany()
.HasForeignKey("InspektionsobjektId");
b.Navigation("Inspektionsobjekt");
});
modelBuilder.Entity("KlassenBIB.Projekt", b =>
{
b.Navigation("Objekte");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -18,6 +18,7 @@ namespace SanSystem
[STAThread] [STAThread]
static void Main() static void Main()
{ {
new Mutex(initiallyOwned: true, "SanVerwaltung", out bool result); new Mutex(initiallyOwned: true, "SanVerwaltung", out bool result);
if(!result) if(!result)
{ {

View File

@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die einer Assembly zugeordnet sind.
[assembly: AssemblyTitle("SanSystem")]
[assembly: AssemblyDescription("Kanalsanierungsverwaltung")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Cosysda")]
[assembly: AssemblyProduct("SanSystem")]
[assembly: AssemblyCopyright("Copyright Cosysda © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
[assembly: ComVisible(false)]
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
[assembly: Guid("c6546a88-8830-4ef2-b99c-b9183171f6ef")]
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
//
// Hauptversion
// Nebenversion
// Buildnummer
// Revision
//
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.3")]
[assembly: AssemblyFileVersion("1.0.0.3")]

View File

@@ -4,7 +4,7 @@ using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using CodeMeter;
namespace SanShared namespace SanShared
{ {
@@ -15,12 +15,12 @@ namespace SanShared
uint ProductCode; uint ProductCode;
public string SyncfusionKey = ""; public string SyncfusionKey = "";
Api cmApi; //Api cmApi;
CmCredential cmCred; //CmCredential cmCred;
CmAccess2 cmAcc; //CmAccess2 cmAcc;
HCMSysEntry hcmse; //HCMSysEntry hcmse;
CmBoxInfo cmBoxInfo; //CmBoxInfo cmBoxInfo;
CmBoxEntry2 BoxContent; //CmBoxEntry2 BoxContent;
public Dongle(uint ProductCode) public Dongle(uint ProductCode)
{ {
@@ -34,66 +34,66 @@ namespace SanShared
#endif #endif
cmApi = new Api(); //cmApi = new Api();
cmCred = new CmCredential(); //cmCred = new CmCredential();
cmAcc = new CmAccess2(); //cmAcc = new CmAccess2();
cmAcc.Credential = cmCred; //cmAcc.Credential = cmCred;
cmAcc.Ctrl |= CmAccess.Option.UserLimit; //cmAcc.Ctrl |= CmAccess.Option.UserLimit;
cmAcc.FirmCode = this.FirmCode; //cmAcc.FirmCode = this.FirmCode;
cmAcc.ProductCode = this.ProductCode; //cmAcc.ProductCode = this.ProductCode;
hcmse = cmApi.CmAccess2(CmAccessOption.Local, cmAcc); //hcmse = cmApi.CmAccess2(CmAccessOption.Local, cmAcc);
if (hcmse == null) //if (hcmse == null)
{ //{
ErrorCodes2 code = cmApi.CmGetLastErrorCode2(); // ErrorCodes2 code = cmApi.CmGetLastErrorCode2();
string output = string.Format("{0}", code); // string output = string.Format("{0}", code);
} //}
if (!CheckDongleVorhanden()) //if (!CheckDongleVorhanden())
throw new Exception("Dongle not connected"); // throw new Exception("Dongle not connected");
cmBoxInfo = new CmBoxInfo(); //cmBoxInfo = new CmBoxInfo();
CmGetBoxContentsOption boxOptions = new CmGetBoxContentsOption(); //CmGetBoxContentsOption boxOptions = new CmGetBoxContentsOption();
boxOptions = CmGetBoxContentsOption.AllEntries; //boxOptions = CmGetBoxContentsOption.AllEntries;
CmBoxEntry2[] tmpBoxContent; //CmBoxEntry2[] tmpBoxContent;
tmpBoxContent = cmApi.CmGetBoxContents2(hcmse, boxOptions, this.FirmCode, cmBoxInfo); //tmpBoxContent = cmApi.CmGetBoxContents2(hcmse, boxOptions, this.FirmCode, cmBoxInfo);
CmEntryData[] pCmBoxEntry = (CmEntryData[])cmApi.CmGetInfo(hcmse, CmGetInfoOption.EntryData); //CmEntryData[] pCmBoxEntry = (CmEntryData[])cmApi.CmGetInfo(hcmse, CmGetInfoOption.EntryData);
for (int i = 0; i < pCmBoxEntry.Length; i++) //for (int i = 0; i < pCmBoxEntry.Length; i++)
{ //{
switch (pCmBoxEntry[i].Ctrl & 0x0ffff) // switch (pCmBoxEntry[i].Ctrl & 0x0ffff)
{ // {
case (uint)CodeMeter.GlobalEntryOption.ProtectedData: // case (uint)CodeMeter.GlobalEntryOption.ProtectedData:
// Transfer to transformed byte // // Transfer to transformed byte
uint length = pCmBoxEntry[i].DataLen; // uint length = pCmBoxEntry[i].DataLen;
byte[] datas = new byte[length]; // byte[] datas = new byte[length];
for(uint f = 0; f < length; f++) // for(uint f = 0; f < length; f++)
{ // {
datas[f] = pCmBoxEntry[i].Data[f]; // datas[f] = pCmBoxEntry[i].Data[f];
} // }
SyncfusionKey = Encoding.ASCII.GetString(datas); // SyncfusionKey = Encoding.ASCII.GetString(datas);
break; // break;
} // }
} //}
foreach (CmBoxEntry2 boxes in tmpBoxContent) //foreach (CmBoxEntry2 boxes in tmpBoxContent)
{ //{
if (boxes.ProductCode == this.ProductCode) // if (boxes.ProductCode == this.ProductCode)
{ // {
this.BoxContent = boxes; // this.BoxContent = boxes;
} // }
} //}
} }
~Dongle() ~Dongle()
{ {
@@ -102,10 +102,8 @@ namespace SanShared
public void CleanDongle() public void CleanDongle()
{ {
#if DEBUG
return; return;
#endif //cmApi.CmRelease(hcmse);
cmApi.CmRelease(hcmse);
} }
public bool CheckDongleVorhanden() public bool CheckDongleVorhanden()
@@ -113,30 +111,32 @@ namespace SanShared
#if LAPTOP #if LAPTOP
return true; return true;
#else #else
if (hcmse == null)
return false;
else
return true; return true;
//if (hcmse == null)
// return false;
//else
// return true;
#endif #endif
} }
public string GetDongleSerial() public string GetDongleSerial()
{ {
return string.Empty;
CmBoxInfo res = (CmBoxInfo)cmApi.CmGetInfo(hcmse, CmGetInfoOption.BoxInfo); //CmBoxInfo res = (CmBoxInfo)cmApi.CmGetInfo(hcmse, CmGetInfoOption.BoxInfo);
if (null != res) //if (null != res)
{ //{
return res.SerialNumber.ToString(); // return res.SerialNumber.ToString();
} //}
else //else
{ //{
throw new Exception("Fehler beim aufrufen der Seriennummer"); // throw new Exception("Fehler beim aufrufen der Seriennummer");
} //}
} }
public uint GetFeatureMap() public uint GetFeatureMap()
{ {
return BoxContent.FeatureMap; return 255;
//return BoxContent.FeatureMap;
} }
public string GetName() public string GetName()
@@ -146,6 +146,7 @@ namespace SanShared
public bool IsLicensed(byte neededMask) public bool IsLicensed(byte neededMask)
{ {
return true;
#if DEBUG #if DEBUG
return true; return true;
#else #else

View File

@@ -2,9 +2,9 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework> <TargetFramework>net9.0-windows7.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>True</GenerateAssemblyInfo>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -18,11 +18,26 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.3" />
<PackageReference Include="Syncfusion.Chart.Windows" Version="20.4.0.43" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.3">
<PackageReference Include="Syncfusion.DocIO.WinForms" Version="20.4.0.43" /> <PrivateAssets>all</PrivateAssets>
<PackageReference Include="Syncfusion.DocToPDFConverter.WinForms" Version="20.4.0.43" /> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="Wibu.CodeMeter.WibuCmNET" Version="7.50.5271.500" /> </PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.3" />
<PackageReference Include="Syncfusion.Chart.Windows" Version="29.1.35" />
<PackageReference Include="Syncfusion.DocToPDFConverter.WinForms" Version="29.1.35" />
</ItemGroup>
<ItemGroup>
<None Update="SanVerwaltung.db">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="SanVerwaltung.db-shm">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
<None Update="SanVerwaltung.db-wal">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<Target Name="PreBuild" BeforeTargets="PreBuildEvent"> <Target Name="PreBuild" BeforeTargets="PreBuildEvent">

View File

@@ -0,0 +1,32 @@
using KlassenBIB;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SanSystem
{
public class SanVerwalterContext : DbContext
{
public DbSet<Projekt> Projekte { get; set; }
public DbSet<Inspektionsobjekt> InspektionObjekte { get; set; }
public DbSet<Sanierung> Sanierung { get; set; }
public DbSet<Auftraggeber> Auftraggebers { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseSqlite("Data Source=SanVerwaltung.db");
base.OnConfiguring(optionsBuilder);
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Sanierung>().HasNoKey();
base.OnModelCreating(modelBuilder);
}
}
}

BIN
SanSystem/SanVerwaltung.db Normal file

Binary file not shown.

View File

@@ -188,7 +188,7 @@ namespace SchnittstelleImporter
inspektionskuerzelns.Add(inspektionskuerzeln); inspektionskuerzelns.Add(inspektionskuerzeln);
} }
inspektionsobjekt.Schadenskuerzeln = inspektionskuerzelns; //inspektionsobjekt.Schadenskuerzeln = inspektionskuerzelns;
result.Add(inspektionsobjekt); result.Add(inspektionsobjekt);
} }

View File

@@ -319,7 +319,7 @@ namespace SanSystem
{ {
MessageBox.Show("Warnung, es wurden keine Daten von der Anlage geladen, Grafik konnte nicht erstellt werden"); MessageBox.Show("Warnung, es wurden keine Daten von der Anlage geladen, Grafik konnte nicht erstellt werden");
} }
Hashtable hashtable = inliner.MakeProtokoll(destinationPath, Database.Datenbank.Instance.loadedProjekt,inliner.Offset); Hashtable hashtable = new Hashtable(); //inliner.MakeProtokoll(destinationPath, Database.Datenbank.Instance.loadedProjekt,inliner.Offset);
DirectoryInfo directory = Directory.GetParent(destinationPath); DirectoryInfo directory = Directory.GetParent(destinationPath);
string speicherpfad = directory.FullName; string speicherpfad = directory.FullName;
speicherpfad = Path.Combine(speicherpfad, "Einbauprotokolle"); speicherpfad = Path.Combine(speicherpfad, "Einbauprotokolle");

View File

@@ -154,8 +154,9 @@ namespace SanSystem
private void FrmProjektList_FormClosed(object sender, FormClosedEventArgs e) private void FrmProjektList_FormClosed(object sender, FormClosedEventArgs e)
{ {
if(Datenbank.Instance.loadedProjekt.Auftraggeber.Name == null) /*if(Datenbank.Instance.loadedProjekt.Auftraggeber.Name == null)
showauftraggeberform(); showauftraggeberform();
*/
toolStripStatus_projekt_Label.Text = Global.Instance.ProjektNummer; toolStripStatus_projekt_Label.Text = Global.Instance.ProjektNummer;
Form[] openedWindows = this.MdiChildren; Form[] openedWindows = this.MdiChildren;
@@ -331,10 +332,10 @@ namespace SanSystem
} }
} }
string destinationPath = san.CheckVerzeichnisse(Global.Instance.Projektpfad); string destinationPath = san.CheckVerzeichnisse(Global.Instance.Projektpfad);
Hashtable hashtable = san.MakeProtokoll(destinationPath, Database.Datenbank.Instance.loadedProjekt, DateTime.MinValue); //Hashtable hashtable = san.MakeProtokoll(destinationPath, Database.Datenbank.Instance.loadedProjekt, DateTime.MinValue);
DirectoryInfo directory = Directory.GetParent(destinationPath); DirectoryInfo directory = Directory.GetParent(destinationPath);
string speicherpfad = Path.Combine(directory.FullName,"Einbauprotokolle"); string speicherpfad = Path.Combine(directory.FullName,"Einbauprotokolle");
BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "liner_einbauBlueLight.docx", speicherpfad, san.Inspektionsobjekt.Objektbezeichnung, hashtable, bilder,null,true); //BerichtGen.FrmOptions options = new BerichtGen.FrmOptions("JUME", "liner_einbauBlueLight.docx", speicherpfad, san.Inspektionsobjekt.Objektbezeichnung, hashtable, bilder,null,true);
} }
//options.ShowDialog(); //options.ShowDialog();

View File

@@ -108,10 +108,10 @@
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.dgv_sanierungen); this.tabPage2.Controls.Add(this.dgv_sanierungen);
this.tabPage2.Location = new System.Drawing.Point(4, 29); this.tabPage2.Location = new System.Drawing.Point(4, 34);
this.tabPage2.Name = "tabPage2"; this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3); this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1282, 656); this.tabPage2.Size = new System.Drawing.Size(1282, 651);
this.tabPage2.TabIndex = 2; this.tabPage2.TabIndex = 2;
this.tabPage2.Text = "tabPage2"; this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
@@ -130,10 +130,10 @@
// Kanalinformationen // Kanalinformationen
// //
this.Kanalinformationen.Controls.Add(this.dgv_schadenkuerzel); this.Kanalinformationen.Controls.Add(this.dgv_schadenkuerzel);
this.Kanalinformationen.Location = new System.Drawing.Point(4, 29); this.Kanalinformationen.Location = new System.Drawing.Point(4, 34);
this.Kanalinformationen.Name = "Kanalinformationen"; this.Kanalinformationen.Name = "Kanalinformationen";
this.Kanalinformationen.Padding = new System.Windows.Forms.Padding(3); this.Kanalinformationen.Padding = new System.Windows.Forms.Padding(3);
this.Kanalinformationen.Size = new System.Drawing.Size(1282, 656); this.Kanalinformationen.Size = new System.Drawing.Size(1282, 651);
this.Kanalinformationen.TabIndex = 1; this.Kanalinformationen.TabIndex = 1;
this.Kanalinformationen.Text = "Kanalinformationen"; this.Kanalinformationen.Text = "Kanalinformationen";
this.Kanalinformationen.UseVisualStyleBackColor = true; this.Kanalinformationen.UseVisualStyleBackColor = true;
@@ -182,11 +182,11 @@
this.tabPage1.Controls.Add(this.label2); this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.label1); this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.tabPage1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.tabPage1.Location = new System.Drawing.Point(4, 29); this.tabPage1.Location = new System.Drawing.Point(4, 34);
this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tabPage1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage1.Name = "tabPage1"; this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); this.tabPage1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.tabPage1.Size = new System.Drawing.Size(1282, 656); this.tabPage1.Size = new System.Drawing.Size(1282, 651);
this.tabPage1.TabIndex = 0; this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "Grunddaten"; this.tabPage1.Text = "Grunddaten";
this.tabPage1.UseVisualStyleBackColor = true; this.tabPage1.UseVisualStyleBackColor = true;
@@ -208,9 +208,9 @@
this.cb_overrideAuftraggeber.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_overrideAuftraggeber.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cb_overrideAuftraggeber.Location = new System.Drawing.Point(590, 191); this.cb_overrideAuftraggeber.Location = new System.Drawing.Point(590, 191);
this.cb_overrideAuftraggeber.Name = "cb_overrideAuftraggeber"; this.cb_overrideAuftraggeber.Name = "cb_overrideAuftraggeber";
this.cb_overrideAuftraggeber.Size = new System.Drawing.Size(190, 24); this.cb_overrideAuftraggeber.Size = new System.Drawing.Size(279, 29);
this.cb_overrideAuftraggeber.TabIndex = 33; this.cb_overrideAuftraggeber.TabIndex = 33;
this.cb_overrideAuftraggeber.Text = "Spezielle Auftraggeber"; this.cb_overrideAuftraggeber.Text = "Auftraggeber Überschreiben";
this.cb_overrideAuftraggeber.UseVisualStyleBackColor = true; this.cb_overrideAuftraggeber.UseVisualStyleBackColor = true;
this.cb_overrideAuftraggeber.CheckedChanged += new System.EventHandler(this.Cb_overrideAuftraggeber_CheckedChanged); this.cb_overrideAuftraggeber.CheckedChanged += new System.EventHandler(this.Cb_overrideAuftraggeber_CheckedChanged);
// //
@@ -219,7 +219,7 @@
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.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.Location = new System.Drawing.Point(745, 29);
this.txt_san_nr.Name = "txt_san_nr"; this.txt_san_nr.Name = "txt_san_nr";
this.txt_san_nr.Size = new System.Drawing.Size(191, 26); this.txt_san_nr.Size = new System.Drawing.Size(191, 30);
this.txt_san_nr.TabIndex = 7; this.txt_san_nr.TabIndex = 7;
// //
// txt_ort // txt_ort
@@ -227,7 +227,7 @@
this.txt_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_ort.Location = new System.Drawing.Point(745, 145); this.txt_ort.Location = new System.Drawing.Point(745, 145);
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, 30);
this.txt_ort.TabIndex = 9; this.txt_ort.TabIndex = 9;
// //
// txt_bemerkung // txt_bemerkung
@@ -243,7 +243,7 @@
this.txt_objekt_name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_objekt_name.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_objekt_name.Location = new System.Drawing.Point(192, 67); this.txt_objekt_name.Location = new System.Drawing.Point(192, 67);
this.txt_objekt_name.Name = "txt_objekt_name"; this.txt_objekt_name.Name = "txt_objekt_name";
this.txt_objekt_name.Size = new System.Drawing.Size(330, 26); this.txt_objekt_name.Size = new System.Drawing.Size(330, 30);
this.txt_objekt_name.TabIndex = 2; this.txt_objekt_name.TabIndex = 2;
// //
// txt_hausnummer // txt_hausnummer
@@ -252,7 +252,7 @@
this.txt_hausnummer.Location = new System.Drawing.Point(745, 107); this.txt_hausnummer.Location = new System.Drawing.Point(745, 107);
this.txt_hausnummer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_hausnummer.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_hausnummer.Name = "txt_hausnummer"; this.txt_hausnummer.Name = "txt_hausnummer";
this.txt_hausnummer.Size = new System.Drawing.Size(148, 26); this.txt_hausnummer.Size = new System.Drawing.Size(148, 30);
this.txt_hausnummer.TabIndex = 8; this.txt_hausnummer.TabIndex = 8;
// //
// txt_strasse // txt_strasse
@@ -261,7 +261,7 @@
this.txt_strasse.Location = new System.Drawing.Point(745, 67); this.txt_strasse.Location = new System.Drawing.Point(745, 67);
this.txt_strasse.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_strasse.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_strasse.Name = "txt_strasse"; this.txt_strasse.Name = "txt_strasse";
this.txt_strasse.Size = new System.Drawing.Size(320, 26); this.txt_strasse.Size = new System.Drawing.Size(320, 30);
this.txt_strasse.TabIndex = 7; this.txt_strasse.TabIndex = 7;
// //
// txt_dn // txt_dn
@@ -270,7 +270,7 @@
this.txt_dn.Location = new System.Drawing.Point(192, 201); this.txt_dn.Location = new System.Drawing.Point(192, 201);
this.txt_dn.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_dn.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_dn.Name = "txt_dn"; this.txt_dn.Name = "txt_dn";
this.txt_dn.Size = new System.Drawing.Size(330, 26); this.txt_dn.Size = new System.Drawing.Size(330, 30);
this.txt_dn.TabIndex = 5; this.txt_dn.TabIndex = 5;
// //
// txt_punkt_bis // txt_punkt_bis
@@ -279,7 +279,7 @@
this.txt_punkt_bis.Location = new System.Drawing.Point(192, 153); this.txt_punkt_bis.Location = new System.Drawing.Point(192, 153);
this.txt_punkt_bis.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_punkt_bis.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_punkt_bis.Name = "txt_punkt_bis"; this.txt_punkt_bis.Name = "txt_punkt_bis";
this.txt_punkt_bis.Size = new System.Drawing.Size(330, 26); this.txt_punkt_bis.Size = new System.Drawing.Size(330, 30);
this.txt_punkt_bis.TabIndex = 4; this.txt_punkt_bis.TabIndex = 4;
this.txt_punkt_bis.Leave += new System.EventHandler(this.Txt_punkt_bis_Leave); this.txt_punkt_bis.Leave += new System.EventHandler(this.Txt_punkt_bis_Leave);
// //
@@ -289,7 +289,7 @@
this.txt_punkt_von.Location = new System.Drawing.Point(192, 107); this.txt_punkt_von.Location = new System.Drawing.Point(192, 107);
this.txt_punkt_von.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_punkt_von.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
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, 30);
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); this.txt_punkt_von.TextChanged += new System.EventHandler(this.txt_punkt_von_TextChanged);
// //
@@ -299,7 +299,7 @@
this.txt_pro_nr.Location = new System.Drawing.Point(192, 31); this.txt_pro_nr.Location = new System.Drawing.Point(192, 31);
this.txt_pro_nr.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.txt_pro_nr.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.txt_pro_nr.Name = "txt_pro_nr"; this.txt_pro_nr.Name = "txt_pro_nr";
this.txt_pro_nr.Size = new System.Drawing.Size(330, 26); this.txt_pro_nr.Size = new System.Drawing.Size(330, 30);
this.txt_pro_nr.TabIndex = 1; this.txt_pro_nr.TabIndex = 1;
// //
// label9 // label9
@@ -308,7 +308,7 @@
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 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.Location = new System.Drawing.Point(585, 32);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(66, 20); this.label9.Size = new System.Drawing.Size(84, 25);
this.label9.TabIndex = 32; this.label9.TabIndex = 32;
this.label9.Text = "SAN. Nr"; this.label9.Text = "SAN. Nr";
// //
@@ -331,7 +331,7 @@
this.cb_objekname_man.AutoSize = true; this.cb_objekname_man.AutoSize = true;
this.cb_objekname_man.Location = new System.Drawing.Point(108, 70); this.cb_objekname_man.Location = new System.Drawing.Point(108, 70);
this.cb_objekname_man.Name = "cb_objekname_man"; this.cb_objekname_man.Name = "cb_objekname_man";
this.cb_objekname_man.Size = new System.Drawing.Size(59, 20); this.cb_objekname_man.Size = new System.Drawing.Size(72, 24);
this.cb_objekname_man.TabIndex = 29; this.cb_objekname_man.TabIndex = 29;
this.cb_objekname_man.Text = "man?"; this.cb_objekname_man.Text = "man?";
this.cb_objekname_man.UseVisualStyleBackColor = true; this.cb_objekname_man.UseVisualStyleBackColor = true;
@@ -343,7 +343,7 @@
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 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(601, 340); this.label8.Location = new System.Drawing.Point(601, 340);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(91, 20); this.label8.Size = new System.Drawing.Size(112, 25);
this.label8.TabIndex = 28; this.label8.TabIndex = 28;
this.label8.Text = "Bemerkung"; this.label8.Text = "Bemerkung";
// //
@@ -353,7 +353,7 @@
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(584, 148); this.label7.Location = new System.Drawing.Point(584, 148);
this.label7.Name = "label7"; this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(31, 20); this.label7.Size = new System.Drawing.Size(39, 25);
this.label7.TabIndex = 27; this.label7.TabIndex = 27;
this.label7.Text = "Ort"; this.label7.Text = "Ort";
// //
@@ -363,7 +363,7 @@
this.lbl_objektname.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_objektname.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_objektname.Location = new System.Drawing.Point(9, 70); this.lbl_objektname.Location = new System.Drawing.Point(9, 70);
this.lbl_objektname.Name = "lbl_objektname"; this.lbl_objektname.Name = "lbl_objektname";
this.lbl_objektname.Size = new System.Drawing.Size(95, 20); this.lbl_objektname.Size = new System.Drawing.Size(118, 25);
this.lbl_objektname.TabIndex = 25; this.lbl_objektname.TabIndex = 25;
this.lbl_objektname.Text = "Objektname"; this.lbl_objektname.Text = "Objektname";
// //
@@ -410,7 +410,7 @@
"Ziegelwerk"}); "Ziegelwerk"});
this.cb_material.Location = new System.Drawing.Point(192, 252); this.cb_material.Location = new System.Drawing.Point(192, 252);
this.cb_material.Name = "cb_material"; this.cb_material.Name = "cb_material";
this.cb_material.Size = new System.Drawing.Size(323, 28); this.cb_material.Size = new System.Drawing.Size(323, 33);
this.cb_material.TabIndex = 6; this.cb_material.TabIndex = 6;
// //
// groupBox2 // groupBox2
@@ -432,7 +432,7 @@
this.txt_haltungslaenge.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_haltungslaenge.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_haltungslaenge.Location = new System.Drawing.Point(188, 21); this.txt_haltungslaenge.Location = new System.Drawing.Point(188, 21);
this.txt_haltungslaenge.Name = "txt_haltungslaenge"; this.txt_haltungslaenge.Name = "txt_haltungslaenge";
this.txt_haltungslaenge.Size = new System.Drawing.Size(136, 26); this.txt_haltungslaenge.Size = new System.Drawing.Size(136, 30);
this.txt_haltungslaenge.TabIndex = 11; this.txt_haltungslaenge.TabIndex = 11;
// //
// txt_laenge_schacht // txt_laenge_schacht
@@ -440,7 +440,7 @@
this.txt_laenge_schacht.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_laenge_schacht.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_laenge_schacht.Location = new System.Drawing.Point(188, 112); this.txt_laenge_schacht.Location = new System.Drawing.Point(188, 112);
this.txt_laenge_schacht.Name = "txt_laenge_schacht"; this.txt_laenge_schacht.Name = "txt_laenge_schacht";
this.txt_laenge_schacht.Size = new System.Drawing.Size(136, 26); this.txt_laenge_schacht.Size = new System.Drawing.Size(136, 30);
this.txt_laenge_schacht.TabIndex = 13; this.txt_laenge_schacht.TabIndex = 13;
// //
// label21 // label21
@@ -449,7 +449,7 @@
this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label21.Location = new System.Drawing.Point(6, 114); this.label21.Location = new System.Drawing.Point(6, 114);
this.label21.Name = "label21"; this.label21.Name = "label21";
this.label21.Size = new System.Drawing.Size(107, 20); this.label21.Size = new System.Drawing.Size(132, 25);
this.label21.TabIndex = 21; this.label21.TabIndex = 21;
this.label21.Text = "Schachtlänge"; this.label21.Text = "Schachtlänge";
// //
@@ -459,7 +459,7 @@
this.cb_geschlossenesEnde.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.cb_geschlossenesEnde.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cb_geschlossenesEnde.Location = new System.Drawing.Point(9, 75); this.cb_geschlossenesEnde.Location = new System.Drawing.Point(9, 75);
this.cb_geschlossenesEnde.Name = "cb_geschlossenesEnde"; this.cb_geschlossenesEnde.Name = "cb_geschlossenesEnde";
this.cb_geschlossenesEnde.Size = new System.Drawing.Size(172, 24); this.cb_geschlossenesEnde.Size = new System.Drawing.Size(210, 29);
this.cb_geschlossenesEnde.TabIndex = 12; this.cb_geschlossenesEnde.TabIndex = 12;
this.cb_geschlossenesEnde.Text = "Geschlossene Ende"; this.cb_geschlossenesEnde.Text = "Geschlossene Ende";
this.cb_geschlossenesEnde.UseVisualStyleBackColor = true; this.cb_geschlossenesEnde.UseVisualStyleBackColor = true;
@@ -471,7 +471,7 @@
this.label6.Location = new System.Drawing.Point(5, 26); this.label6.Location = new System.Drawing.Point(5, 26);
this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(112, 20); this.label6.Size = new System.Drawing.Size(137, 25);
this.label6.TabIndex = 5; this.label6.TabIndex = 5;
this.label6.Text = "Haltungslänge"; this.label6.Text = "Haltungslänge";
// //
@@ -484,7 +484,7 @@
this.dt_haltunggemessen_datum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.dt_haltunggemessen_datum.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.dt_haltunggemessen_datum.Name = "dt_haltunggemessen_datum"; this.dt_haltunggemessen_datum.Name = "dt_haltunggemessen_datum";
this.dt_haltunggemessen_datum.RightToLeft = System.Windows.Forms.RightToLeft.No; this.dt_haltunggemessen_datum.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.dt_haltunggemessen_datum.Size = new System.Drawing.Size(354, 26); this.dt_haltunggemessen_datum.Size = new System.Drawing.Size(354, 30);
this.dt_haltunggemessen_datum.TabIndex = 10; this.dt_haltunggemessen_datum.TabIndex = 10;
// //
// label20 // label20
@@ -494,7 +494,7 @@
this.label20.Location = new System.Drawing.Point(8, 300); this.label20.Location = new System.Drawing.Point(8, 300);
this.label20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label20.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label20.Name = "label20"; this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(216, 20); this.label20.Size = new System.Drawing.Size(265, 25);
this.label20.TabIndex = 16; this.label20.TabIndex = 16;
this.label20.Text = "Haltungslänge gemessen am"; this.label20.Text = "Haltungslänge gemessen am";
// //
@@ -505,7 +505,7 @@
this.label19.Location = new System.Drawing.Point(584, 111); this.label19.Location = new System.Drawing.Point(584, 111);
this.label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label19.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label19.Name = "label19"; this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(105, 20); this.label19.Size = new System.Drawing.Size(129, 25);
this.label19.TabIndex = 13; this.label19.TabIndex = 13;
this.label19.Text = "Hausnummer"; this.label19.Text = "Hausnummer";
// //
@@ -516,7 +516,7 @@
this.label18.Location = new System.Drawing.Point(584, 72); this.label18.Location = new System.Drawing.Point(584, 72);
this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label18.Name = "label18"; this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(64, 20); this.label18.Size = new System.Drawing.Size(79, 25);
this.label18.TabIndex = 12; this.label18.TabIndex = 12;
this.label18.Text = "Strasse"; this.label18.Text = "Strasse";
// //
@@ -527,7 +527,7 @@
this.label5.Location = new System.Drawing.Point(9, 255); this.label5.Location = new System.Drawing.Point(9, 255);
this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(65, 20); this.label5.Size = new System.Drawing.Size(81, 25);
this.label5.TabIndex = 4; this.label5.TabIndex = 4;
this.label5.Text = "Material"; this.label5.Text = "Material";
// //
@@ -538,7 +538,7 @@
this.label4.Location = new System.Drawing.Point(9, 204); this.label4.Location = new System.Drawing.Point(9, 204);
this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(104, 20); this.label4.Size = new System.Drawing.Size(128, 25);
this.label4.TabIndex = 3; this.label4.TabIndex = 3;
this.label4.Text = "Durchmesser"; this.label4.Text = "Durchmesser";
// //
@@ -549,7 +549,7 @@
this.label3.Location = new System.Drawing.Point(9, 156); this.label3.Location = new System.Drawing.Point(9, 156);
this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(76, 20); this.label3.Size = new System.Drawing.Size(94, 25);
this.label3.TabIndex = 2; this.label3.TabIndex = 2;
this.label3.Text = "Bis Punkt"; this.label3.Text = "Bis Punkt";
// //
@@ -560,7 +560,7 @@
this.label2.Location = new System.Drawing.Point(9, 110); this.label2.Location = new System.Drawing.Point(9, 110);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(83, 20); this.label2.Size = new System.Drawing.Size(103, 25);
this.label2.TabIndex = 1; this.label2.TabIndex = 1;
this.label2.Text = "Von Punkt"; this.label2.Text = "Von Punkt";
// //
@@ -571,7 +571,7 @@
this.label1.Location = new System.Drawing.Point(9, 35); this.label1.Location = new System.Drawing.Point(9, 35);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(116, 20); this.label1.Size = new System.Drawing.Size(143, 25);
this.label1.TabIndex = 0; this.label1.TabIndex = 0;
this.label1.Text = "Projektnummer"; this.label1.Text = "Projektnummer";
// //
@@ -591,7 +591,7 @@
// //
// frmObjektEdit // frmObjektEdit
// //
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.AutoSize = true; this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(1290, 689); this.ClientSize = new System.Drawing.Size(1290, 689);

View File

@@ -40,8 +40,8 @@ namespace SanSystem
tabControl1.TabPages.RemoveAt(2); tabControl1.TabPages.RemoveAt(2);
tabControl1.TabPages.RemoveAt(1); tabControl1.TabPages.RemoveAt(1);
#endif #endif
dgv_schadenkuerzel.DataSource = inspektion.Schadenskuerzeln; //dgv_schadenkuerzel.DataSource = inspektion.Schadenskuerzeln;
dgv_sanierungen.DataSource = inspektion.AusgefuehrteTaetigkeiten; //dgv_sanierungen.DataSource = inspektion.AusgefuehrteTaetigkeiten;
foreach(Sanierung san in inspektion.Sanierung) foreach(Sanierung san in inspektion.Sanierung)
{ {
@@ -283,7 +283,7 @@ namespace SanSystem
private void FrmAuftraggeberEdit_FormClosed(object sender, FormClosedEventArgs e) private void FrmAuftraggeberEdit_FormClosed(object sender, FormClosedEventArgs e)
{ {
inspektionsobjekt.OverrideAuftraggeber = (sender as frmAuftraggeberEdit).Auftraggeber; //inspektionsobjekt.OverrideAuftraggeber = (sender as frmAuftraggeberEdit).Auftraggeber;
} }
} }

View File

@@ -65,6 +65,7 @@
this.dGObjekte.Margin = new System.Windows.Forms.Padding(2); this.dGObjekte.Margin = new System.Windows.Forms.Padding(2);
this.dGObjekte.MultiSelect = false; this.dGObjekte.MultiSelect = false;
this.dGObjekte.Name = "dGObjekte"; this.dGObjekte.Name = "dGObjekte";
this.dGObjekte.RowHeadersWidth = 51;
this.dGObjekte.RowTemplate.Height = 24; this.dGObjekte.RowTemplate.Height = 24;
this.dGObjekte.Size = new System.Drawing.Size(499, 238); this.dGObjekte.Size = new System.Drawing.Size(499, 238);
this.dGObjekte.TabIndex = 0; this.dGObjekte.TabIndex = 0;
@@ -90,7 +91,7 @@
this.lbl_street.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_street.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_street.Location = new System.Drawing.Point(6, 9); this.lbl_street.Location = new System.Drawing.Point(6, 9);
this.lbl_street.Name = "lbl_street"; this.lbl_street.Name = "lbl_street";
this.lbl_street.Size = new System.Drawing.Size(104, 20); this.lbl_street.Size = new System.Drawing.Size(128, 25);
this.lbl_street.TabIndex = 2; this.lbl_street.TabIndex = 2;
this.lbl_street.Text = "Strassename"; this.lbl_street.Text = "Strassename";
// //
@@ -100,7 +101,7 @@
this.lbl_projekt.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_projekt.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_projekt.Location = new System.Drawing.Point(6, 49); this.lbl_projekt.Location = new System.Drawing.Point(6, 49);
this.lbl_projekt.Name = "lbl_projekt"; this.lbl_projekt.Name = "lbl_projekt";
this.lbl_projekt.Size = new System.Drawing.Size(116, 20); this.lbl_projekt.Size = new System.Drawing.Size(143, 25);
this.lbl_projekt.TabIndex = 3; this.lbl_projekt.TabIndex = 3;
this.lbl_projekt.Text = "Projektnummer"; this.lbl_projekt.Text = "Projektnummer";
// //
@@ -109,7 +110,7 @@
this.txt_strasse.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_strasse.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_strasse.Location = new System.Drawing.Point(157, 6); this.txt_strasse.Location = new System.Drawing.Point(157, 6);
this.txt_strasse.Name = "txt_strasse"; this.txt_strasse.Name = "txt_strasse";
this.txt_strasse.Size = new System.Drawing.Size(352, 26); this.txt_strasse.Size = new System.Drawing.Size(352, 30);
this.txt_strasse.TabIndex = 4; this.txt_strasse.TabIndex = 4;
// //
// txt_pro_nr_1 // txt_pro_nr_1
@@ -117,7 +118,7 @@
this.txt_pro_nr_1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_pro_nr_1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_pro_nr_1.Location = new System.Drawing.Point(157, 46); this.txt_pro_nr_1.Location = new System.Drawing.Point(157, 46);
this.txt_pro_nr_1.Name = "txt_pro_nr_1"; this.txt_pro_nr_1.Name = "txt_pro_nr_1";
this.txt_pro_nr_1.Size = new System.Drawing.Size(100, 26); this.txt_pro_nr_1.Size = new System.Drawing.Size(100, 30);
this.txt_pro_nr_1.TabIndex = 5; this.txt_pro_nr_1.TabIndex = 5;
// //
// label3 // label3
@@ -126,7 +127,7 @@
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(263, 49); this.label3.Location = new System.Drawing.Point(263, 49);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(14, 20); this.label3.Size = new System.Drawing.Size(19, 25);
this.label3.TabIndex = 6; this.label3.TabIndex = 6;
this.label3.Text = "-"; this.label3.Text = "-";
// //
@@ -136,7 +137,7 @@
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(389, 49); this.label4.Location = new System.Drawing.Point(389, 49);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(14, 20); this.label4.Size = new System.Drawing.Size(19, 25);
this.label4.TabIndex = 7; this.label4.TabIndex = 7;
this.label4.Text = "-"; this.label4.Text = "-";
// //
@@ -145,7 +146,7 @@
this.txt_pro_nr_2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_pro_nr_2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_pro_nr_2.Location = new System.Drawing.Point(283, 46); this.txt_pro_nr_2.Location = new System.Drawing.Point(283, 46);
this.txt_pro_nr_2.Name = "txt_pro_nr_2"; this.txt_pro_nr_2.Name = "txt_pro_nr_2";
this.txt_pro_nr_2.Size = new System.Drawing.Size(100, 26); this.txt_pro_nr_2.Size = new System.Drawing.Size(100, 30);
this.txt_pro_nr_2.TabIndex = 8; this.txt_pro_nr_2.TabIndex = 8;
// //
// txt_pro_nr_3 // txt_pro_nr_3
@@ -153,7 +154,7 @@
this.txt_pro_nr_3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_pro_nr_3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_pro_nr_3.Location = new System.Drawing.Point(409, 46); this.txt_pro_nr_3.Location = new System.Drawing.Point(409, 46);
this.txt_pro_nr_3.Name = "txt_pro_nr_3"; this.txt_pro_nr_3.Name = "txt_pro_nr_3";
this.txt_pro_nr_3.Size = new System.Drawing.Size(100, 26); this.txt_pro_nr_3.Size = new System.Drawing.Size(100, 30);
this.txt_pro_nr_3.TabIndex = 9; this.txt_pro_nr_3.TabIndex = 9;
// //
// lbl_ort // lbl_ort
@@ -162,7 +163,7 @@
this.lbl_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_ort.Location = new System.Drawing.Point(549, 9); this.lbl_ort.Location = new System.Drawing.Point(549, 9);
this.lbl_ort.Name = "lbl_ort"; this.lbl_ort.Name = "lbl_ort";
this.lbl_ort.Size = new System.Drawing.Size(31, 20); this.lbl_ort.Size = new System.Drawing.Size(39, 25);
this.lbl_ort.TabIndex = 10; this.lbl_ort.TabIndex = 10;
this.lbl_ort.Text = "Ort"; this.lbl_ort.Text = "Ort";
// //
@@ -171,7 +172,7 @@
this.txt_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txt_ort.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_ort.Location = new System.Drawing.Point(604, 6); this.txt_ort.Location = new System.Drawing.Point(604, 6);
this.txt_ort.Name = "txt_ort"; this.txt_ort.Name = "txt_ort";
this.txt_ort.Size = new System.Drawing.Size(235, 26); this.txt_ort.Size = new System.Drawing.Size(235, 30);
this.txt_ort.TabIndex = 11; this.txt_ort.TabIndex = 11;
// //
// label1 // label1
@@ -180,7 +181,7 @@
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(15, 25); this.label1.Location = new System.Drawing.Point(15, 25);
this.label1.Name = "label1"; this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(25, 20); this.label1.Size = new System.Drawing.Size(32, 25);
this.label1.TabIndex = 12; this.label1.TabIndex = 12;
this.label1.Text = " "; this.label1.Text = " ";
// //
@@ -190,7 +191,7 @@
this.lbl_projwrong.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_projwrong.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_projwrong.Location = new System.Drawing.Point(46, 25); this.lbl_projwrong.Location = new System.Drawing.Point(46, 25);
this.lbl_projwrong.Name = "lbl_projwrong"; this.lbl_projwrong.Name = "lbl_projwrong";
this.lbl_projwrong.Size = new System.Drawing.Size(224, 20); this.lbl_projwrong.Size = new System.Drawing.Size(276, 25);
this.lbl_projwrong.TabIndex = 13; this.lbl_projwrong.TabIndex = 13;
this.lbl_projwrong.Text = "Projektnummer nicht vergeben"; this.lbl_projwrong.Text = "Projektnummer nicht vergeben";
// //
@@ -200,7 +201,7 @@
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(15, 51); this.label5.Location = new System.Drawing.Point(15, 51);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(25, 20); this.label5.Size = new System.Drawing.Size(32, 25);
this.label5.TabIndex = 14; this.label5.TabIndex = 14;
this.label5.Text = " "; this.label5.Text = " ";
// //
@@ -210,7 +211,7 @@
this.lbl_grounddata.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lbl_grounddata.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_grounddata.Location = new System.Drawing.Point(46, 51); this.lbl_grounddata.Location = new System.Drawing.Point(46, 51);
this.lbl_grounddata.Name = "lbl_grounddata"; this.lbl_grounddata.Name = "lbl_grounddata";
this.lbl_grounddata.Size = new System.Drawing.Size(282, 20); this.lbl_grounddata.Size = new System.Drawing.Size(345, 25);
this.lbl_grounddata.TabIndex = 15; this.lbl_grounddata.TabIndex = 15;
this.lbl_grounddata.Text = "Grunddaten sind nicht richtig vergeben"; this.lbl_grounddata.Text = "Grunddaten sind nicht richtig vergeben";
// //
@@ -254,7 +255,7 @@
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.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(423, 53);
this.btn_set_kali.TabIndex = 19; this.btn_set_kali.TabIndex = 19;
this.btn_set_kali.Text = "Ausgewählte mit Linergrundlagen versehen"; this.btn_set_kali.Text = "Ausgewählte mit Linergrundlagen versehen";
this.btn_set_kali.UseVisualStyleBackColor = true; this.btn_set_kali.UseVisualStyleBackColor = true;

View File

@@ -189,7 +189,7 @@ namespace SanSystem
private void btn_add_Click(object sender, EventArgs e) private void btn_add_Click(object sender, EventArgs e)
{ {
Inspektionsobjekt inspektionsobjekt = new Inspektionsobjekt(); Inspektionsobjekt inspektionsobjekt = new Inspektionsobjekt();
inspektionsobjekt.Guid = Guid.NewGuid(); //inspektionsobjekt.Guid = Guid.NewGuid();
inspektionsobjekt.Projektnummer = inspektionsobjekte.First().Projektnummer; inspektionsobjekt.Projektnummer = inspektionsobjekte.First().Projektnummer;
inspektionsobjekt.OrtName = inspektionsobjekte.First().OrtName; inspektionsobjekt.OrtName = inspektionsobjekte.First().OrtName;
inspektionsobjekt.StrasseName = inspektionsobjekte.First().StrasseName; inspektionsobjekt.StrasseName = inspektionsobjekte.First().StrasseName;
@@ -255,6 +255,7 @@ namespace SanSystem
private void btn_make_ausdruck_Click(object sender, EventArgs e) private void btn_make_ausdruck_Click(object sender, EventArgs e)
{ {
return;
List<Inspektionsobjekt> ausdruck = new List<Inspektionsobjekt>(); List<Inspektionsobjekt> ausdruck = new List<Inspektionsobjekt>();
DataGridViewCheckBoxCell checkBoxCell = null; DataGridViewCheckBoxCell checkBoxCell = null;

View File

@@ -29,24 +29,15 @@ namespace SanSystem
private void frmProjektList_Load(object sender, EventArgs e) private void frmProjektList_Load(object sender, EventArgs e)
{ {
using(var context = new SanVerwalterContext())
foreach(Projekt projekt in Datenbank.Instance.TeufelDB.Projekte)
{ {
if (projekt.Nummer == null) List<Projekt> list = context.Projekte.ToList();
foreach(Projekt projekt in list)
{ {
Datenbank.Instance.TeufelDB.Projekte.Remove(projekt);
if(Debugger.IsAttached)
{
Debugger.Break();
}
else
{
continue;
}
}
lb_projekte.Items.Add(projekt.Nummer); lb_projekte.Items.Add(projekt.Nummer);
} }
} }
}
private void btn_ok_Click(object sender, EventArgs e) private void btn_ok_Click(object sender, EventArgs e)
{ {

View File

@@ -47,6 +47,7 @@ namespace SanSystem
private void buildSortedSteetList() private void buildSortedSteetList()
{ {
List<string> ortteile = Datenbank.Instance.loadedProjekt.Objekte.Select(x => x.OrtName).Distinct().ToList(); List<string> ortteile = Datenbank.Instance.loadedProjekt.Objekte.Select(x => x.OrtName).Distinct().ToList();
int aktuellOpened = -1; int aktuellOpened = -1;
bool aktuelleStrasse = false; bool aktuelleStrasse = false;
@@ -110,6 +111,7 @@ namespace SanSystem
private void buildUnsortedStreetList() private void buildUnsortedStreetList()
{ {
List<string> strassen = Datenbank.Instance.loadedProjekt.Objekte.Select(x => x.StrasseName).Distinct().ToList(); List<string> strassen = Datenbank.Instance.loadedProjekt.Objekte.Select(x => x.StrasseName).Distinct().ToList();
List<string> streets = new List<string>(); List<string> streets = new List<string>();
@@ -129,6 +131,9 @@ namespace SanSystem
private void frmStrassenList_Load(object sender, EventArgs e) private void frmStrassenList_Load(object sender, EventArgs e)
{ {
this.Height = this.MdiParent.Height - 120; this.Height = this.MdiParent.Height - 120;
if(streetListSetting.SortedSelected()) if(streetListSetting.SortedSelected())
{ {
@@ -147,6 +152,11 @@ namespace SanSystem
private void btn_add_Click(object sender, EventArgs e) private void btn_add_Click(object sender, EventArgs e)
{ {
if(Datenbank.Instance.loadedProjekt == null)
{
MessageBox.Show("Es wurde kein Projekt geladen");
//return;
}
KlassenBIB.Inspektionsobjekt inspektionsobjekt = new KlassenBIB.Inspektionsobjekt(); KlassenBIB.Inspektionsobjekt inspektionsobjekt = new KlassenBIB.Inspektionsobjekt();
inspektionsobjekt.Projektnummer = Global.Instance.ProjektNummer; inspektionsobjekt.Projektnummer = Global.Instance.ProjektNummer;
Datenbank.Instance.loadedProjekt.Objekte.Add(inspektionsobjekt); Datenbank.Instance.loadedProjekt.Objekte.Add(inspektionsobjekt);