Sanierungsmaßnahmen können hinzugefügt werden
This commit is contained in:
15
KanSan.Base/Interfaces/UI/ISanierungskonzeptListViewModel.cs
Normal file
15
KanSan.Base/Interfaces/UI/ISanierungskonzeptListViewModel.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using KanSan.Base.Enums;
|
||||||
|
using KanSan.Base.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace KanSan.Base.Interfaces.UI
|
||||||
|
{
|
||||||
|
public interface ISanierungskonzeptListViewModel
|
||||||
|
{
|
||||||
|
ESanierung Sanierung { get; }
|
||||||
|
List<Taetigkeiten> Taetigkeiten { get; }
|
||||||
|
bool CanAddNewSan { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
18
KanSan.Base/Interfaces/UI/ITaetigkeitEditViewModel.cs
Normal file
18
KanSan.Base/Interfaces/UI/ITaetigkeitEditViewModel.cs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
using KanSan.Base.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace KanSan.Base.Interfaces.UI
|
||||||
|
{
|
||||||
|
public interface ITaetigkeitEditViewModel
|
||||||
|
{
|
||||||
|
Fahrzeug Fahrzeug { get; set; }
|
||||||
|
string Mitarbeiter { get; set; }
|
||||||
|
DateTime ZeitStempel { get; set; }
|
||||||
|
bool Erledigt { get; }
|
||||||
|
decimal Anzahl { get; set; }
|
||||||
|
string Bemerkung { get; set; }
|
||||||
|
LeitungsverzeichnisPosition Leistungsverzeichnis { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
598
KanSan.Base/Migrations/20200405135558_BemerkungHinzu.Designer.cs
generated
Normal file
598
KanSan.Base/Migrations/20200405135558_BemerkungHinzu.Designer.cs
generated
Normal file
@@ -0,0 +1,598 @@
|
|||||||
|
// <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("20200405135558_BemerkungHinzu")]
|
||||||
|
partial class BemerkungHinzu
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
|
||||||
|
.HasAnnotation("ProductVersion", "3.1.3")
|
||||||
|
.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.GueteschutzProtokoll", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("ID")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer")
|
||||||
|
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
|
||||||
|
|
||||||
|
b.Property<int>("AussenTemp")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("Bericht")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Dichtheit")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("Discriminator")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Film")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<Guid>("GuidNr")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<int>("KanalTemp")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("SchadPositionID")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("Sichtkontrolle")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Video")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("Wetter")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("ID");
|
||||||
|
|
||||||
|
b.HasIndex("SchadPositionID");
|
||||||
|
|
||||||
|
b.ToTable("GueteschutzProtokoll");
|
||||||
|
|
||||||
|
b.HasDiscriminator<string>("Discriminator").HasValue("GueteschutzProtokoll");
|
||||||
|
});
|
||||||
|
|
||||||
|
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.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<decimal>("Entfernung")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<Guid>("GuidNr")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<bool>("Infiltration")
|
||||||
|
.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<decimal>("Haltungslaenge")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
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<string>("Bemerkung")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("FahrzeugID")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("GueteschutzProtokolID")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<Guid>("GuidNr")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<int?>("LeitungsverzeichnisPositionID")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Mitarbeiter")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("SanierungskonzeptID")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<DateTime>("ZeitStempel")
|
||||||
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
|
b.HasKey("ID");
|
||||||
|
|
||||||
|
b.HasIndex("FahrzeugID");
|
||||||
|
|
||||||
|
b.HasIndex("GueteschutzProtokolID");
|
||||||
|
|
||||||
|
b.HasIndex("LeitungsverzeichnisPositionID");
|
||||||
|
|
||||||
|
b.HasIndex("SanierungskonzeptID");
|
||||||
|
|
||||||
|
b.ToTable("Taetigkeiten");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("KanSan.Base.Models.HutprofilSan", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("KanSan.Base.Models.GueteschutzProtokoll");
|
||||||
|
|
||||||
|
b.Property<DateTime>("AnpressenPacker")
|
||||||
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
|
b.Property<bool>("Auffaelligkeit")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<DateTime>("EntlueftenPacker")
|
||||||
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
|
b.Property<bool>("FixierungAufPacker")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("Flaechengewicht")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("HarzMaterialArt")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("HarzmaterialHersteller")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("InnenBeschichtung")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
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<double>("SeitenKanalDruckAnfang")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.Property<double>("SeitenKanalDruckEnde")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.Property<string>("TraegerCharge")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("TraegerHersteller")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("TraegerKurzliner")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Winkel")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("HutprofilSan");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("KanSan.Base.Models.KurzlinerSan", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("KanSan.Base.Models.GueteschutzProtokoll");
|
||||||
|
|
||||||
|
b.Property<DateTime>("AnpressenPacker")
|
||||||
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
|
b.Property<bool>("Auffaelligkeit")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<double>("Breit")
|
||||||
|
.HasColumnType("double precision");
|
||||||
|
|
||||||
|
b.Property<DateTime>("EntlueftenPacker")
|
||||||
|
.HasColumnType("timestamp without time zone");
|
||||||
|
|
||||||
|
b.Property<bool>("FixierungAufPacker")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("Flaechengewicht")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("HarzMaterialArt")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("HarzmaterialHersteller")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
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<string>("TraegerCharge")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("TraegerHersteller")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("TraegerKurzliner")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("KurzlinerSan");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("KanSan.Base.Models.Projekt", "Projekt")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ProjektID");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("KanSan.Base.Models.GueteschutzProtokoll", 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.GueteschutzProtokoll", "GueteschutzProtokol")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("GueteschutzProtokolID");
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
KanSan.Base/Migrations/20200405135558_BemerkungHinzu.cs
Normal file
22
KanSan.Base/Migrations/20200405135558_BemerkungHinzu.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace KanSan.Base.Migrations
|
||||||
|
{
|
||||||
|
public partial class BemerkungHinzu : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Bemerkung",
|
||||||
|
table: "Taetigkeiten",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Bemerkung",
|
||||||
|
table: "Taetigkeiten");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -363,6 +363,9 @@ namespace KanSan.Base.Migrations
|
|||||||
b.Property<decimal>("Anzahl")
|
b.Property<decimal>("Anzahl")
|
||||||
.HasColumnType("numeric");
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("Bemerkung")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int?>("FahrzeugID")
|
b.Property<int?>("FahrzeugID")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,5 @@ namespace KanSan.Base.Models
|
|||||||
public string Positionsnummer { get; set; }
|
public string Positionsnummer { get; set; }
|
||||||
public string Beschreibung { get; set; }
|
public string Beschreibung { get; set; }
|
||||||
public string Einheit { get; set; }
|
public string Einheit { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,5 +15,6 @@ namespace KanSan.Base.Models
|
|||||||
public LeitungsverzeichnisPosition LeitungsverzeichnisPosition { get; set; }
|
public LeitungsverzeichnisPosition LeitungsverzeichnisPosition { get; set; }
|
||||||
public decimal Anzahl { get; set; }
|
public decimal Anzahl { get; set; }
|
||||||
public GueteschutzProtokoll GueteschutzProtokol { get; set; }
|
public GueteschutzProtokoll GueteschutzProtokol { get; set; }
|
||||||
|
public string Bemerkung { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ namespace KanSan.ViewModel.Objekte
|
|||||||
newSewer.StrasseName = Strasse;
|
newSewer.StrasseName = Strasse;
|
||||||
newSewer.ObjektNummer = PunktOben;
|
newSewer.ObjektNummer = PunktOben;
|
||||||
|
|
||||||
|
|
||||||
unitOfWork.KanaeleRepository.Update(newSewer,false);
|
unitOfWork.KanaeleRepository.Update(newSewer,false);
|
||||||
unitOfWork.Commit();
|
unitOfWork.Commit();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
using KanSan.Base;
|
||||||
|
using KanSan.Base.Enums;
|
||||||
|
using KanSan.Base.Interfaces;
|
||||||
|
using KanSan.Base.Interfaces.UI;
|
||||||
|
using KanSan.Base.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace KanSan.ViewModel
|
||||||
|
{
|
||||||
|
public class SanierungskonzeptListViewModel : ISanierungskonzeptListViewModel
|
||||||
|
{
|
||||||
|
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
||||||
|
private bool canAddNewSan = true;
|
||||||
|
Sanierungskonzept sanKonzept;
|
||||||
|
private ESanierung sanierung;
|
||||||
|
private Schaeden schaden;
|
||||||
|
private List<Taetigkeiten> taetigkeiten = new List<Taetigkeiten>();
|
||||||
|
public ESanierung Sanierung => sanierung;
|
||||||
|
public bool CanAddNewSan => canAddNewSan;
|
||||||
|
|
||||||
|
|
||||||
|
public List<Taetigkeiten> Taetigkeiten => taetigkeiten;
|
||||||
|
|
||||||
|
public SanierungskonzeptListViewModel(Schaeden schaden)
|
||||||
|
{
|
||||||
|
//this.schaden = schaden;
|
||||||
|
|
||||||
|
var d = unitOfWork.SchaedenRepository.Get(x => x.GuidNr.Equals(schaden.GuidNr),includeProperties: "Sanierungskonzept").First();
|
||||||
|
canAddNewSan = (d.Sanierungskonzept == null);
|
||||||
|
this.schaden = d;
|
||||||
|
if (!canAddNewSan)
|
||||||
|
{
|
||||||
|
sanierung = d.Sanierungskonzept.SanierungsTyp;
|
||||||
|
sanKonzept = unitOfWork.SanierungskonzeptRepository.Get(x => x.GuidNr.Equals(d.Sanierungskonzept.GuidNr),includeProperties:"Taetigkeiten").FirstOrDefault();
|
||||||
|
taetigkeiten = sanKonzept.Taetigkeiten;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Taetigkeiten NeueTaetigkeit()
|
||||||
|
{
|
||||||
|
Guid guid = Guid.NewGuid();
|
||||||
|
Taetigkeiten taetigkeiten = new Taetigkeiten()
|
||||||
|
{
|
||||||
|
Sanierungskonzept = this.sanKonzept,
|
||||||
|
GuidNr = guid
|
||||||
|
};
|
||||||
|
sanKonzept.Taetigkeiten.Add(taetigkeiten);
|
||||||
|
unitOfWork.SanierungskonzeptRepository.Update(sanKonzept);
|
||||||
|
unitOfWork.Commit();
|
||||||
|
|
||||||
|
return taetigkeiten;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Sanierungskonzept NeueSanierungskonzept()
|
||||||
|
{
|
||||||
|
Guid guid = Guid.NewGuid();
|
||||||
|
Sanierungskonzept san = new Sanierungskonzept()
|
||||||
|
{
|
||||||
|
GuidNr = guid,
|
||||||
|
};
|
||||||
|
|
||||||
|
schaden.Sanierungskonzept = san;
|
||||||
|
unitOfWork.SchaedenRepository.Update(schaden);
|
||||||
|
unitOfWork.Commit();
|
||||||
|
|
||||||
|
return san;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
109
KanSan.ViewModel/TaetigkeitEditViewModel.cs
Normal file
109
KanSan.ViewModel/TaetigkeitEditViewModel.cs
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
using KanSan.Base;
|
||||||
|
using KanSan.Base.Interfaces;
|
||||||
|
using KanSan.Base.Interfaces.UI;
|
||||||
|
using KanSan.Base.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace KanSan.ViewModel
|
||||||
|
{
|
||||||
|
public class TaetigkeitEditViewModel : PropertyChangedClass, INotifyPropertyChanged, ITaetigkeitEditViewModel
|
||||||
|
{
|
||||||
|
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
||||||
|
Fahrzeug fahrzeug;
|
||||||
|
string mitarbeiter;
|
||||||
|
DateTime zeitStempel;
|
||||||
|
decimal anzahl;
|
||||||
|
string bemerkung;
|
||||||
|
Taetigkeiten model;
|
||||||
|
LeitungsverzeichnisPosition leistungsverzeichnis;
|
||||||
|
#region getsetters
|
||||||
|
public Fahrzeug Fahrzeug
|
||||||
|
{
|
||||||
|
get => fahrzeug;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (fahrzeug == value) return;
|
||||||
|
fahrzeug = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Mitarbeiter
|
||||||
|
{
|
||||||
|
get => mitarbeiter;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (mitarbeiter == value) return;
|
||||||
|
mitarbeiter = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public DateTime ZeitStempel
|
||||||
|
{
|
||||||
|
get => zeitStempel;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (zeitStempel == value) return;
|
||||||
|
zeitStempel = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool Erledigt => !zeitStempel.Equals(DateTime.MinValue);
|
||||||
|
public decimal Anzahl
|
||||||
|
{
|
||||||
|
get => anzahl;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (anzahl == value) return;
|
||||||
|
anzahl = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Bemerkung
|
||||||
|
{
|
||||||
|
get => bemerkung;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (bemerkung == value) return;
|
||||||
|
bemerkung = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public LeitungsverzeichnisPosition Leistungsverzeichnis
|
||||||
|
{
|
||||||
|
get => leistungsverzeichnis;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (leistungsverzeichnis == value) return;
|
||||||
|
leistungsverzeichnis = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
public TaetigkeitEditViewModel(Taetigkeiten taetigkeiten)
|
||||||
|
{
|
||||||
|
model = taetigkeiten;
|
||||||
|
mitarbeiter = model.Mitarbeiter;
|
||||||
|
anzahl = model.Anzahl;
|
||||||
|
zeitStempel = model.ZeitStempel;
|
||||||
|
bemerkung = model.Bemerkung;
|
||||||
|
fahrzeug = model.Fahrzeug;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Speichern()
|
||||||
|
{
|
||||||
|
model.Mitarbeiter = mitarbeiter;
|
||||||
|
model.Anzahl = anzahl;
|
||||||
|
model.ZeitStempel = zeitStempel;
|
||||||
|
model.Bemerkung = bemerkung;
|
||||||
|
model.Fahrzeug = fahrzeug;
|
||||||
|
|
||||||
|
unitOfWork.TaetigkeitenRepository.Update(model);
|
||||||
|
unitOfWork.Commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -49,6 +49,9 @@
|
|||||||
<Compile Update="UI\UCSewerMainWindow.xaml.cs">
|
<Compile Update="UI\UCSewerMainWindow.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="UI\SanMaßnahmen\UCTaetigkeitEdit.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Page Update="MainWindow.xaml">
|
<Page Update="MainWindow.xaml">
|
||||||
@@ -99,5 +102,8 @@
|
|||||||
<Page Update="UI\UCSewerMainWindow.xaml">
|
<Page Update="UI\UCSewerMainWindow.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="UI\SanMaßnahmen\UCTaetigkeitEdit.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -3,10 +3,28 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:self="clr-namespace:KanSan.ViewModel;assembly=KanSan.ViewModel"
|
||||||
|
xmlns:model="clr-namespace:KanSan.Base.Models;assembly=KanSan.Base"
|
||||||
xmlns:local="clr-namespace:KanSan.UI"
|
xmlns:local="clr-namespace:KanSan.UI"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<TreeView Name="trvTaetigkeiten" MouseDoubleClick="trvTaetigkeiten_MouseDoubleClick" ItemsSource="{Binding Taetigkeiten}">
|
||||||
|
<TreeView.Resources>
|
||||||
|
<DataTemplate DataType="{x:Type model:Taetigkeiten}">
|
||||||
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<TextBlock Text="{Binding GuidNr}" />
|
||||||
|
</StackPanel>
|
||||||
|
</DataTemplate>
|
||||||
|
</TreeView.Resources>
|
||||||
|
|
||||||
|
</TreeView>
|
||||||
|
<Button Grid.Row="1" IsEnabled="{Binding CanAddNewSan}" x:Name="NewSanMaßnahme" Content="Neue Sanierungsmaßnahme hinzufügen" Click="NewSanMaßnahme_Click" />
|
||||||
|
<Button Grid.Row="2" Name="NewTaetigkeit" Content="Neue Tätigkeit hinzufügen" Click="NewTaetigkeit_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
using System;
|
using KanSan.Base.Models;
|
||||||
|
using KanSan.ViewModel;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -18,9 +21,65 @@ namespace KanSan.UI
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class UCSanMaßnahmenList : UserControl
|
public partial class UCSanMaßnahmenList : UserControl
|
||||||
{
|
{
|
||||||
public UCSanMaßnahmenList()
|
private Schaeden schaden;
|
||||||
|
public event EventHandler<TaetigkeitenSelectEventArgs> TaetigkeitenSelected;
|
||||||
|
public UCSanMaßnahmenList(Schaeden schaeden)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.schaden = schaeden;
|
||||||
|
this.DataContext = new SanierungskonzeptListViewModel(schaeden);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void NewSanMaßnahme_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var x = (DataContext as SanierungskonzeptListViewModel).NeueSanierungskonzept();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void OnTaetigkeitSelect(TaetigkeitenSelectEventArgs e)
|
||||||
|
{
|
||||||
|
EventHandler<TaetigkeitenSelectEventArgs> handler = TaetigkeitenSelected;
|
||||||
|
if (handler != null)
|
||||||
|
handler(this, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void NewTaetigkeit_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
OnTaetigkeitSelect(new TaetigkeitenSelectEventArgs()
|
||||||
|
{
|
||||||
|
Taetigkeit = (DataContext as SanierungskonzeptListViewModel).NeueTaetigkeit()
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void trvTaetigkeiten_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
TreeView treeView = (TreeView)sender;
|
||||||
|
if (treeView == null) return;
|
||||||
|
if (!(treeView.SelectedItem is Taetigkeiten))
|
||||||
|
{
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
Debugger.Break();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Taetigkeiten taetigkeiten = (Taetigkeiten)treeView.SelectedItem;
|
||||||
|
if(taetigkeiten == null)
|
||||||
|
{
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
Debugger.Break();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
OnTaetigkeitSelect(new TaetigkeitenSelectEventArgs()
|
||||||
|
{
|
||||||
|
Taetigkeit = taetigkeiten
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class TaetigkeitenSelectEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
public Taetigkeiten Taetigkeit { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
32
KanSan/UI/SanMaßnahmen/UCTaetigkeitEdit.xaml
Normal file
32
KanSan/UI/SanMaßnahmen/UCTaetigkeitEdit.xaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<UserControl x:Class="KanSan.UI.UCTaetigkeitEdit"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:local="clr-namespace:KanSan.UI"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="Mitarbeiter" />
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="Fahrzeug" />
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="Datum" />
|
||||||
|
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Mitarbeiter}" />
|
||||||
|
<Button Grid.Row="6" Grid.ColumnSpan="2" Content="Speichern" Name="Speichern" Click="Speichern_Click" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
43
KanSan/UI/SanMaßnahmen/UCTaetigkeitEdit.xaml.cs
Normal file
43
KanSan/UI/SanMaßnahmen/UCTaetigkeitEdit.xaml.cs
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
using KanSan.Base.Models;
|
||||||
|
using KanSan.ViewModel;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Data;
|
||||||
|
using System.Windows.Documents;
|
||||||
|
using System.Windows.Input;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using System.Windows.Navigation;
|
||||||
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
|
namespace KanSan.UI
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaktionslogik für UCTaetigkeitEdit.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class UCTaetigkeitEdit : UserControl
|
||||||
|
{
|
||||||
|
public event EventHandler SpeichernClicked;
|
||||||
|
protected virtual void OnSpeichernClicked(EventArgs e)
|
||||||
|
{
|
||||||
|
EventHandler handler = SpeichernClicked;
|
||||||
|
if (handler != null)
|
||||||
|
handler(this, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
public UCTaetigkeitEdit(Taetigkeiten taetigkeit)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.DataContext = new TaetigkeitEditViewModel(taetigkeit);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Speichern_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
(DataContext as TaetigkeitEditViewModel).Speichern();
|
||||||
|
OnSpeichernClicked(EventArgs.Empty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -62,7 +62,15 @@ namespace KanSan.UI
|
|||||||
|
|
||||||
private void UCSchaedenList_SanierungsmaßnahmenSelected(object sender, SelectSchaedenEventArgs e)
|
private void UCSchaedenList_SanierungsmaßnahmenSelected(object sender, SelectSchaedenEventArgs e)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
UI.UCSanMaßnahmenList uCSanMaßnahmenList = new UCSanMaßnahmenList(e.schaeden);
|
||||||
|
uCSanMaßnahmenList.TaetigkeitenSelected += UCSanMaßnahmenList_TaetigkeitenSelected;
|
||||||
|
ObjektContentcontroller.Content = uCSanMaßnahmenList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UCSanMaßnahmenList_TaetigkeitenSelected(object sender, TaetigkeitenSelectEventArgs e)
|
||||||
|
{
|
||||||
|
UI.UCTaetigkeitEdit uCTaetigkeitEdit = new UCTaetigkeitEdit(e.Taetigkeit);
|
||||||
|
ObjektContentcontroller.Content = uCTaetigkeitEdit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UCSchaedenList_SchaedenSelected(object sender, SelectSchaedenEventArgs e)
|
private void UCSchaedenList_SchaedenSelected(object sender, SelectSchaedenEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user