Güteschutzprotokolle hinzugefügt

This commit is contained in:
Husky
2020-03-16 19:48:55 +01:00
parent 47beb8b598
commit 009c54cc84
14 changed files with 1230 additions and 7 deletions

View File

@@ -15,6 +15,8 @@ namespace KanSan.Base
public DbSet<Taetigkeiten> Taetigkeiten { get; set; } public DbSet<Taetigkeiten> Taetigkeiten { get; set; }
public DbSet<LeitungsverzeichnisPosition> LeitungsverzeichnisPositionen { get; set; } public DbSet<LeitungsverzeichnisPosition> LeitungsverzeichnisPositionen { get; set; }
public DbSet<Fahrzeug> Fahrzeuge { get; set; } public DbSet<Fahrzeug> Fahrzeuge { get; set; }
public DbSet<KurzlinerSan> KurzlinerSanierung { get; set; }
public DbSet<HutprofilSan> HutprofilSanierung { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{ {

View File

@@ -0,0 +1,614 @@
// <auto-generated />
using System;
using KanSan.Base;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace KanSan.Base.Migrations
{
[DbContext(typeof(KanSanContext))]
[Migration("20200316171603_GueteschutzHinzugefügt")]
partial class GueteschutzHinzugefügt
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<string>("BaustelleNummer")
.HasColumnType("text");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("OrtTeil")
.HasColumnType("text");
b.Property<int?>("ProjektID")
.HasColumnType("integer");
b.HasKey("ID");
b.HasIndex("ProjektID");
b.ToTable("Baustelle");
});
modelBuilder.Entity("KanSan.Base.Models.Fahrzeug", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Kennzeichen")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("Fahrzeuge");
});
modelBuilder.Entity("KanSan.Base.Models.HutprofilSan", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<DateTime>("AnpressenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Auffaelligkeit")
.HasColumnType("boolean");
b.Property<int>("AussenTemp")
.HasColumnType("integer");
b.Property<bool>("Bericht")
.HasColumnType("boolean");
b.Property<bool>("Dichtheit")
.HasColumnType("boolean");
b.Property<DateTime>("EntlueftenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Film")
.HasColumnType("boolean");
b.Property<bool>("FixierungAufPacker")
.HasColumnType("boolean");
b.Property<int>("Flaechengewicht")
.HasColumnType("integer");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("HarzMaterialArt")
.HasColumnType("text");
b.Property<string>("HarzmaterialHersteller")
.HasColumnType("text");
b.Property<bool>("InnenBeschichtung")
.HasColumnType("boolean");
b.Property<int>("KanalTemp")
.HasColumnType("integer");
b.Property<string>("KompACharge")
.HasColumnType("text");
b.Property<string>("KompBCharge")
.HasColumnType("text");
b.Property<DateTime>("MischZeit")
.HasColumnType("timestamp without time zone");
b.Property<double>("PackerDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("PackerDruckEnde")
.HasColumnType("double precision");
b.Property<string>("RohrDN")
.HasColumnType("text");
b.Property<int?>("SchadPositionID")
.HasColumnType("integer");
b.Property<double>("SeitenKanalDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("SeitenKanalDruckEnde")
.HasColumnType("double precision");
b.Property<bool>("Sichtkontrolle")
.HasColumnType("boolean");
b.Property<string>("TraegerCharge")
.HasColumnType("text");
b.Property<string>("TraegerHersteller")
.HasColumnType("text");
b.Property<string>("TraegerKurzliner")
.HasColumnType("text");
b.Property<bool>("Video")
.HasColumnType("boolean");
b.Property<int>("Wetter")
.HasColumnType("integer");
b.Property<string>("Winkel")
.HasColumnType("text");
b.HasKey("ID");
b.HasIndex("SchadPositionID");
b.ToTable("HutprofilSanierung");
});
modelBuilder.Entity("KanSan.Base.Models.Kunde", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Nachname")
.HasColumnType("text");
b.Property<string>("Ort")
.HasColumnType("text");
b.Property<string>("PLZ")
.HasColumnType("text");
b.Property<string>("Strasse")
.HasColumnType("text");
b.Property<string>("Vorname")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("Kunden");
});
modelBuilder.Entity("KanSan.Base.Models.KurzlinerSan", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<DateTime>("AnpressenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Auffaelligkeit")
.HasColumnType("boolean");
b.Property<int>("AussenTemp")
.HasColumnType("integer");
b.Property<bool>("Bericht")
.HasColumnType("boolean");
b.Property<double>("Breit")
.HasColumnType("double precision");
b.Property<bool>("Dichtheit")
.HasColumnType("boolean");
b.Property<DateTime>("EntlueftenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Film")
.HasColumnType("boolean");
b.Property<bool>("FixierungAufPacker")
.HasColumnType("boolean");
b.Property<int>("Flaechengewicht")
.HasColumnType("integer");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("HarzMaterialArt")
.HasColumnType("text");
b.Property<string>("HarzmaterialHersteller")
.HasColumnType("text");
b.Property<int>("KanalTemp")
.HasColumnType("integer");
b.Property<string>("KompACharge")
.HasColumnType("text");
b.Property<string>("KompBCharge")
.HasColumnType("text");
b.Property<double>("Lang")
.HasColumnType("double precision");
b.Property<DateTime>("MischZeit")
.HasColumnType("timestamp without time zone");
b.Property<double>("PackerDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("PackerDruckEnde")
.HasColumnType("double precision");
b.Property<int?>("SchadPositionID")
.HasColumnType("integer");
b.Property<bool>("Sichtkontrolle")
.HasColumnType("boolean");
b.Property<string>("TraegerCharge")
.HasColumnType("text");
b.Property<string>("TraegerHersteller")
.HasColumnType("text");
b.Property<string>("TraegerKurzliner")
.HasColumnType("text");
b.Property<bool>("Video")
.HasColumnType("boolean");
b.Property<int>("Wetter")
.HasColumnType("integer");
b.HasKey("ID");
b.HasIndex("SchadPositionID");
b.ToTable("KurzlinerSanierung");
});
modelBuilder.Entity("KanSan.Base.Models.LeitungsverzeichnisPosition", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<string>("Beschreibung")
.HasColumnType("text");
b.Property<string>("Einheit")
.HasColumnType("text");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Positionsnummer")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("LeitungsverzeichnisPositionen");
});
modelBuilder.Entity("KanSan.Base.Models.Projekt", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<int?>("KundeID")
.HasColumnType("integer");
b.Property<string>("Ort")
.HasColumnType("text");
b.Property<string>("Projektnummer")
.HasColumnType("text");
b.HasKey("ID");
b.HasIndex("KundeID");
b.ToTable("Projekte");
});
modelBuilder.Entity("KanSan.Base.Models.Sanierungskonzept", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<int>("SanierungsTyp")
.HasColumnType("integer");
b.HasKey("ID");
b.ToTable("Sanierungskonzept");
});
modelBuilder.Entity("KanSan.Base.Models.Schaeden", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<bool>("Infiltation")
.HasColumnType("boolean");
b.Property<bool>("RissBruchScherbe")
.HasColumnType("boolean");
b.Property<int>("SanierungsTyp")
.HasColumnType("integer");
b.Property<int?>("SanierungskonzeptID")
.HasColumnType("integer");
b.Property<bool>("SchadstelleFaekalienFrei")
.HasColumnType("boolean");
b.Property<int?>("SewerID")
.HasColumnType("integer");
b.Property<bool>("StutzenEinragend")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltFraeser")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltHD")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltMech")
.HasColumnType("boolean");
b.Property<bool>("WurzelInkrustationAblagerungen")
.HasColumnType("boolean");
b.HasKey("ID");
b.HasIndex("SanierungskonzeptID");
b.HasIndex("SewerID");
b.ToTable("Schaeden");
});
modelBuilder.Entity("KanSan.Base.Models.Sewer", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<int?>("BaustelleID")
.HasColumnType("integer");
b.Property<bool>("BaustellensicherungErforderlich")
.HasColumnType("boolean");
b.Property<int>("DN")
.HasColumnType("integer");
b.Property<bool>("GenehmigungErforderlich")
.HasColumnType("boolean");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<bool>("HaltungGespuelt")
.HasColumnType("boolean");
b.Property<int>("Material")
.HasColumnType("integer");
b.Property<string>("ObjektNummer")
.HasColumnType("text");
b.Property<int?>("PunktObenID")
.HasColumnType("integer");
b.Property<int>("PunktTypeOben")
.HasColumnType("integer");
b.Property<int>("PunktTypeUnten")
.HasColumnType("integer");
b.Property<int?>("PunktUntenID")
.HasColumnType("integer");
b.Property<bool>("RohrleitungInBetrieb")
.HasColumnType("boolean");
b.Property<int>("SewerType")
.HasColumnType("integer");
b.Property<string>("StrasseName")
.HasColumnType("text");
b.Property<bool>("WasserHaltungDurchgefuehrt")
.HasColumnType("boolean");
b.HasKey("ID");
b.HasIndex("BaustelleID");
b.HasIndex("PunktObenID");
b.HasIndex("PunktUntenID");
b.ToTable("Kanaele");
});
modelBuilder.Entity("KanSan.Base.Models.SewerPoint", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Objektnummer")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("SewerPoints");
});
modelBuilder.Entity("KanSan.Base.Models.Taetigkeiten", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<decimal>("Anzahl")
.HasColumnType("numeric");
b.Property<int?>("FahrzeugID")
.HasColumnType("integer");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<int?>("LeitungsverzeichnisPositionID")
.HasColumnType("integer");
b.Property<string>("Mitarbeiter")
.HasColumnType("text");
b.Property<decimal>("Position")
.HasColumnType("numeric");
b.Property<int?>("SanierungskonzeptID")
.HasColumnType("integer");
b.Property<DateTime>("ZeitStempel")
.HasColumnType("timestamp without time zone");
b.HasKey("ID");
b.HasIndex("FahrzeugID");
b.HasIndex("LeitungsverzeichnisPositionID");
b.HasIndex("SanierungskonzeptID");
b.ToTable("Taetigkeiten");
});
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
{
b.HasOne("KanSan.Base.Models.Projekt", "Projekt")
.WithMany()
.HasForeignKey("ProjektID");
});
modelBuilder.Entity("KanSan.Base.Models.HutprofilSan", b =>
{
b.HasOne("KanSan.Base.Models.Schaeden", "SchadPosition")
.WithMany()
.HasForeignKey("SchadPositionID");
});
modelBuilder.Entity("KanSan.Base.Models.KurzlinerSan", b =>
{
b.HasOne("KanSan.Base.Models.Schaeden", "SchadPosition")
.WithMany()
.HasForeignKey("SchadPositionID");
});
modelBuilder.Entity("KanSan.Base.Models.Projekt", b =>
{
b.HasOne("KanSan.Base.Models.Kunde", "Kunde")
.WithMany("Baustellen")
.HasForeignKey("KundeID");
});
modelBuilder.Entity("KanSan.Base.Models.Schaeden", b =>
{
b.HasOne("KanSan.Base.Models.Sanierungskonzept", "Sanierungskonzept")
.WithMany()
.HasForeignKey("SanierungskonzeptID");
b.HasOne("KanSan.Base.Models.Sewer", "Sewer")
.WithMany("Schaeden")
.HasForeignKey("SewerID");
});
modelBuilder.Entity("KanSan.Base.Models.Sewer", b =>
{
b.HasOne("KanSan.Base.Models.Baustelle", "Baustelle")
.WithMany("Kanaele")
.HasForeignKey("BaustelleID");
b.HasOne("KanSan.Base.Models.SewerPoint", "PunktOben")
.WithMany()
.HasForeignKey("PunktObenID");
b.HasOne("KanSan.Base.Models.SewerPoint", "PunktUnten")
.WithMany()
.HasForeignKey("PunktUntenID");
});
modelBuilder.Entity("KanSan.Base.Models.Taetigkeiten", b =>
{
b.HasOne("KanSan.Base.Models.Fahrzeug", "Fahrzeug")
.WithMany()
.HasForeignKey("FahrzeugID");
b.HasOne("KanSan.Base.Models.LeitungsverzeichnisPosition", "LeitungsverzeichnisPosition")
.WithMany()
.HasForeignKey("LeitungsverzeichnisPositionID");
b.HasOne("KanSan.Base.Models.Sanierungskonzept", "Sanierungskonzept")
.WithMany("Taetigkeiten")
.HasForeignKey("SanierungskonzeptID");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,254 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace KanSan.Base.Migrations
{
public partial class GueteschutzHinzugefügt : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Infiltation",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "RissBruchScherbe",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "SchadstelleFaekalienFrei",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "StutzenEinragend",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "VorbehandeltFraeser",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "VorbehandeltHD",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "VorbehandeltMech",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "WurzelInkrustationAblagerungen",
table: "Schaeden",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "BaustellensicherungErforderlich",
table: "Kanaele",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "GenehmigungErforderlich",
table: "Kanaele",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "HaltungGespuelt",
table: "Kanaele",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "RohrleitungInBetrieb",
table: "Kanaele",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "WasserHaltungDurchgefuehrt",
table: "Kanaele",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "HutprofilSanierung",
columns: table => new
{
ID = table.Column<int>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
GuidNr = table.Column<Guid>(nullable: false),
SchadPositionID = table.Column<int>(nullable: true),
Wetter = table.Column<int>(nullable: false),
AussenTemp = table.Column<int>(nullable: false),
KanalTemp = table.Column<int>(nullable: false),
Sichtkontrolle = table.Column<bool>(nullable: false),
Bericht = table.Column<bool>(nullable: false),
Film = table.Column<bool>(nullable: false),
Video = table.Column<bool>(nullable: false),
Dichtheit = table.Column<bool>(nullable: false),
HarzmaterialHersteller = table.Column<string>(nullable: true),
HarzMaterialArt = table.Column<string>(nullable: true),
KompACharge = table.Column<string>(nullable: true),
KompBCharge = table.Column<string>(nullable: true),
TraegerKurzliner = table.Column<string>(nullable: true),
TraegerHersteller = table.Column<string>(nullable: true),
TraegerCharge = table.Column<string>(nullable: true),
Flaechengewicht = table.Column<int>(nullable: false),
Auffaelligkeit = table.Column<bool>(nullable: false),
FixierungAufPacker = table.Column<bool>(nullable: false),
MischZeit = table.Column<DateTime>(nullable: false),
AnpressenPacker = table.Column<DateTime>(nullable: false),
EntlueftenPacker = table.Column<DateTime>(nullable: false),
PackerDruckAnfang = table.Column<double>(nullable: false),
PackerDruckEnde = table.Column<double>(nullable: false),
RohrDN = table.Column<string>(nullable: true),
Winkel = table.Column<string>(nullable: true),
InnenBeschichtung = table.Column<bool>(nullable: false),
SeitenKanalDruckAnfang = table.Column<double>(nullable: false),
SeitenKanalDruckEnde = table.Column<double>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_HutprofilSanierung", x => x.ID);
table.ForeignKey(
name: "FK_HutprofilSanierung_Schaeden_SchadPositionID",
column: x => x.SchadPositionID,
principalTable: "Schaeden",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "KurzlinerSanierung",
columns: table => new
{
ID = table.Column<int>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
GuidNr = table.Column<Guid>(nullable: false),
SchadPositionID = table.Column<int>(nullable: true),
Wetter = table.Column<int>(nullable: false),
AussenTemp = table.Column<int>(nullable: false),
KanalTemp = table.Column<int>(nullable: false),
Sichtkontrolle = table.Column<bool>(nullable: false),
Bericht = table.Column<bool>(nullable: false),
Film = table.Column<bool>(nullable: false),
Video = table.Column<bool>(nullable: false),
Dichtheit = table.Column<bool>(nullable: false),
HarzmaterialHersteller = table.Column<string>(nullable: true),
HarzMaterialArt = table.Column<string>(nullable: true),
KompACharge = table.Column<string>(nullable: true),
KompBCharge = table.Column<string>(nullable: true),
TraegerKurzliner = table.Column<string>(nullable: true),
TraegerHersteller = table.Column<string>(nullable: true),
TraegerCharge = table.Column<string>(nullable: true),
Flaechengewicht = table.Column<int>(nullable: false),
Auffaelligkeit = table.Column<bool>(nullable: false),
FixierungAufPacker = table.Column<bool>(nullable: false),
MischZeit = table.Column<DateTime>(nullable: false),
AnpressenPacker = table.Column<DateTime>(nullable: false),
EntlueftenPacker = table.Column<DateTime>(nullable: false),
PackerDruckAnfang = table.Column<double>(nullable: false),
PackerDruckEnde = table.Column<double>(nullable: false),
Lang = table.Column<double>(nullable: false),
Breit = table.Column<double>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_KurzlinerSanierung", x => x.ID);
table.ForeignKey(
name: "FK_KurzlinerSanierung_Schaeden_SchadPositionID",
column: x => x.SchadPositionID,
principalTable: "Schaeden",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_HutprofilSanierung_SchadPositionID",
table: "HutprofilSanierung",
column: "SchadPositionID");
migrationBuilder.CreateIndex(
name: "IX_KurzlinerSanierung_SchadPositionID",
table: "KurzlinerSanierung",
column: "SchadPositionID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "HutprofilSanierung");
migrationBuilder.DropTable(
name: "KurzlinerSanierung");
migrationBuilder.DropColumn(
name: "Infiltation",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "RissBruchScherbe",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "SchadstelleFaekalienFrei",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "StutzenEinragend",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "VorbehandeltFraeser",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "VorbehandeltHD",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "VorbehandeltMech",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "WurzelInkrustationAblagerungen",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "BaustellensicherungErforderlich",
table: "Kanaele");
migrationBuilder.DropColumn(
name: "GenehmigungErforderlich",
table: "Kanaele");
migrationBuilder.DropColumn(
name: "HaltungGespuelt",
table: "Kanaele");
migrationBuilder.DropColumn(
name: "RohrleitungInBetrieb",
table: "Kanaele");
migrationBuilder.DropColumn(
name: "WasserHaltungDurchgefuehrt",
table: "Kanaele");
}
}
}

View File

@@ -63,6 +63,110 @@ namespace KanSan.Base.Migrations
b.ToTable("Fahrzeuge"); b.ToTable("Fahrzeuge");
}); });
modelBuilder.Entity("KanSan.Base.Models.HutprofilSan", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<DateTime>("AnpressenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Auffaelligkeit")
.HasColumnType("boolean");
b.Property<int>("AussenTemp")
.HasColumnType("integer");
b.Property<bool>("Bericht")
.HasColumnType("boolean");
b.Property<bool>("Dichtheit")
.HasColumnType("boolean");
b.Property<DateTime>("EntlueftenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Film")
.HasColumnType("boolean");
b.Property<bool>("FixierungAufPacker")
.HasColumnType("boolean");
b.Property<int>("Flaechengewicht")
.HasColumnType("integer");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("HarzMaterialArt")
.HasColumnType("text");
b.Property<string>("HarzmaterialHersteller")
.HasColumnType("text");
b.Property<bool>("InnenBeschichtung")
.HasColumnType("boolean");
b.Property<int>("KanalTemp")
.HasColumnType("integer");
b.Property<string>("KompACharge")
.HasColumnType("text");
b.Property<string>("KompBCharge")
.HasColumnType("text");
b.Property<DateTime>("MischZeit")
.HasColumnType("timestamp without time zone");
b.Property<double>("PackerDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("PackerDruckEnde")
.HasColumnType("double precision");
b.Property<string>("RohrDN")
.HasColumnType("text");
b.Property<int?>("SchadPositionID")
.HasColumnType("integer");
b.Property<double>("SeitenKanalDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("SeitenKanalDruckEnde")
.HasColumnType("double precision");
b.Property<bool>("Sichtkontrolle")
.HasColumnType("boolean");
b.Property<string>("TraegerCharge")
.HasColumnType("text");
b.Property<string>("TraegerHersteller")
.HasColumnType("text");
b.Property<string>("TraegerKurzliner")
.HasColumnType("text");
b.Property<bool>("Video")
.HasColumnType("boolean");
b.Property<int>("Wetter")
.HasColumnType("integer");
b.Property<string>("Winkel")
.HasColumnType("text");
b.HasKey("ID");
b.HasIndex("SchadPositionID");
b.ToTable("HutprofilSanierung");
});
modelBuilder.Entity("KanSan.Base.Models.Kunde", b => modelBuilder.Entity("KanSan.Base.Models.Kunde", b =>
{ {
b.Property<int>("ID") b.Property<int>("ID")
@@ -93,6 +197,101 @@ namespace KanSan.Base.Migrations
b.ToTable("Kunden"); b.ToTable("Kunden");
}); });
modelBuilder.Entity("KanSan.Base.Models.KurzlinerSan", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<DateTime>("AnpressenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Auffaelligkeit")
.HasColumnType("boolean");
b.Property<int>("AussenTemp")
.HasColumnType("integer");
b.Property<bool>("Bericht")
.HasColumnType("boolean");
b.Property<double>("Breit")
.HasColumnType("double precision");
b.Property<bool>("Dichtheit")
.HasColumnType("boolean");
b.Property<DateTime>("EntlueftenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Film")
.HasColumnType("boolean");
b.Property<bool>("FixierungAufPacker")
.HasColumnType("boolean");
b.Property<int>("Flaechengewicht")
.HasColumnType("integer");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("HarzMaterialArt")
.HasColumnType("text");
b.Property<string>("HarzmaterialHersteller")
.HasColumnType("text");
b.Property<int>("KanalTemp")
.HasColumnType("integer");
b.Property<string>("KompACharge")
.HasColumnType("text");
b.Property<string>("KompBCharge")
.HasColumnType("text");
b.Property<double>("Lang")
.HasColumnType("double precision");
b.Property<DateTime>("MischZeit")
.HasColumnType("timestamp without time zone");
b.Property<double>("PackerDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("PackerDruckEnde")
.HasColumnType("double precision");
b.Property<int?>("SchadPositionID")
.HasColumnType("integer");
b.Property<bool>("Sichtkontrolle")
.HasColumnType("boolean");
b.Property<string>("TraegerCharge")
.HasColumnType("text");
b.Property<string>("TraegerHersteller")
.HasColumnType("text");
b.Property<string>("TraegerKurzliner")
.HasColumnType("text");
b.Property<bool>("Video")
.HasColumnType("boolean");
b.Property<int>("Wetter")
.HasColumnType("integer");
b.HasKey("ID");
b.HasIndex("SchadPositionID");
b.ToTable("KurzlinerSanierung");
});
modelBuilder.Entity("KanSan.Base.Models.LeitungsverzeichnisPosition", b => modelBuilder.Entity("KanSan.Base.Models.LeitungsverzeichnisPosition", b =>
{ {
b.Property<int>("ID") b.Property<int>("ID")
@@ -171,15 +370,39 @@ namespace KanSan.Base.Migrations
b.Property<Guid>("GuidNr") b.Property<Guid>("GuidNr")
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<bool>("Infiltation")
.HasColumnType("boolean");
b.Property<bool>("RissBruchScherbe")
.HasColumnType("boolean");
b.Property<int>("SanierungsTyp") b.Property<int>("SanierungsTyp")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<int?>("SanierungskonzeptID") b.Property<int?>("SanierungskonzeptID")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<bool>("SchadstelleFaekalienFrei")
.HasColumnType("boolean");
b.Property<int?>("SewerID") b.Property<int?>("SewerID")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<bool>("StutzenEinragend")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltFraeser")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltHD")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltMech")
.HasColumnType("boolean");
b.Property<bool>("WurzelInkrustationAblagerungen")
.HasColumnType("boolean");
b.HasKey("ID"); b.HasKey("ID");
b.HasIndex("SanierungskonzeptID"); b.HasIndex("SanierungskonzeptID");
@@ -199,12 +422,21 @@ namespace KanSan.Base.Migrations
b.Property<int?>("BaustelleID") b.Property<int?>("BaustelleID")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<bool>("BaustellensicherungErforderlich")
.HasColumnType("boolean");
b.Property<int>("DN") b.Property<int>("DN")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<bool>("GenehmigungErforderlich")
.HasColumnType("boolean");
b.Property<Guid>("GuidNr") b.Property<Guid>("GuidNr")
.HasColumnType("uuid"); .HasColumnType("uuid");
b.Property<bool>("HaltungGespuelt")
.HasColumnType("boolean");
b.Property<int>("Material") b.Property<int>("Material")
.HasColumnType("integer"); .HasColumnType("integer");
@@ -223,12 +455,18 @@ namespace KanSan.Base.Migrations
b.Property<int?>("PunktUntenID") b.Property<int?>("PunktUntenID")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<bool>("RohrleitungInBetrieb")
.HasColumnType("boolean");
b.Property<int>("SewerType") b.Property<int>("SewerType")
.HasColumnType("integer"); .HasColumnType("integer");
b.Property<string>("StrasseName") b.Property<string>("StrasseName")
.HasColumnType("text"); .HasColumnType("text");
b.Property<bool>("WasserHaltungDurchgefuehrt")
.HasColumnType("boolean");
b.HasKey("ID"); b.HasKey("ID");
b.HasIndex("BaustelleID"); b.HasIndex("BaustelleID");
@@ -307,6 +545,20 @@ namespace KanSan.Base.Migrations
.HasForeignKey("ProjektID"); .HasForeignKey("ProjektID");
}); });
modelBuilder.Entity("KanSan.Base.Models.HutprofilSan", b =>
{
b.HasOne("KanSan.Base.Models.Schaeden", "SchadPosition")
.WithMany()
.HasForeignKey("SchadPositionID");
});
modelBuilder.Entity("KanSan.Base.Models.KurzlinerSan", b =>
{
b.HasOne("KanSan.Base.Models.Schaeden", "SchadPosition")
.WithMany()
.HasForeignKey("SchadPositionID");
});
modelBuilder.Entity("KanSan.Base.Models.Projekt", b => modelBuilder.Entity("KanSan.Base.Models.Projekt", b =>
{ {
b.HasOne("KanSan.Base.Models.Kunde", "Kunde") b.HasOne("KanSan.Base.Models.Kunde", "Kunde")

View File

@@ -0,0 +1,28 @@
using KanSan.Base.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.Base.Models
{
public abstract class GueteschutzProtokoll : IDatabaseEntry
{
public int ID { get; set; }
public Guid GuidNr { get; set; }
public Schaeden SchadPosition { get; set; }
public EWetter Wetter { get; set; }
public int AussenTemp { get; set; }
public int KanalTemp { get; set; }
public bool Sichtkontrolle { get; set; }
public bool Bericht { get; set; }
public bool Film { get; set; }
public bool Video { get; set; }
public bool Dichtheit { get; set; }
}
public enum EWetter
{
TROCKEN,
FEUCHT
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.Base.Models
{
public class HutprofilSan : PHarzSanierung
{
public string RohrDN { get; set; }
public string Winkel { get; set; }
public bool InnenBeschichtung { get; set; }
public double SeitenKanalDruckAnfang { get; set; }
public double SeitenKanalDruckEnde { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.Base.Models
{
public class KurzlinerSan : PHarzSanierung
{
public double Lang { get; set; }
public double Breit { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.Base.Models
{
public class PHarzSanierung : GueteschutzProtokoll
{
public string HarzmaterialHersteller { get; set; }
public string HarzMaterialArt { get; set; }
public string KompACharge { get; set; }
public string KompBCharge { get; set; }
public string TraegerKurzliner { get; set; }
public string TraegerHersteller { get; set; }
public string TraegerCharge { get; set; }
public int Flaechengewicht { get; set; }
public bool Auffaelligkeit { get; set; }
public bool FixierungAufPacker { get; set; }
public DateTime MischZeit { get; set; }
public DateTime AnpressenPacker { get; set; }
public DateTime EntlueftenPacker { get; set; }
public double PackerDruckAnfang { get; set; }
public double PackerDruckEnde { get; set; }
}
}

View File

@@ -11,5 +11,13 @@ namespace KanSan.Base.Models
public Sewer Sewer { get; set; } public Sewer Sewer { get; set; }
public ESanierung SanierungsTyp { get; set; } public ESanierung SanierungsTyp { get; set; }
public Sanierungskonzept Sanierungskonzept { get; set; } public Sanierungskonzept Sanierungskonzept { get; set; }
public bool RissBruchScherbe { get; set; }
public bool WurzelInkrustationAblagerungen { get; set; }
public bool StutzenEinragend { get; set; }
public bool Infiltation { get; set; }
public bool VorbehandeltHD { get; set; }
public bool VorbehandeltMech { get; set; }
public bool VorbehandeltFraeser { get; set; }
public bool SchadstelleFaekalienFrei { get; set; }
} }
} }

View File

@@ -19,6 +19,13 @@ namespace KanSan.Base.Models
public SewerPoint PunktUnten { get; set; } public SewerPoint PunktUnten { get; set; }
public int DN { get; set; } public int DN { get; set; }
public EMaterial Material { get; set; } public EMaterial Material { get; set; }
public bool RohrleitungInBetrieb { get; set; }
public bool HaltungGespuelt { get; set; }
public bool WasserHaltungDurchgefuehrt { get; set; }
public bool GenehmigungErforderlich { get; set; }
public bool BaustellensicherungErforderlich { get; set; }
public List<Schaeden> Schaeden { get; } = new List<Schaeden>(); public List<Schaeden> Schaeden { get; } = new List<Schaeden>();
} }
} }

View File

@@ -19,6 +19,8 @@ namespace KanSan.Base
private BaseRepository<Taetigkeiten> _taetigkeiten; private BaseRepository<Taetigkeiten> _taetigkeiten;
private BaseRepository<LeitungsverzeichnisPosition> _leistungsverzeichnisPositionen; private BaseRepository<LeitungsverzeichnisPosition> _leistungsverzeichnisPositionen;
private BaseRepository<Fahrzeug> _fahrzeuge; private BaseRepository<Fahrzeug> _fahrzeuge;
private BaseRepository<KurzlinerSan> _kurzliner;
private BaseRepository<HutprofilSan> _hutprofil;
public UnitOfWork(KanSanContext dbContext) public UnitOfWork(KanSanContext dbContext)
{ {
@@ -44,6 +46,8 @@ namespace KanSan.Base
public IRepository<LeitungsverzeichnisPosition> LeistungsverzeichnisRepository => _leistungsverzeichnisPositionen ?? (_leistungsverzeichnisPositionen = new BaseRepository<LeitungsverzeichnisPosition>(_dbContext)); public IRepository<LeitungsverzeichnisPosition> LeistungsverzeichnisRepository => _leistungsverzeichnisPositionen ?? (_leistungsverzeichnisPositionen = new BaseRepository<LeitungsverzeichnisPosition>(_dbContext));
public IRepository<Fahrzeug> FahrzeugRepository => _fahrzeuge ?? (_fahrzeuge = new BaseRepository<Fahrzeug>(_dbContext)); public IRepository<Fahrzeug> FahrzeugRepository => _fahrzeuge ?? (_fahrzeuge = new BaseRepository<Fahrzeug>(_dbContext));
public IRepository<KurzlinerSan> KurzlinerRepository => _kurzliner ?? (_kurzliner = new BaseRepository<KurzlinerSan>(_dbContext));
public IRepository<HutprofilSan> HutprofilRepository => _hutprofil ?? (_hutprofil = new BaseRepository<HutprofilSan>(_dbContext));
public void Commit() public void Commit()
{ {

View File

@@ -36,7 +36,7 @@ namespace KanSan.ViewModel
gitVersion = reader.ReadToEnd(); gitVersion = reader.ReadToEnd();
} }
return gitVersion; return string.Format("KanalSanierungsverwaltung : {0}",gitVersion);
} }
} }

View File

@@ -15,10 +15,10 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.2" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.2" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.2" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" />
<PackageReference Include="Syncfusion.DocIO.Wpf" Version="17.4.0.51" /> <PackageReference Include="Syncfusion.DocIO.Wpf" Version="17.4.0.55" />
<PackageReference Include="Syncfusion.DocToPDFConverter.Wpf" Version="17.4.0.51" /> <PackageReference Include="Syncfusion.DocToPDFConverter.Wpf" Version="17.4.0.55" />
<PackageReference Include="Syncfusion.Grid.WPF" Version="17.4.0.51" /> <PackageReference Include="Syncfusion.Grid.WPF" Version="17.4.0.55" />
<PackageReference Include="Syncfusion.XlsIO.Wpf" Version="17.4.0.51" /> <PackageReference Include="Syncfusion.XlsIO.Wpf" Version="17.4.0.55" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -122,9 +122,10 @@ namespace KanSan
private void UCBaustelleList_BaustelleAdded(object sender, UI.SelectBaustelleEventArgs e) private void UCBaustelleList_BaustelleAdded(object sender, UI.SelectBaustelleEventArgs e)
{ {
/*if (e.baustelle == null) return; if (e.baustelle == null) return;
UI.UCBaustelleEdit uBaustelleEdit = new UI.UCBaustelleEdit(e.baustelle); UI.UCBaustelleEdit uBaustelleEdit = new UI.UCBaustelleEdit(e.baustelle);
*/ uBaustelleEdit.SpeichernClicked += Edit_SpeichernClicked;
ContentController.Content = uBaustelleEdit;
} }
} }