Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7db9592dff | ||
|
|
bbb2c45eff | ||
|
|
c2228e2321 | ||
|
|
5662502d5e | ||
|
|
ecda2ab44f | ||
|
|
06cb2572ff | ||
|
|
1bf0c3b615 | ||
|
|
f34f4517ca | ||
|
|
f59fc036d1 | ||
|
|
bb2d7be54e | ||
|
|
acc577eb32 | ||
|
|
9a24a4a7cd | ||
|
|
4689f2e4da | ||
|
|
f903da3af7 | ||
|
|
49f9b6c496 | ||
|
|
1b4911e6aa | ||
|
|
13b4be5f5a | ||
|
|
ee46751fa6 | ||
|
|
d4da9fd0da | ||
|
|
b4a896f5bf | ||
|
|
e2e7fbc9c4 | ||
|
|
6cf888c5e3 | ||
|
|
3b97a912bc |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -18,3 +18,4 @@ project.fragment.lock.json
|
|||||||
*.tmp
|
*.tmp
|
||||||
/DaSaSo.InMemoryProvider/obj/Debug/*
|
/DaSaSo.InMemoryProvider/obj/Debug/*
|
||||||
/DaSaSo.ViewModel/version.txt
|
/DaSaSo.ViewModel/version.txt
|
||||||
|
/DaSaSo.Wpf/version.txt
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
Projects,
|
Projects,
|
||||||
Buildingsites,
|
Buildingsites,
|
||||||
SewerObjects,
|
SewerObjects,
|
||||||
SewerMainMenu
|
SewerMainMenu,
|
||||||
|
Impregnierung
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
SewerStammdaten,
|
SewerStammdaten,
|
||||||
SewerDamageList,
|
SewerDamageList,
|
||||||
SewerDamageEdit,
|
SewerDamageEdit,
|
||||||
SewerPipeLiner
|
SewerPipeLiner,
|
||||||
|
SewerPictureDocumentation
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace DaSaSo.Domain.Model
|
|||||||
{
|
{
|
||||||
public class Buildingsite : DomainObject
|
public class Buildingsite : DomainObject
|
||||||
{
|
{
|
||||||
|
public Client Client { get; set; }
|
||||||
public Project Project { get; set; }
|
public Project Project { get; set; }
|
||||||
public string BuildingSiteNumber { get; set; }
|
public string BuildingSiteNumber { get; set; }
|
||||||
public string Country { get; set; }
|
public string Country { get; set; }
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ namespace DaSaSo.Domain.Model
|
|||||||
public string Country { get; set; }
|
public string Country { get; set; }
|
||||||
public string Street { get; set; }
|
public string Street { get; set; }
|
||||||
public string Postcode { get; set; }
|
public string Postcode { get; set; }
|
||||||
public ICollection<Project> Projects { get; set; } = new List<Project>();
|
//public ICollection<Project> Projects { get; set; } = new List<Project>();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ namespace DaSaSo.Domain.Model
|
|||||||
public string Number { get; set; }
|
public string Number { get; set; }
|
||||||
public decimal Linerlength { get; set; }
|
public decimal Linerlength { get; set; }
|
||||||
public bool IsAvaible { get; set; }
|
public bool IsAvaible { get; set; }
|
||||||
public DateOnly Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public string LinerNumber { get; set; }
|
public string LinerNumber { get; set; }
|
||||||
public decimal WallThickness { get; set; }
|
public decimal WallThickness { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
14
DaSaSo.Domain/Model/PhotoDocumentation.cs
Normal file
14
DaSaSo.Domain/Model/PhotoDocumentation.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Domain.Model
|
||||||
|
{
|
||||||
|
public class PhotoDocumentation : DomainObject
|
||||||
|
{
|
||||||
|
public string PicturePath { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ namespace DaSaSo.Domain.Model
|
|||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Projektnummer { get; set; }
|
public string Projektnummer { get; set; }
|
||||||
public Client Client { get; set; }
|
//public Client Client { get; set; }
|
||||||
public ICollection<Buildingsite> BuildingSites { get; set; } = new List<Buildingsite>();
|
public ICollection<Buildingsite> BuildingSites { get; set; } = new List<Buildingsite>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace DaSaSo.Domain.Model
|
|||||||
public abstract class SewerRehabilation : DomainObject
|
public abstract class SewerRehabilation : DomainObject
|
||||||
{
|
{
|
||||||
public string Operator { get; set; }
|
public string Operator { get; set; }
|
||||||
public DateOnly Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public decimal TemperatureOutdoors { get; set; }
|
public decimal TemperatureOutdoors { get; set; }
|
||||||
public decimal TemperatureSewer { get; set; }
|
public decimal TemperatureSewer { get; set; }
|
||||||
public string Weather { get; set; }
|
public string Weather { get; set; }
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Domain.Services.PipeLinerServices
|
||||||
|
{
|
||||||
|
public interface IPipeLinerService
|
||||||
|
{
|
||||||
|
Task<PipeLiner> CreatePipeLiner(SewerObject sewerObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
25
DaSaSo.Domain/Services/PipeLinerServices/PipeLinerService.cs
Normal file
25
DaSaSo.Domain/Services/PipeLinerServices/PipeLinerService.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Domain.Services.PipeLinerServices
|
||||||
|
{
|
||||||
|
public class PipeLinerService : IPipeLinerService
|
||||||
|
{
|
||||||
|
private readonly IDataService<SewerObject> _sewerObjectService;
|
||||||
|
public PipeLinerService(IDataService<SewerObject> sewerObjectService)
|
||||||
|
{
|
||||||
|
_sewerObjectService = sewerObjectService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PipeLiner> CreatePipeLiner(SewerObject sewerObject)
|
||||||
|
{
|
||||||
|
sewerObject.PipeLiner = new PipeLiner();
|
||||||
|
await _sewerObjectService.Update(sewerObject.Id,sewerObject);
|
||||||
|
return sewerObject.PipeLiner;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,6 @@ namespace DaSaSo.Domain.Services.ProjectServices
|
|||||||
{
|
{
|
||||||
public interface IProjectService
|
public interface IProjectService
|
||||||
{
|
{
|
||||||
Task<Project> CreateProject(Client Auftraggeber);
|
Task<Project> CreateProject();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,16 +16,18 @@ namespace DaSaSo.Domain.Services.ProjectServices
|
|||||||
_clientService = clientService;
|
_clientService = clientService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Project> CreateProject(Client Auftraggeber)
|
public async Task<Project> CreateProject()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
Project project = new Project()
|
Project project = new Project()
|
||||||
{
|
{
|
||||||
Client = Auftraggeber
|
Client = Auftraggeber
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
/*Auftraggeber.Projects.Add(project);
|
||||||
|
await _clientService.Update(Auftraggeber.Id, Auftraggeber);*/
|
||||||
|
|
||||||
Auftraggeber.Projects.Add(project);
|
return new Project();
|
||||||
await _clientService.Update(Auftraggeber.Id, Auftraggeber);
|
|
||||||
return project;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ namespace DaSaSo.Domain.Services.SewerObjectService
|
|||||||
SewerObject sewerObject = new SewerObject()
|
SewerObject sewerObject = new SewerObject()
|
||||||
{
|
{
|
||||||
BuildingSite = aktuellBaustelle,
|
BuildingSite = aktuellBaustelle,
|
||||||
StreetName = "Bitte aktualisieren!"
|
StreetName = "Bitte aktualisieren!",
|
||||||
|
//PipeLiner = new PipeLiner()
|
||||||
};
|
};
|
||||||
aktuellBaustelle.SewerObjects.Add(sewerObject);
|
aktuellBaustelle.SewerObjects.Add(sewerObject);
|
||||||
await _buildingsiteService.Update(aktuellBaustelle.Id, aktuellBaustelle);
|
await _buildingsiteService.Update(aktuellBaustelle.Id, aktuellBaustelle);
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-rc.1.21452.10" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0-rc.1.21452.10" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.21452.10">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0-rc.1" />
|
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ namespace DaSaSo.EntityFramework
|
|||||||
public DbSet<PipeLiner>? PipeLiners { get; set; }
|
public DbSet<PipeLiner>? PipeLiners { get; set; }
|
||||||
public DbSet<Impregnation>? Impregnations { get; set; }
|
public DbSet<Impregnation>? Impregnations { get; set; }
|
||||||
public DbSet<SewerPoint>? SewerPoints { get; set; }
|
public DbSet<SewerPoint>? SewerPoints { get; set; }
|
||||||
|
public DbSet<PhotoDocumentation>? PhotoDocumentation { get; set;}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
386
DaSaSo.EntityFramework/Migrations/20211101090936_RemoveClientAsDomain.Designer.cs
generated
Normal file
386
DaSaSo.EntityFramework/Migrations/20211101090936_RemoveClientAsDomain.Designer.cs
generated
Normal file
@@ -0,0 +1,386 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using DaSaSo.EntityFramework;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(DaSaSoDbContext))]
|
||||||
|
[Migration("20211101090936_RemoveClientAsDomain")]
|
||||||
|
partial class RemoveClientAsDomain
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("BuildingSiteNumber")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("ClientId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("ContactPerson")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Country")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("ProjectId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
|
b.HasIndex("ProjectId");
|
||||||
|
|
||||||
|
b.ToTable("Buildingsites");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Country")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Firstname")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Postcode")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Street")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Clients");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("DN")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<DateOnly>("Date")
|
||||||
|
.HasColumnType("date");
|
||||||
|
|
||||||
|
b.Property<bool>("IsAvaible")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("LinerNumber")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<decimal>("Linerlength")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("Number")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<decimal>("WallThickness")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Impregnations");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<bool>("ClosedEnd")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<DateOnly>("Date")
|
||||||
|
.HasColumnType("date");
|
||||||
|
|
||||||
|
b.Property<int?>("ImpregnationId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<decimal>("InversionPressure")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("LinerLength")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("Operator")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Preliner")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("PreparationType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperaturAssembly")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperaturStorage")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperatureOutdoors")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperatureSewer")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("Weather")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ImpregnationId");
|
||||||
|
|
||||||
|
b.ToTable("PipeLiners");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Projektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Projects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("DamageType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<decimal>("Distance")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<int?>("SewerObjectId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("SewerObjectId");
|
||||||
|
|
||||||
|
b.ToTable("SewerDamages");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int?>("BuildingSiteId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("BuildingsiteBarier")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("DN")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Hausnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Material")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ObjektName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("PermitNeeded")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int?>("PipeLinerId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("PunktObenId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("PunktObenType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("PunktUntenId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("PunktUntenType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("SanNummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("SewerActivated")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("SewerCleaned")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<decimal>("SewerLength")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("StreetName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("WaterBarrier")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasIndex("PipeLinerId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktObenId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktUntenId");
|
||||||
|
|
||||||
|
b.ToTable("SewerObjects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Objektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("SewerPoints");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClientId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||||
|
.WithMany("BuildingSites")
|
||||||
|
.HasForeignKey("ProjectId");
|
||||||
|
|
||||||
|
b.Navigation("Client");
|
||||||
|
|
||||||
|
b.Navigation("Project");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ImpregnationId");
|
||||||
|
|
||||||
|
b.Navigation("Impregnation");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||||
|
.WithMany("SewerDamages")
|
||||||
|
.HasForeignKey("SewerObjectId");
|
||||||
|
|
||||||
|
b.Navigation("SewerObject");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||||
|
.WithMany("SewerObjects")
|
||||||
|
.HasForeignKey("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.PipeLiner", "PipeLiner")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PipeLinerId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktObenId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktUntenId");
|
||||||
|
|
||||||
|
b.Navigation("BuildingSite");
|
||||||
|
|
||||||
|
b.Navigation("PipeLiner");
|
||||||
|
|
||||||
|
b.Navigation("PunktOben");
|
||||||
|
|
||||||
|
b.Navigation("PunktUnten");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("SewerObjects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("BuildingSites");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("SewerDamages");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Migrations
|
||||||
|
{
|
||||||
|
public partial class RemoveClientAsDomain : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Projects_Clients_ClientId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Projects_ClientId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ClientId",
|
||||||
|
table: "Projects");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<DateOnly>(
|
||||||
|
name: "Date",
|
||||||
|
table: "Impregnations",
|
||||||
|
type: "date",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(DateTime),
|
||||||
|
oldType: "timestamp with time zone");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "ClientId",
|
||||||
|
table: "Buildingsites",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Buildingsites_ClientId",
|
||||||
|
table: "Buildingsites",
|
||||||
|
column: "ClientId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Buildingsites_Clients_ClientId",
|
||||||
|
table: "Buildingsites",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "Clients",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Buildingsites_Clients_ClientId",
|
||||||
|
table: "Buildingsites");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Buildingsites_ClientId",
|
||||||
|
table: "Buildingsites");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ClientId",
|
||||||
|
table: "Buildingsites");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "ClientId",
|
||||||
|
table: "Projects",
|
||||||
|
type: "integer",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<DateTime>(
|
||||||
|
name: "Date",
|
||||||
|
table: "Impregnations",
|
||||||
|
type: "timestamp with time zone",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(DateOnly),
|
||||||
|
oldType: "date");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Projects_ClientId",
|
||||||
|
table: "Projects",
|
||||||
|
column: "ClientId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Projects_Clients_ClientId",
|
||||||
|
table: "Projects",
|
||||||
|
column: "ClientId",
|
||||||
|
principalTable: "Clients",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
405
DaSaSo.EntityFramework/Migrations/20220330120614_PhotoDocumentation_Added.Designer.cs
generated
Normal file
405
DaSaSo.EntityFramework/Migrations/20220330120614_PhotoDocumentation_Added.Designer.cs
generated
Normal file
@@ -0,0 +1,405 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using DaSaSo.EntityFramework;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Migrations
|
||||||
|
{
|
||||||
|
[DbContext(typeof(DaSaSoDbContext))]
|
||||||
|
[Migration("20220330120614_PhotoDocumentation_Added")]
|
||||||
|
partial class PhotoDocumentation_Added
|
||||||
|
{
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "6.0.0")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("BuildingSiteNumber")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("ClientId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("ContactPerson")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Country")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("ProjectId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
|
b.HasIndex("ProjectId");
|
||||||
|
|
||||||
|
b.ToTable("Buildingsites");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Country")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Firstname")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("LastName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Postcode")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Street")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Clients");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Impregnation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("DN")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<DateOnly>("Date")
|
||||||
|
.HasColumnType("date");
|
||||||
|
|
||||||
|
b.Property<bool>("IsAvaible")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("LinerNumber")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<decimal>("Linerlength")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("Number")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<decimal>("WallThickness")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Impregnations");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.PhotoDocumentation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("PicturePath")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("PhotoDocumentation");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<bool>("ClosedEnd")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<DateOnly>("Date")
|
||||||
|
.HasColumnType("date");
|
||||||
|
|
||||||
|
b.Property<int?>("ImpregnationId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<decimal>("InversionPressure")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("LinerLength")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("Operator")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("Preliner")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("PreparationType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperaturAssembly")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperaturStorage")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperatureOutdoors")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<decimal>("TemperatureSewer")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("Weather")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ImpregnationId");
|
||||||
|
|
||||||
|
b.ToTable("PipeLiners");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Projektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("Projects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int>("DamageType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<decimal>("Distance")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<int?>("SewerObjectId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("SewerObjectId");
|
||||||
|
|
||||||
|
b.ToTable("SewerDamages");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<int?>("BuildingSiteId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("BuildingsiteBarier")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("DN")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Hausnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Material")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ObjektName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("PermitNeeded")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int?>("PipeLinerId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("PunktObenId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("PunktObenType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int?>("PunktUntenId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<int>("PunktUntenType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("SanNummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("SewerActivated")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("SewerCleaned")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<decimal>("SewerLength")
|
||||||
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
|
b.Property<string>("StreetName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("WaterBarrier")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasIndex("PipeLinerId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktObenId");
|
||||||
|
|
||||||
|
b.HasIndex("PunktUntenId");
|
||||||
|
|
||||||
|
b.ToTable("SewerObjects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerPoint", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Objektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("SewerPoints");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClientId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||||
|
.WithMany("BuildingSites")
|
||||||
|
.HasForeignKey("ProjectId");
|
||||||
|
|
||||||
|
b.Navigation("Client");
|
||||||
|
|
||||||
|
b.Navigation("Project");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Impregnation", "Impregnation")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ImpregnationId");
|
||||||
|
|
||||||
|
b.Navigation("Impregnation");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||||
|
.WithMany("SewerDamages")
|
||||||
|
.HasForeignKey("SewerObjectId");
|
||||||
|
|
||||||
|
b.Navigation("SewerObject");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Buildingsite", "BuildingSite")
|
||||||
|
.WithMany("SewerObjects")
|
||||||
|
.HasForeignKey("BuildingSiteId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.PipeLiner", "PipeLiner")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PipeLinerId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktOben")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktObenId");
|
||||||
|
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.SewerPoint", "PunktUnten")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("PunktUntenId");
|
||||||
|
|
||||||
|
b.Navigation("BuildingSite");
|
||||||
|
|
||||||
|
b.Navigation("PipeLiner");
|
||||||
|
|
||||||
|
b.Navigation("PunktOben");
|
||||||
|
|
||||||
|
b.Navigation("PunktUnten");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("SewerObjects");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("BuildingSites");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerObject", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("SewerDamages");
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Migrations
|
||||||
|
{
|
||||||
|
public partial class PhotoDocumentation_Added : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "PhotoDocumentation",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "integer", nullable: false)
|
||||||
|
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||||
|
PicturePath = table.Column<string>(type: "text", nullable: true),
|
||||||
|
Description = table.Column<string>(type: "text", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_PhotoDocumentation", x => x.Id);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "PhotoDocumentation");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
|
.HasAnnotation("ProductVersion", "6.0.0")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
@@ -33,6 +33,9 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<string>("BuildingSiteNumber")
|
b.Property<string>("BuildingSiteNumber")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("ClientId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<string>("ContactPerson")
|
b.Property<string>("ContactPerson")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
@@ -44,6 +47,8 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
b.HasIndex("ProjectId");
|
b.HasIndex("ProjectId");
|
||||||
|
|
||||||
b.ToTable("Buildingsites");
|
b.ToTable("Buildingsites");
|
||||||
@@ -88,8 +93,8 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<int>("DN")
|
b.Property<int>("DN")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<DateTime>("Date")
|
b.Property<DateOnly>("Date")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("date");
|
||||||
|
|
||||||
b.Property<bool>("IsAvaible")
|
b.Property<bool>("IsAvaible")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
@@ -111,6 +116,25 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.ToTable("Impregnations");
|
b.ToTable("Impregnations");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("DaSaSo.Domain.Model.PhotoDocumentation", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("Description")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("PicturePath")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.ToTable("PhotoDocumentation");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
modelBuilder.Entity("DaSaSo.Domain.Model.PipeLiner", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -173,9 +197,6 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<int?>("ClientId")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
@@ -184,8 +205,6 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("ClientId");
|
|
||||||
|
|
||||||
b.ToTable("Projects");
|
b.ToTable("Projects");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -306,10 +325,16 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
modelBuilder.Entity("DaSaSo.Domain.Model.Buildingsite", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ClientId");
|
||||||
|
|
||||||
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
b.HasOne("DaSaSo.Domain.Model.Project", "Project")
|
||||||
.WithMany("BuildingSites")
|
.WithMany("BuildingSites")
|
||||||
.HasForeignKey("ProjectId");
|
.HasForeignKey("ProjectId");
|
||||||
|
|
||||||
|
b.Navigation("Client");
|
||||||
|
|
||||||
b.Navigation("Project");
|
b.Navigation("Project");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -322,15 +347,6 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Navigation("Impregnation");
|
b.Navigation("Impregnation");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
|
||||||
.WithMany("Projects")
|
|
||||||
.HasForeignKey("ClientId");
|
|
||||||
|
|
||||||
b.Navigation("Client");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
modelBuilder.Entity("DaSaSo.Domain.Model.SewerDamage", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
b.HasOne("DaSaSo.Domain.Model.SewerObject", "SewerObject")
|
||||||
@@ -372,11 +388,6 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Navigation("SewerObjects");
|
b.Navigation("SewerObjects");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.Client", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Projects");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
modelBuilder.Entity("DaSaSo.Domain.Model.Project", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("BuildingSites");
|
b.Navigation("BuildingSites");
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace DaSaSo.EntityFramework.Services
|
|||||||
public async Task<Client> Get(int id)
|
public async Task<Client> Get(int id)
|
||||||
{
|
{
|
||||||
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
Client entity = await context.Clients.Include(a => a.Projects).FirstOrDefaultAsync((e) => e.Id == id);
|
Client entity = await context.Clients.FirstOrDefaultAsync((e) => e.Id == id);
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|||||||
56
DaSaSo.EntityFramework/Services/ImpregnationDataService.cs
Normal file
56
DaSaSo.EntityFramework/Services/ImpregnationDataService.cs
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.EntityFramework.Services.Common;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Services
|
||||||
|
{
|
||||||
|
public class ImpregnationDataService : IDataService<Impregnation>
|
||||||
|
{
|
||||||
|
private readonly DaSaSoDbContextFactory _contextFactory;
|
||||||
|
private readonly NonQueryDataService<Impregnation> _nonQueryDataService;
|
||||||
|
|
||||||
|
public ImpregnationDataService(DaSaSoDbContextFactory contextFactory)
|
||||||
|
{
|
||||||
|
_contextFactory = contextFactory;
|
||||||
|
_nonQueryDataService = new NonQueryDataService<Impregnation>(contextFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Impregnation> Create(Impregnation entity)
|
||||||
|
{
|
||||||
|
return await _nonQueryDataService.Create(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Impregnation CreateNonAsync(Impregnation entity)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> Delete(int id)
|
||||||
|
{
|
||||||
|
return await _nonQueryDataService.Delete(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Impregnation> Get(int id)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Impregnation>> GetAll()
|
||||||
|
{
|
||||||
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
|
IEnumerable<Impregnation> entities = await context.Impregnations.ToListAsync();
|
||||||
|
return entities;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task<Impregnation> Update(int id, Impregnation entity)
|
||||||
|
{
|
||||||
|
return _nonQueryDataService.Update(id, entity);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -41,22 +41,16 @@ namespace DaSaSo.EntityFramework.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<Project>> GetAllByClient(Client client)
|
|
||||||
|
public async Task<IEnumerable<Project>> GetAll()
|
||||||
{
|
{
|
||||||
// Get Clientid
|
using(DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
||||||
int id = client.Id;
|
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
|
||||||
{
|
{
|
||||||
IEnumerable<Project> entities = await context.Projects.Where(x => x.Client.Id == id).ToListAsync();
|
IEnumerable<Project> entities = await context.Projects.ToListAsync();
|
||||||
return entities;
|
return entities;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<IEnumerable<Project>> GetAll()
|
|
||||||
{
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<Project> Update(int id, Project entity)
|
public async Task<Project> Update(int id, Project entity)
|
||||||
{
|
{
|
||||||
return await _nonQueryDataService.Update(id, entity);
|
return await _nonQueryDataService.Update(id, entity);
|
||||||
|
|||||||
@@ -1,32 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<None Remove="version.txt" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="version.txt">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.0" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" />
|
|
||||||
<ProjectReference Include="..\DaSaSo.EntityFramework\DaSaSo.EntityFramework.csproj" />
|
|
||||||
<ProjectReference Include="..\DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
|
||||||
<Exec Command="git rev-parse HEAD > $(ProjectDir)\version.txt
" />
|
|
||||||
</Target>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -5,11 +5,11 @@ using DaSaSo.Domain.Services.ProjectServices;
|
|||||||
using DaSaSo.Domain.Services.SewerObjectService;
|
using DaSaSo.Domain.Services.SewerObjectService;
|
||||||
using DaSaSo.EntityFramework;
|
using DaSaSo.EntityFramework;
|
||||||
using DaSaSo.EntityFramework.Services;
|
using DaSaSo.EntityFramework.Services;
|
||||||
using DaSaSo.ViewModel;
|
using DaSaSo.Wpf.ViewModel;
|
||||||
using DaSaSo.ViewModel.Factories;
|
using DaSaSo.Wpf.ViewModel.Factories;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using DaSaSo.ViewModel.State.ActualState;
|
using DaSaSo.Wpf.ViewModel.State.ActualState;
|
||||||
using DaSaSo.ViewModel.State.Navigation;
|
using DaSaSo.Wpf.ViewModel.State.Navigation;
|
||||||
using DaSaSo.Wpf.HostBuilders;
|
using DaSaSo.Wpf.HostBuilders;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
@@ -41,119 +41,7 @@ namespace DaSaSo.Wpf
|
|||||||
.AddDBContext();
|
.AddDBContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* return Host.CreateDefaultBuilder(args)
|
|
||||||
.ConfigureAppConfiguration(c=>
|
|
||||||
{
|
|
||||||
c.AddJsonFile("appsettings.json");
|
|
||||||
c.AddEnvironmentVariables();
|
|
||||||
})
|
|
||||||
.ConfigureServices((context, services) =>
|
|
||||||
{
|
|
||||||
|
|
||||||
string connectionString = context.Configuration.GetConnectionString("default");
|
|
||||||
|
|
||||||
services.AddDbContext<DaSaSoDbContext>(o => o.UseSqlServer(connectionString));
|
|
||||||
services.AddSingleton<DaSaSoDbContextFactory>(new DaSaSoDbContextFactory(connectionString));
|
|
||||||
|
|
||||||
services.AddSingleton<IDataService<Client>, ClientDataService>();
|
|
||||||
services.AddSingleton<IDataService<Project>, ProjectDataService>();
|
|
||||||
services.AddSingleton<IDataService<Buildingsite>, BuildingsiteDataService>();
|
|
||||||
services.AddSingleton<IDataService<SewerObject>, SewerObjectDataService>();
|
|
||||||
services.AddSingleton<ClientListViewModel>();
|
|
||||||
services.AddSingleton<IProjectService, ProjectService>();
|
|
||||||
services.AddSingleton<IBuildingsiteService, BuildingsiteService>();
|
|
||||||
services.AddSingleton<ISewerObjectService, SewerObjectService>();
|
|
||||||
|
|
||||||
|
|
||||||
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
|
||||||
services.AddSingleton<IViewModelSewerMainFactory, SewerWindowViewModelFactory>();
|
|
||||||
services.AddSingleton<CreateViewModel<ClientEditViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new ClientEditViewModel(
|
|
||||||
services.GetRequiredService<IDataService<Client>>(),
|
|
||||||
services.GetRequiredService<IActualProject>(),
|
|
||||||
new ViewModelDelegateRenavigator(
|
|
||||||
services.GetRequiredService<IMainWindowNavigator>()
|
|
||||||
));
|
|
||||||
});
|
|
||||||
services.AddSingleton<CreateViewModel<HomeViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new HomeViewModel();
|
|
||||||
});
|
|
||||||
services.AddSingleton<CreateViewModel<SewerStammdatenViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new SewerStammdatenViewModel(
|
|
||||||
services.GetRequiredService<IActualProject>()
|
|
||||||
);
|
|
||||||
});
|
|
||||||
services.AddSingleton<CreateViewModel<SewerDamageListViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new SewerDamageListViewModel();
|
|
||||||
});
|
|
||||||
|
|
||||||
services.AddSingleton<CreateViewModel<ClientListViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new ClientListViewModel(
|
|
||||||
services.GetRequiredService<IDataService<Client>>(),
|
|
||||||
services.GetRequiredService<IActualProject>(),
|
|
||||||
new ViewModelDelegateRenavigator(
|
|
||||||
services.GetRequiredService<IMainWindowNavigator>()
|
|
||||||
));
|
|
||||||
});
|
|
||||||
services.AddSingleton<CreateViewModel<SewerMainListViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new SewerMainListViewModel(
|
|
||||||
services.GetRequiredService<IDataService<SewerObject>>(),
|
|
||||||
services.GetRequiredService<ISewerMainNavigator>(),
|
|
||||||
services.GetRequiredService<IActualProject>(),
|
|
||||||
services.GetRequiredService<IViewModelSewerMainFactory>(),
|
|
||||||
new ViewModelDelegateRenavigator(
|
|
||||||
services.GetRequiredService<IMainWindowNavigator>()
|
|
||||||
),
|
|
||||||
services.GetRequiredService<ISewerObjectService>()
|
|
||||||
);
|
|
||||||
});
|
|
||||||
services.AddSingleton<CreateViewModel<ProjectListViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new ProjectListViewModel(
|
|
||||||
services.GetRequiredService<IDataService<Project>>(),
|
|
||||||
services.GetRequiredService<IActualProject>(),
|
|
||||||
new ViewModelDelegateRenavigator(
|
|
||||||
services.GetRequiredService<IMainWindowNavigator>()),
|
|
||||||
services.GetRequiredService<IProjectService>()
|
|
||||||
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
services.AddSingleton<CreateViewModel<BuildingsiteListViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new BuildingsiteListViewModel(
|
|
||||||
services.GetRequiredService<IDataService<Buildingsite>>(),
|
|
||||||
services.GetRequiredService<IActualProject>(),
|
|
||||||
new ViewModelDelegateRenavigator(
|
|
||||||
services.GetRequiredService<IMainWindowNavigator>()),
|
|
||||||
services.GetRequiredService<IBuildingsiteService>()
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
services.AddSingleton<CreateViewModel<SewerObjectListViewModel>>(services =>
|
|
||||||
{
|
|
||||||
return () => new SewerObjectListViewModel(
|
|
||||||
services.GetRequiredService<IDataService<SewerObject>>(),
|
|
||||||
services.GetRequiredService<IActualProject>(),
|
|
||||||
services.GetRequiredService<ISewerObjectService>()
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
//services.AddSingleton<INavigator, Navigator>();
|
|
||||||
services.AddScoped<IActualProject, ActualProject>();
|
|
||||||
services.AddScoped<IMainWindowNavigator, MainWindowNavigator>();
|
|
||||||
services.AddScoped<ISewerMainNavigator, SewerMainNavigator>();
|
|
||||||
|
|
||||||
services.AddScoped<MainWindowViewModel>();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
protected override void OnStartup(StartupEventArgs e)
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
{
|
{
|
||||||
Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
|
Application.Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
|
||||||
@@ -177,7 +65,7 @@ namespace DaSaSo.Wpf
|
|||||||
|
|
||||||
protected override async void OnExit(ExitEventArgs e)
|
protected override async void OnExit(ExitEventArgs e)
|
||||||
{
|
{
|
||||||
_host.StopAsync();
|
await _host.StopAsync();
|
||||||
_host.Dispose();
|
_host.Dispose();
|
||||||
base.OnExit(e);
|
base.OnExit(e);
|
||||||
}
|
}
|
||||||
@@ -187,7 +75,7 @@ namespace DaSaSo.Wpf
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Exception ex = (Exception)e.ExceptionObject;
|
Exception ex = (Exception)e.ExceptionObject;
|
||||||
string text = "An application error occured. Plrease contact the Administrator with the following information:\n\n";
|
string text = "An application error occured. Please contact the Administrator with the following information:\n\n";
|
||||||
MessageBox.Show(text + " " + ex.Message + "\n\n" + ex.StackTrace);
|
MessageBox.Show(text + " " + ex.Message + "\n\n" + ex.StackTrace);
|
||||||
}
|
}
|
||||||
catch(Exception ex2)
|
catch(Exception ex2)
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls"
|
||||||
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
|
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
|
||||||
xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel"
|
||||||
|
|
||||||
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
||||||
d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="300" d:DesignWidth="200">
|
d:DesignHeight="375" d:DesignWidth="200">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<converters:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
|
<converters:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
|
||||||
<converters:EqualValueToBooleanConverter x:Key="EqualValueToBooleanConverter" />
|
<converters:EqualValueToBooleanConverter x:Key="EqualValueToBooleanConverter" />
|
||||||
@@ -21,13 +21,14 @@
|
|||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<RadioButton Grid.Row="0" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ClientListViewModel}}" Content="Kunden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="True" CommandParameter="{x:Static nav:EMainWindowViewType.Clients}"/>
|
<RadioButton Grid.Row="0" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ProjectListViewModel}}" Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.Projects}" />
|
||||||
<RadioButton Grid.Row="1" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ProjectListViewModel}}" Content="Projekte" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectProject}" CommandParameter="{x:Static nav:EMainWindowViewType.Projects}" />
|
<RadioButton Grid.Row="1" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:BuildingsiteListViewModel}}" Content="Baustellen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectBuildingSite}" CommandParameter="{x:Static nav:EMainWindowViewType.Buildingsites}" />
|
||||||
<RadioButton Grid.Row="2" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:BuildingsiteListViewModel}}" Content="Baustellen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectBuildingSite}" CommandParameter="{x:Static nav:EMainWindowViewType.Buildingsites}" />
|
<RadioButton Grid.Row="2" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:SewerObjectListViewModel}}" Content="Objekten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectSewerObjects}" CommandParameter="{x:Static nav:EMainWindowViewType.SewerObjects}" />
|
||||||
<RadioButton Grid.Row="3" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:SewerObjectListViewModel}}" Content="Objekten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="{Binding CanSelectSewerObjects}" CommandParameter="{x:Static nav:EMainWindowViewType.SewerObjects}" />
|
<RadioButton Grid.Row="3" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ClientListViewModel}}" Content="Kunden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" IsEnabled="True" CommandParameter="{x:Static nav:EMainWindowViewType.Clients}"/>
|
||||||
|
<RadioButton Grid.Row="4" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ImpregnierungListViewModel}}" Content="Imprägnierungen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.Impregnierung}" />
|
||||||
<Border Grid.RowSpan="4" Background="LightBlue" Visibility="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToBooleanConverter}, ConverterParameter={x:Type viewmodel:SewerMainListViewModel}}" d:Visibility="Hidden">
|
<Border Grid.RowSpan="5" Background="LightBlue" Visibility="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToBooleanConverter}, ConverterParameter={x:Type viewmodel:SewerMainListViewModel}}" d:Visibility="Hidden">
|
||||||
<TextBlock Foreground="WhiteSmoke" FontSize="18" Text="Editing Sewer" />
|
<TextBlock Foreground="WhiteSmoke" FontSize="18" Text="Editing Sewer" />
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
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:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
|
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
|
||||||
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="607.5" d:DesignWidth="200">
|
d:DesignHeight="647.5" d:DesignWidth="200">
|
||||||
<Grid>
|
<Grid>
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<RadioButton Content="Stammdaten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerStammdaten}" Margin="20" />
|
<RadioButton Content="Stammdaten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerStammdaten}" Margin="20" />
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
<RadioButton Content="Schließen" Style="{StaticResource ToggleButtonList}" Command="{Binding CloseCommand}" Margin="20" />
|
<RadioButton Content="Schließen" Style="{StaticResource ToggleButtonList}" Command="{Binding CloseCommand}" Margin="20" />
|
||||||
<RadioButton Content="{Binding Schaden.Distance,FallbackValue='Damage'}" Command="{Binding UpdateCurrentSewerViewModelCommand}" IsEnabled="{Binding CanSelectDamage}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerDamageEdit}" Style="{StaticResource ToggleButtonList}" Margin="20" />
|
<RadioButton Content="{Binding Schaden.Distance,FallbackValue='Damage'}" Command="{Binding UpdateCurrentSewerViewModelCommand}" IsEnabled="{Binding CanSelectDamage}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerDamageEdit}" Style="{StaticResource ToggleButtonList}" Margin="20" />
|
||||||
<RadioButton Content="Schlauchliner" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerPipeLiner}" Margin="20" />
|
<RadioButton Content="Schlauchliner" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerPipeLiner}" Margin="20" />
|
||||||
|
<RadioButton Content="Fotodokumentation" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerPictureDocumentation}" Margin="20" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
31
DaSaSo.Wpf/Converters/StringToDateTimeConverter.cs
Normal file
31
DaSaSo.Wpf/Converters/StringToDateTimeConverter.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.Converters
|
||||||
|
{
|
||||||
|
[ValueConversion(typeof(DateTime), typeof(String))]
|
||||||
|
public class StringToDateTimeConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
DateTime val = (DateTime)value;
|
||||||
|
return string.Format("{0}.{1}.{2} {3}:{4}",val.Day,val.Month, val.Year, val.Hour, val.Minute);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
DateTime result;
|
||||||
|
if (DateTime.TryParse((value as string), out result))
|
||||||
|
{
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,16 +8,28 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-preview.7.21378.4">
|
<None Remove="version.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<EmbeddedResource Include="version.txt">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</EmbeddedResource>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-rc.1.21451.13" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" />
|
<ProjectReference Include="..\DaSaSo.Domain\DaSaSo.Domain.csproj" />
|
||||||
<ProjectReference Include="..\DaSaSo.ViewModel\DaSaSo.ViewModel.csproj" />
|
<ProjectReference Include="..\DaSaSo.EntityFramework\DaSaSo.EntityFramework.csproj" />
|
||||||
|
<ProjectReference Include="..\DaSaSo.InMemoryProvider\DaSaSo.InMemoryProvider.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -26,4 +38,8 @@
|
|||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||||
|
<Exec Command="git rev-parse HEAD > $(ProjectDir)\version.txt" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -28,6 +28,12 @@
|
|||||||
<Compile Update="View\HomeView.xaml.cs">
|
<Compile Update="View\HomeView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="View\Impregnation\ImpregnationEditView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="View\Impregnation\ImpregnationListView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="View\Project\ProjectEditView.xaml.cs">
|
<Compile Update="View\Project\ProjectEditView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -46,6 +52,9 @@
|
|||||||
<Compile Update="View\SewerObject\Controls\SewerRehabilation.xaml.cs">
|
<Compile Update="View\SewerObject\Controls\SewerRehabilation.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="View\SewerObject\PhotodocumentationView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="View\SewerObject\SewerPipeLinerView.xaml.cs">
|
<Compile Update="View\SewerObject\SewerPipeLinerView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -90,6 +99,12 @@
|
|||||||
<Page Update="View\HomeView.xaml">
|
<Page Update="View\HomeView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="View\Impregnation\ImpregnationEditView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="View\Impregnation\ImpregnationListView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="View\Project\ProjectEditView.xaml">
|
<Page Update="View\Project\ProjectEditView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
@@ -108,6 +123,9 @@
|
|||||||
<Page Update="View\SewerObject\Controls\SewerRehabilation.xaml">
|
<Page Update="View\SewerObject\Controls\SewerRehabilation.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="View\SewerObject\PhotodocumentationView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="View\SewerObject\SewerPipeLinerView.xaml">
|
<Page Update="View\SewerObject\SewerPipeLinerView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -19,19 +19,27 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
host.ConfigureServices((context,services) =>
|
host.ConfigureServices((context,services) =>
|
||||||
{
|
{
|
||||||
string connectionString = "";
|
string connectionString = "";
|
||||||
Action<DbContextOptionsBuilder> configureDbContext = null;
|
Action<DbContextOptionsBuilder> configureDbContext;
|
||||||
string databaseToUse = context.Configuration.GetConnectionString("databaseToUse");
|
string databaseToUse = context.Configuration.GetConnectionString("databaseToUse");
|
||||||
Trace.WriteLine(databaseToUse);
|
Trace.WriteLine(databaseToUse);
|
||||||
if(databaseToUse.Equals("default"))
|
if(databaseToUse.Equals("default"))
|
||||||
{
|
{
|
||||||
connectionString = context.Configuration.GetConnectionString("default");
|
connectionString = context.Configuration.GetConnectionString("default");
|
||||||
configureDbContext = o => o.UseNpgsql(connectionString);
|
configureDbContext = o =>
|
||||||
|
{
|
||||||
|
o.UseNpgsql(connectionString);
|
||||||
|
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
else if(databaseToUse.Equals("sqlite"))
|
else if(databaseToUse.Equals("sqlite"))
|
||||||
{
|
{
|
||||||
connectionString = context.Configuration.GetConnectionString("sqlite");
|
connectionString = context.Configuration.GetConnectionString("sqlite");
|
||||||
configureDbContext = o => o.UseSqlite(connectionString);
|
configureDbContext = o => o.UseSqlite(connectionString);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new NotImplementedException("Database Type not implementent" + databaseToUse);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
services.AddDbContext<DaSaSoDbContext>(configureDbContext);
|
services.AddDbContext<DaSaSoDbContext>(configureDbContext);
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
services.AddTransient<IDataService<Buildingsite>, BuildingsiteDataService>();
|
services.AddTransient<IDataService<Buildingsite>, BuildingsiteDataService>();
|
||||||
services.AddSingleton<IDataService<SewerObject>, SewerObjectDataService>();
|
services.AddSingleton<IDataService<SewerObject>, SewerObjectDataService>();
|
||||||
services.AddSingleton<IDataService<SewerPoint>, SewerpointDataService>();
|
services.AddSingleton<IDataService<SewerPoint>, SewerpointDataService>();
|
||||||
|
services.AddSingleton<IDataService<Impregnation>, ImpregnationDataService>();
|
||||||
services.AddSingleton<IProjectService, ProjectService>();
|
services.AddSingleton<IProjectService, ProjectService>();
|
||||||
services.AddSingleton<IBuildingsiteService, BuildingsiteService>();
|
services.AddSingleton<IBuildingsiteService, BuildingsiteService>();
|
||||||
services.AddSingleton<ISewerObjectService, SewerObjectService>();
|
services.AddSingleton<ISewerObjectService, SewerObjectService>();
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using DaSaSo.ViewModel.State.ActualState;
|
using DaSaSo.Wpf.ViewModel.State.ActualState;
|
||||||
using DaSaSo.ViewModel.State.Navigation;
|
using DaSaSo.Wpf.ViewModel.State.Navigation;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using System;
|
using System;
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ using DaSaSo.Domain.Services.BuildingsiteServices;
|
|||||||
using DaSaSo.Domain.Services.ProjectServices;
|
using DaSaSo.Domain.Services.ProjectServices;
|
||||||
using DaSaSo.Domain.Services.SewerObjectService;
|
using DaSaSo.Domain.Services.SewerObjectService;
|
||||||
using DaSaSo.Domain.Services.SewerPointServices;
|
using DaSaSo.Domain.Services.SewerPointServices;
|
||||||
using DaSaSo.ViewModel;
|
using DaSaSo.Wpf.ViewModel;
|
||||||
using DaSaSo.ViewModel.Factories;
|
using DaSaSo.Wpf.ViewModel.Factories;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using DaSaSo.ViewModel.State.Navigation;
|
using DaSaSo.Wpf.ViewModel.State.Navigation;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using System;
|
using System;
|
||||||
@@ -40,6 +40,8 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
services.AddSingleton<ViewModelDelegateRenavigator<SewerObjectListViewModel>>();
|
services.AddSingleton<ViewModelDelegateRenavigator<SewerObjectListViewModel>>();
|
||||||
services.AddTransient<ViewModelDelegateRenavigator<SewerDamageEditViewModel>>();
|
services.AddTransient<ViewModelDelegateRenavigator<SewerDamageEditViewModel>>();
|
||||||
|
|
||||||
|
services.AddSingleton<ViewModelDelegateRenavigator<ImpregnierungEditViewModel>>();
|
||||||
|
|
||||||
services.AddSingleton<CreateViewModel<HomeViewModel>>(services =>
|
services.AddSingleton<CreateViewModel<HomeViewModel>>(services =>
|
||||||
{
|
{
|
||||||
return () => new HomeViewModel();
|
return () => new HomeViewModel();
|
||||||
@@ -66,6 +68,23 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
{
|
{
|
||||||
return () => new HomeViewModel();
|
return () => new HomeViewModel();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
services.AddSingleton<CreateViewModel<ImpregnierungListViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new ImpregnierungListViewModel(
|
||||||
|
services.GetRequiredService<IDataService<Impregnation>>(),
|
||||||
|
services.GetRequiredService<IActualProject>(),
|
||||||
|
services.GetRequiredService<ViewModelDelegateRenavigator<ImpregnierungEditViewModel>>()
|
||||||
|
);
|
||||||
|
});
|
||||||
|
services.AddTransient<CreateViewModel<ImpregnierungEditViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new ImpregnierungEditViewModel(
|
||||||
|
services.GetRequiredService<IActualProject>(),
|
||||||
|
services.GetRequiredService<IDataService<Impregnation>>()
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
services.AddTransient<CreateViewModel<SewerStammdatenViewModel>>(services =>
|
services.AddTransient<CreateViewModel<SewerStammdatenViewModel>>(services =>
|
||||||
{
|
{
|
||||||
return () => new SewerStammdatenViewModel(
|
return () => new SewerStammdatenViewModel(
|
||||||
@@ -95,6 +114,11 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
services.AddTransient<CreateViewModel<SewerPictureDocumentationViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new SewerPictureDocumentationViewModel();
|
||||||
|
});
|
||||||
|
|
||||||
services.AddTransient<CreateViewModel<ClientListViewModel>>(services =>
|
services.AddTransient<CreateViewModel<ClientListViewModel>>(services =>
|
||||||
{
|
{
|
||||||
return () => new ClientListViewModel(
|
return () => new ClientListViewModel(
|
||||||
@@ -111,7 +135,7 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
services.GetRequiredService<ISewerMainNavigator>(),
|
services.GetRequiredService<ISewerMainNavigator>(),
|
||||||
services.GetRequiredService<IActualProject>(),
|
services.GetRequiredService<IActualProject>(),
|
||||||
services.GetRequiredService<IViewModelSewerMainFactory>(),
|
services.GetRequiredService<IViewModelSewerMainFactory>(),
|
||||||
services.GetRequiredService<ViewModelDelegateRenavigator<SewerObjectListViewModel>>(),
|
services.GetRequiredService<ViewModelDelegateRenavigator<SewerObjectListViewModel>>(),
|
||||||
services.GetRequiredService<ISewerObjectService>(),
|
services.GetRequiredService<ISewerObjectService>(),
|
||||||
services.GetRequiredService<ISewerpointService>()
|
services.GetRequiredService<ISewerpointService>()
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteEditViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteEditViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteListViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Buildingsites" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:BuildingsiteListViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientEditViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientEditViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientListViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Client" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ClientListViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
@@ -13,7 +13,6 @@
|
|||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="Kundenliste" />
|
<TextBlock Text="Kundenliste" />
|
||||||
<ListView Margin="20" ItemsSource="{Binding Clients}" DisplayMemberPath="Firstname" SelectedItem="{Binding SelectedClient, Mode=TwoWay}"/>
|
<ListView Margin="20" ItemsSource="{Binding Clients}" DisplayMemberPath="Firstname" SelectedItem="{Binding SelectedClient, Mode=TwoWay}"/>
|
||||||
<Button Content="Kunde auswählen" Command="{Binding SelectCommand}" />
|
|
||||||
<Button Content="Kunde Editieren" Command="{Binding EditCommand}"/>
|
<Button Content="Kunde Editieren" Command="{Binding EditCommand}"/>
|
||||||
<Button Content="Kunde Hinzufügen" Command="{Binding AddNewClientCommand}" />
|
<Button Content="Kunde Hinzufügen" Command="{Binding AddNewClientCommand}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:HomeViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
42
DaSaSo.Wpf/View/Impregnation/ImpregnationEditView.xaml
Normal file
42
DaSaSo.Wpf/View/Impregnation/ImpregnationEditView.xaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.Impregnation.ImpregnationEditView"
|
||||||
|
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:DaSaSo.Wpf.View.Impregnation" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ImpregnierungEditViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label Grid.Column="0" Grid.Row="0" Content="Imprägniernummer" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="1" Content="Linercharge" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="2" Content="Liner Länge" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="3" Content="Durchmesser" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="4" Content="Wandstärke" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="5" Content="Datum" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="6" Content="Vorhanden" />
|
||||||
|
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Imprägniernummer}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding LinerCharge}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding LinerLänge}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding DN}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Wandstärke}" />
|
||||||
|
<DatePicker Grid.Column="1" Grid.Row="5" SelectedDate="{Binding Imprägnierdatum}" />
|
||||||
|
<CheckBox Grid.Column="1" Grid.Row="6" Content="Ja" Style="{StaticResource checkBoxCircleSmall}"/>
|
||||||
|
|
||||||
|
<Button Grid.Row="7" Grid.ColumnSpan="2" Content="Speichern" Command="{Binding SaveImpregnation}" />
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
DaSaSo.Wpf/View/Impregnation/ImpregnationEditView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/Impregnation/ImpregnationEditView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
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 DaSaSo.Wpf.View.Impregnation
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ImpregnationEditView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ImpregnationEditView : UserControl
|
||||||
|
{
|
||||||
|
public ImpregnationEditView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
23
DaSaSo.Wpf/View/Impregnation/ImpregnationListView.xaml
Normal file
23
DaSaSo.Wpf/View/Impregnation/ImpregnationListView.xaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.Impregnation.ImpregnationListView"
|
||||||
|
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:DaSaSo.Wpf.View.Impregnation" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ImpregnierungListViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||||
|
</UserControl.Resources>
|
||||||
|
<Grid>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Text="Imprägnierungen" />
|
||||||
|
<ListView ItemsSource="{Binding Impregnations}" DisplayMemberPath="Number" SelectedItem="{Binding SelectedImpregnation, Mode=TwoWay}" />
|
||||||
|
<Button Content="Editieren" Command="{Binding EditImpregnationCommand}" CommandParameter="{Binding SelectedImpregnation}" />
|
||||||
|
<Button Content="Neue Hinzufügen" Command="{Binding AddImpregnationCommand}" />
|
||||||
|
</StackPanel>
|
||||||
|
<Border Background="Gray" d:Visibility="Hidden" Visibility="{Binding IsLoading, Converter={StaticResource BooleanToVisibilityConverter}}">
|
||||||
|
<TextBlock Foreground="White" FontSize="40" Text="Loading" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
DaSaSo.Wpf/View/Impregnation/ImpregnationListView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/Impregnation/ImpregnationListView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
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 DaSaSo.Wpf.View.Impregnation
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for ImpregnationListView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class ImpregnationListView : UserControl
|
||||||
|
{
|
||||||
|
public ImpregnationListView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectEditViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectEditViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectListViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.Project" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ProjectListViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
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:damagetype="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
|
xmlns:damagetype="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
|
||||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerDamageControllViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.Wpf.ViewModel.Controls" d:DataContext="{d:DesignInstance Type=controls:SewerDamageControllViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid Background="LightBlue">
|
<Grid Background="LightBlue">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerPreperationControllViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:controls="clr-namespace:DaSaSo.Wpf.ViewModel.Controls" d:DataContext="{d:DesignInstance Type=controls:SewerPreperationControllViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid Background="LightBlue">
|
<Grid Background="LightBlue">
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerRhebalationControllViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" xmlns:controls="clr-namespace:DaSaSo.Wpf.ViewModel.Controls" d:DataContext="{d:DesignInstance Type=controls:SewerRhebalationControllViewModel}"
|
||||||
|
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<converters:StringToDateTimeConverter x:Key="StringToDateTimeConverter" />
|
||||||
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@@ -22,22 +26,26 @@
|
|||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Label Margin="5" Grid.Column="0" Grid.Row="0" Content="Operator" />
|
<Label Margin="5" Grid.Column="0" Grid.Row="0" Content="Operator" />
|
||||||
<Label Margin="5" Grid.Column="0" Grid.Row="1" Content="Datum" />
|
<Label Margin="5" Grid.Column="0" Grid.Row="1" Content="Einbau - Datum" />
|
||||||
<Label Margin="5" Grid.Column="0" Grid.Row="2" Content="Temperatur Aussen" />
|
<Label Margin="5" Grid.Column="0" Grid.Row="2" Content="TV Inspektion durchgeführt am" />
|
||||||
<Label Margin="5" Grid.Column="0" Grid.Row="3" Content="Temperatur Kanal" />
|
<Label Margin="5" Grid.Column="0" Grid.Row="3" Content="Temperatur Aussen" />
|
||||||
<Label Margin="5" Grid.Column="0" Grid.Row="4" Content="Wetter" />
|
<Label Margin="5" Grid.Column="0" Grid.Row="4" Content="Temperatur Kanal" />
|
||||||
|
<Label Margin="5" Grid.Column="0" Grid.Row="5" Content="Wetter" />
|
||||||
|
|
||||||
<TextBox Grid.Column="1" Grid.Row="0" Margin="5" Text="{Binding Bediener}" />
|
<TextBox Grid.Column="1" Grid.Row="0" Margin="5" Text="{Binding Bediener}" />
|
||||||
<DatePicker Grid.Column="1" Grid.Row="1" Margin="5" SelectedDate="{Binding Datum}" />
|
<DatePicker Grid.Column="1" Grid.Row="1" Margin="5" SelectedDate="{Binding Datum}" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="2" Margin="5" Text="{Binding TemperaturAussen}" />
|
<TextBox Grid.Column="1" Grid.Row="2" Margin="5" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="3" Margin="5" Text="{Binding TemperaturSewer}" />
|
<!--Text="{Binding Path=Datum, Converter={StaticResource StringToDateTimeConverter}}"-->
|
||||||
<TextBox Grid.Column="1" Grid.Row="4" Margin="5" Text="{Binding Weather}" />
|
<TextBox Grid.Column="1" Grid.Row="3" Margin="5" Text="{Binding TemperaturAussen}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="4" Margin="5" Text="{Binding TemperaturSewer}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="5" Margin="5" Text="{Binding Weather}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
28
DaSaSo.Wpf/View/SewerObject/PhotodocumentationView.xaml
Normal file
28
DaSaSo.Wpf/View/SewerObject/PhotodocumentationView.xaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.PhotodocumentationView"
|
||||||
|
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:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPictureDocumentationViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="9*" />
|
||||||
|
<RowDefinition Height="1*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="60" />
|
||||||
|
<ColumnDefinition Width="300" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<TabControl ItemsSource="{Binding Tabs}" Name="tabImages" Grid.Column="1" Background="#00FFFFFF" TabStripPlacement="Bottom" MinHeight="150" AllowDrop="False" Focusable="False" TextOptions.TextFormattingMode="Display">
|
||||||
|
<TabControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Header}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</TabControl.ItemTemplate>
|
||||||
|
</TabControl>
|
||||||
|
<TextBlock Name="txtBemerkung" Grid.Column="1" Grid.Row="1" TextWrapping="Wrap" Background="#FFFFFFFF" Foreground="#FF000000" VerticalAlignment="Center" Text="Kommentar" />
|
||||||
|
<Button Name="btnAddPhoto" Content="Hinzufügen" Width="50" Grid.RowSpan="2" VerticalAlignment="Top" />
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
DaSaSo.Wpf/View/SewerObject/PhotodocumentationView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/SewerObject/PhotodocumentationView.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
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 DaSaSo.Wpf.View.SewerObject
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for PhotodocumentationView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class PhotodocumentationView : UserControl
|
||||||
|
{
|
||||||
|
public PhotodocumentationView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
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:selfControls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
|
xmlns:selfControls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
|
||||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerDamageEditViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerDamageEditViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:sd="clr-namespace:DaSaSo.Wpf.Sampledata"
|
xmlns:sd="clr-namespace:DaSaSo.Wpf.Sampledata"
|
||||||
xmlns:damagetype ="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
|
xmlns:damagetype ="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
|
||||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel"
|
||||||
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="1020">
|
d:DesignHeight="450" d:DesignWidth="1020">
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
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:viewModel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
xmlns:viewModel="clr-namespace:DaSaSo.Wpf.ViewModel"
|
||||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:Controls="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:Controls="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
xmlns:views ="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
xmlns:views ="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="900" d:DesignWidth="800">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<DataTemplate DataType="{x:Type viewmodel:SewerStammdatenViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:SewerStammdatenViewModel}">
|
||||||
<views:SewerStammdatenView />
|
<views:SewerStammdatenView />
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
<DataTemplate DataType="{x:Type viewmodel:SewerPipeLinerViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:SewerPipeLinerViewModel}">
|
||||||
<views:SewerPipeLinerView />
|
<views:SewerPipeLinerView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:SewerPictureDocumentationViewModel}">
|
||||||
|
<views:PhotodocumentationView />
|
||||||
|
</DataTemplate>
|
||||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
||||||
xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPipeLinerViewModel}"
|
xmlns:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerPipeLinerViewModel}"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" Height="722">
|
mc:Ignorable="d" d:DesignWidth="800" Height="722">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
|||||||
@@ -24,5 +24,10 @@ namespace DaSaSo.Wpf.View.SewerObject
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SewerRehabilation_Loaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
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:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerStammdatenViewModel}"
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.Wpf.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerStammdatenViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -31,16 +31,10 @@
|
|||||||
<TextBlock Text="] Hausnummer [" />
|
<TextBlock Text="] Hausnummer [" />
|
||||||
<TextBlock Text="{Binding Hausnummer}" Foreground="Red" />
|
<TextBlock Text="{Binding Hausnummer}" Foreground="Red" />
|
||||||
<TextBlock Text="] Haltung [" />
|
<TextBlock Text="] Haltung [" />
|
||||||
<!--<TextBlock Text="[" />-->
|
|
||||||
<TextBlock Foreground="Blue" Text="{Binding ObjektName}" />
|
<TextBlock Foreground="Blue" Text="{Binding ObjektName}" />
|
||||||
<TextBlock Text="] DN [" />
|
<TextBlock Text="] DN [" />
|
||||||
<TextBlock Text="{Binding DN}" Foreground="Blue" />
|
<TextBlock Text="{Binding DN}" Foreground="Blue" />
|
||||||
<TextBlock Text="]" />
|
<TextBlock Text="]" />
|
||||||
<!--
|
|
||||||
<TextBlock Text="] Material [" />
|
|
||||||
<TextBlock Text="{Binding Material}" Foreground="Blue" />
|
|
||||||
<TextBlock Text="]" />
|
|
||||||
-->
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<Style TargetType="{x:Type TreeViewItem}">
|
<Style TargetType="{x:Type TreeViewItem}">
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
namespace DaSaSo.ViewModel
|
|
||||||
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
{
|
{
|
||||||
public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel;
|
public delegate TViewModel CreateViewModel<TViewModel>() where TViewModel : BaseViewModel;
|
||||||
public class BaseViewModel : ObservableObject
|
public class BaseViewModel : ObservableObject
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.Domain.Services.BuildingsiteServices;
|
using DaSaSo.Domain.Services.BuildingsiteServices;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using Microsoft.Toolkit.Mvvm.Input;
|
using Microsoft.Toolkit.Mvvm.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -10,7 +10,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
{
|
{
|
||||||
public class BuildingsiteEditViewModel : BaseViewModel
|
public class BuildingsiteEditViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -69,12 +69,12 @@ namespace DaSaSo.ViewModel
|
|||||||
_renavigator = renavigator;
|
_renavigator = renavigator;
|
||||||
_model = actualProject.AktuellBaustelle;
|
_model = actualProject.AktuellBaustelle;
|
||||||
|
|
||||||
SaveBuildingsiteCommand = new RelayCommand(SaveBuildingsite);
|
SaveBuildingsiteCommand = new RelayCommand(SaveBuildingsiteAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveBuildingsite()
|
private async void SaveBuildingsiteAsync()
|
||||||
{
|
{
|
||||||
_buildingsiteService.Update(Model.Id, Model);
|
await _buildingsiteService.Update(Model.Id, Model);
|
||||||
_renavigator.Renavigate();
|
_renavigator.Renavigate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.Domain.Services.BuildingsiteServices;
|
using DaSaSo.Domain.Services.BuildingsiteServices;
|
||||||
using DaSaSo.EntityFramework.Services;
|
using DaSaSo.EntityFramework.Services;
|
||||||
using DaSaSo.ViewModel.Commands;
|
using DaSaSo.Wpf.ViewModel.Commands;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
@@ -12,7 +12,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
{
|
{
|
||||||
public class BuildingsiteListViewModel: BaseViewModel
|
public class BuildingsiteListViewModel: BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using Microsoft.Toolkit.Mvvm.Input;
|
using Microsoft.Toolkit.Mvvm.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -9,7 +9,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
{
|
{
|
||||||
public class ClientEditViewModel : BaseViewModel
|
public class ClientEditViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.ViewModel.Commands;
|
using DaSaSo.Wpf.ViewModel.Commands;
|
||||||
using DaSaSo.ViewModel.Enums;
|
using DaSaSo.Wpf.ViewModel.Enums;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using Microsoft.Toolkit.Mvvm.Input;
|
using Microsoft.Toolkit.Mvvm.Input;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@@ -13,7 +13,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
{
|
{
|
||||||
public class ClientListViewModel : BaseViewModel
|
public class ClientListViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -22,7 +22,6 @@ namespace DaSaSo.ViewModel
|
|||||||
private readonly IDataService<Client> _dataService;
|
private readonly IDataService<Client> _dataService;
|
||||||
bool _isLoading = true;
|
bool _isLoading = true;
|
||||||
|
|
||||||
public ICommand SelectCommand { get; set; }
|
|
||||||
public ICommand EditCommand { get; set; }
|
public ICommand EditCommand { get; set; }
|
||||||
public ICommand AddNewClientCommand { get; set; }
|
public ICommand AddNewClientCommand { get; set; }
|
||||||
|
|
||||||
@@ -63,7 +62,7 @@ namespace DaSaSo.ViewModel
|
|||||||
_dataService = dataService;
|
_dataService = dataService;
|
||||||
|
|
||||||
LoadClient();
|
LoadClient();
|
||||||
SelectCommand = new SelectClientCommand(dataService,actualProject, this);
|
|
||||||
EditCommand = new EditClientCommand(_dataService,actualProject, editRenavigator, this);
|
EditCommand = new EditClientCommand(_dataService,actualProject, editRenavigator, this);
|
||||||
AddNewClientCommand = new AddClientCommand(_dataService, actualProject, editRenavigator, this);
|
AddNewClientCommand = new AddClientCommand(_dataService, actualProject, editRenavigator, this);
|
||||||
|
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.Domain.Services.BuildingsiteServices;
|
using DaSaSo.Domain.Services.BuildingsiteServices;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class AddBuildingsiteCommand: AsyncCommandBase
|
public class AddBuildingsiteCommand: AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,13 +1,9 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class AddClientCommand : AsyncCommandBase
|
public class AddClientCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,13 +1,9 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using DaSaSo.ViewModel.Interface;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
class AddDamageCommand : AsyncCommandBase
|
class AddDamageCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
25
DaSaSo.Wpf/ViewModel/Commands/AddImpregnationCommand.cs
Normal file
25
DaSaSo.Wpf/ViewModel/Commands/AddImpregnationCommand.cs
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
|
{
|
||||||
|
internal class AddImpregnationCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private IDataService<Impregnation> impregnationService;
|
||||||
|
private IRenavigator editRenavigator;
|
||||||
|
|
||||||
|
public AddImpregnationCommand(IDataService<Impregnation> impregnationService, IRenavigator editRenavigator)
|
||||||
|
{
|
||||||
|
this.impregnationService = impregnationService;
|
||||||
|
this.editRenavigator = editRenavigator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.Domain.Services.ProjectServices;
|
using DaSaSo.Domain.Services.ProjectServices;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class AddProjectCommand : AsyncCommandBase
|
public class AddProjectCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -29,7 +25,7 @@ namespace DaSaSo.ViewModel.Commands
|
|||||||
|
|
||||||
public override async Task ExecuteAsync(object? parameter)
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
{
|
{
|
||||||
Project pro = await _projectService.CreateProject(_actualProject.AktuellClient);
|
Project pro = await _projectService.CreateProject();
|
||||||
_actualProject.SetProject(pro);
|
_actualProject.SetProject(pro);
|
||||||
_renavigator.Renavigate();
|
_renavigator.Renavigate();
|
||||||
|
|
||||||
@@ -1,13 +1,9 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services.SewerObjectService;
|
using DaSaSo.Domain.Services.SewerObjectService;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class AddSewerObjectCommand : AsyncCommandBase
|
public class AddSewerObjectCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public abstract class AsyncCommandBase : ICommand
|
public abstract class AsyncCommandBase : ICommand
|
||||||
{
|
{
|
||||||
@@ -1,15 +1,11 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.Domain.Services.BuildingsiteServices;
|
using DaSaSo.Domain.Services.BuildingsiteServices;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class EditBuildingsiteCommand : AsyncCommandBase
|
public class EditBuildingsiteCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,16 +1,10 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class EditClientCommand : AsyncCommandBase
|
public class EditClientCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
44
DaSaSo.Wpf/ViewModel/Commands/EditImpregnationCommand.cs
Normal file
44
DaSaSo.Wpf/ViewModel/Commands/EditImpregnationCommand.cs
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
|
{
|
||||||
|
internal class EditImpregnationCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private IDataService<Impregnation> _impregnationService;
|
||||||
|
private ImpregnierungListViewModel _impregnierungListViewModel;
|
||||||
|
private IRenavigator _editRenavigator;
|
||||||
|
private IActualProject _actualProject;
|
||||||
|
public override bool CanExecute(object? parameter)
|
||||||
|
{
|
||||||
|
return _impregnierungListViewModel.SelectedImpregnation != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EditImpregnationCommand(
|
||||||
|
IDataService<Impregnation> impregnationService,
|
||||||
|
ImpregnierungListViewModel impregnierungListViewModel,
|
||||||
|
IActualProject actualProject,
|
||||||
|
IRenavigator editRenavigator)
|
||||||
|
{
|
||||||
|
_impregnationService = impregnationService;
|
||||||
|
_impregnierungListViewModel = impregnierungListViewModel;
|
||||||
|
_actualProject = actualProject;
|
||||||
|
_editRenavigator = editRenavigator;
|
||||||
|
_impregnierungListViewModel.PropertyChanged += _impregnierungListViewModel_PropertyChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void _impregnierungListViewModel_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.PropertyName == nameof(_impregnierungListViewModel.CanSelectImpregnation))
|
||||||
|
OnCanExecuteChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
_actualProject.SetImpregnation(_impregnierungListViewModel.SelectedImpregnation);
|
||||||
|
_editRenavigator.Renavigate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,11 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.Domain.Services.ProjectServices;
|
using DaSaSo.Domain.Services.ProjectServices;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
class EditProjectCommand : AsyncCommandBase
|
class EditProjectCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
28
DaSaSo.Wpf/ViewModel/Commands/SaveImpregnationCommand.cs
Normal file
28
DaSaSo.Wpf/ViewModel/Commands/SaveImpregnationCommand.cs
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
|
{
|
||||||
|
internal class SaveImpregnationCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private IDataService<Impregnation> _impregnationService;
|
||||||
|
private ImpregnierungEditViewModel _impregnationEditViewModel;
|
||||||
|
|
||||||
|
public SaveImpregnationCommand(ImpregnierungEditViewModel impregnierungEditViewModel, IDataService<Impregnation> dataService)
|
||||||
|
{
|
||||||
|
_impregnationService = dataService;
|
||||||
|
_impregnationEditViewModel = impregnierungEditViewModel;
|
||||||
|
}
|
||||||
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
_impregnationEditViewModel.Model = await _impregnationService.Update(_impregnationEditViewModel.Model.Id, _impregnationEditViewModel.Model);
|
||||||
|
Trace.WriteLine("Daten gespeichert");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.Domain.Services.SewerObjectService;
|
using DaSaSo.Domain.Services.SewerObjectService;
|
||||||
using DaSaSo.Domain.Services.SewerPointServices;
|
using DaSaSo.Domain.Services.SewerPointServices;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
@@ -10,7 +10,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class SaveSewerCommand : AsyncCommandBase
|
public class SaveSewerCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
class SaveSewerStammdatenCommand : AsyncCommandBase
|
class SaveSewerStammdatenCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -16,6 +16,7 @@ namespace DaSaSo.ViewModel.Commands
|
|||||||
private IDataService<SewerObject> _dataService;
|
private IDataService<SewerObject> _dataService;
|
||||||
private readonly ISewerpointService _sewerPointService;
|
private readonly ISewerpointService _sewerPointService;
|
||||||
|
|
||||||
|
|
||||||
public SaveSewerStammdatenCommand(SewerStammdatenViewModel stammdatenViewModel, IDataService<SewerObject> dataService, ISewerpointService sewerpointService)
|
public SaveSewerStammdatenCommand(SewerStammdatenViewModel stammdatenViewModel, IDataService<SewerObject> dataService, ISewerpointService sewerpointService)
|
||||||
{
|
{
|
||||||
_stammdatenViewModel = stammdatenViewModel;
|
_stammdatenViewModel = stammdatenViewModel;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class SelectBuildingsiteCommand : AsyncCommandBase
|
public class SelectBuildingsiteCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -9,7 +9,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class SelectClientCommand : AsyncCommandBase
|
public class SelectClientCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
class SelectDamageCommand : AsyncCommandBase
|
class SelectDamageCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class SelectProjectCommand : AsyncCommandBase
|
public class SelectProjectCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
public class SelectSewerObjectCommand : AsyncCommandBase
|
public class SelectSewerObjectCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
using DaSaSo.Domain.Enums;
|
using DaSaSo.Domain.Enums;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
class UpdateCurrentSewerViewModelCommand : AsyncCommandBase
|
class UpdateCurrentSewerViewModelCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using DaSaSo.Domain.Enums;
|
using DaSaSo.Domain.Enums;
|
||||||
using DaSaSo.ViewModel.Enums;
|
using DaSaSo.Wpf.ViewModel.Enums;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Commands
|
namespace DaSaSo.Wpf.ViewModel.Commands
|
||||||
{
|
{
|
||||||
class UpdateCurrentViewModelCommand : AsyncCommandBase
|
class UpdateCurrentViewModelCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Controls
|
namespace DaSaSo.Wpf.ViewModel.Controls
|
||||||
{
|
{
|
||||||
public class SewerDamageControllViewModel : BaseViewModel
|
public class SewerDamageControllViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Controls
|
namespace DaSaSo.Wpf.ViewModel.Controls
|
||||||
{
|
{
|
||||||
public class SewerPreperationControllViewModel : BaseViewModel
|
public class SewerPreperationControllViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Controls
|
namespace DaSaSo.Wpf.ViewModel.Controls
|
||||||
{
|
{
|
||||||
public class SewerRhebalationControllViewModel : BaseViewModel
|
public class SewerRhebalationControllViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
@@ -58,17 +58,19 @@ namespace DaSaSo.ViewModel.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private DateTime _date;
|
|
||||||
public DateTime Datum
|
public DateTime Datum
|
||||||
{
|
{
|
||||||
get => _date;
|
get => model.Date;
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if(_date != value)
|
Trace.WriteLine(value);
|
||||||
|
if (model.Date != value)
|
||||||
{
|
{
|
||||||
_date = value;
|
model.Date = value;
|
||||||
model.Date = DateOnly.FromDateTime(_date);
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,7 +83,12 @@ namespace DaSaSo.ViewModel.Controls
|
|||||||
{
|
{
|
||||||
this.model = model;
|
this.model = model;
|
||||||
SewerPreperationControllViewModel = new SewerPreperationControllViewModel(model.PreparationType);
|
SewerPreperationControllViewModel = new SewerPreperationControllViewModel(model.PreparationType);
|
||||||
_date = model.Date.ToDateTime(new TimeOnly(0));
|
|
||||||
|
}
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
model.PreparationType = SewerPreperationControllViewModel.CalculatePreparationFlags();
|
||||||
|
base.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Enums
|
namespace DaSaSo.Wpf.ViewModel.Enums
|
||||||
{
|
{
|
||||||
|
|
||||||
enum EMediator
|
enum EMediator
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using DaSaSo.Domain.Enums;
|
using DaSaSo.Domain.Enums;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Factories
|
namespace DaSaSo.Wpf.ViewModel.Factories
|
||||||
{
|
{
|
||||||
public class MainWindowViewModelFactory : IViewModelAbstractFactory
|
public class MainWindowViewModelFactory : IViewModelAbstractFactory
|
||||||
{
|
{
|
||||||
@@ -13,6 +13,7 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
private CreateViewModel<BuildingsiteListViewModel> _createBuildingsiteListViewModel;
|
private CreateViewModel<BuildingsiteListViewModel> _createBuildingsiteListViewModel;
|
||||||
private CreateViewModel<SewerObjectListViewModel> _createSewerObjectListViewModel;
|
private CreateViewModel<SewerObjectListViewModel> _createSewerObjectListViewModel;
|
||||||
private CreateViewModel<SewerMainListViewModel> _createSewerMainMenuListViewModel;
|
private CreateViewModel<SewerMainListViewModel> _createSewerMainMenuListViewModel;
|
||||||
|
private CreateViewModel<ImpregnierungListViewModel> _createImpregnierungListViewModel;
|
||||||
|
|
||||||
public MainWindowViewModelFactory(
|
public MainWindowViewModelFactory(
|
||||||
CreateViewModel<HomeViewModel> createHomeViewModel,
|
CreateViewModel<HomeViewModel> createHomeViewModel,
|
||||||
@@ -21,7 +22,8 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
CreateViewModel<ProjectListViewModel> createProjektListViewModel,
|
CreateViewModel<ProjectListViewModel> createProjektListViewModel,
|
||||||
CreateViewModel<BuildingsiteListViewModel> createBuildingsiteListViewModel,
|
CreateViewModel<BuildingsiteListViewModel> createBuildingsiteListViewModel,
|
||||||
CreateViewModel<SewerObjectListViewModel> createSewerObjectListViewModel,
|
CreateViewModel<SewerObjectListViewModel> createSewerObjectListViewModel,
|
||||||
CreateViewModel<SewerMainListViewModel> createSewerMainMenuListViewModel
|
CreateViewModel<SewerMainListViewModel> createSewerMainMenuListViewModel,
|
||||||
|
CreateViewModel<ImpregnierungListViewModel> createImpregnierungListViewModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_createHomeViewModel = createHomeViewModel;
|
_createHomeViewModel = createHomeViewModel;
|
||||||
@@ -31,6 +33,8 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
_createBuildingsiteListViewModel = createBuildingsiteListViewModel;
|
_createBuildingsiteListViewModel = createBuildingsiteListViewModel;
|
||||||
_createSewerObjectListViewModel = createSewerObjectListViewModel;
|
_createSewerObjectListViewModel = createSewerObjectListViewModel;
|
||||||
_createSewerMainMenuListViewModel = createSewerMainMenuListViewModel;
|
_createSewerMainMenuListViewModel = createSewerMainMenuListViewModel;
|
||||||
|
_createImpregnierungListViewModel = createImpregnierungListViewModel;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
||||||
@@ -52,6 +56,9 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
return _createSewerObjectListViewModel();
|
return _createSewerObjectListViewModel();
|
||||||
case EMainWindowViewType.SewerMainMenu:
|
case EMainWindowViewType.SewerMainMenu:
|
||||||
return _createSewerMainMenuListViewModel();
|
return _createSewerMainMenuListViewModel();
|
||||||
|
case EMainWindowViewType.Impregnierung:
|
||||||
|
return _createImpregnierungListViewModel();
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException("The Viewtype does not have a ViewModel.", "viewType");
|
throw new ArgumentException("The Viewtype does not have a ViewModel.", "viewType");
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
using DaSaSo.Domain.Enums;
|
using DaSaSo.Domain.Enums;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Factories
|
namespace DaSaSo.Wpf.ViewModel.Factories
|
||||||
{
|
{
|
||||||
public class SewerWindowViewModelFactory : IViewModelSewerMainFactory
|
public class SewerWindowViewModelFactory : IViewModelSewerMainFactory
|
||||||
{
|
{
|
||||||
@@ -14,18 +14,21 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
private CreateViewModel<SewerDamageListViewModel> _createSewerDamageListViewModel;
|
private CreateViewModel<SewerDamageListViewModel> _createSewerDamageListViewModel;
|
||||||
private CreateViewModel<SewerDamageEditViewModel> _createSewerDamageEditViewModel;
|
private CreateViewModel<SewerDamageEditViewModel> _createSewerDamageEditViewModel;
|
||||||
private CreateViewModel<SewerPipeLinerViewModel> _createSewerPipeLinerViewModel;
|
private CreateViewModel<SewerPipeLinerViewModel> _createSewerPipeLinerViewModel;
|
||||||
|
private CreateViewModel<SewerPictureDocumentationViewModel> _createSewerPictureDocumentationViewModel;
|
||||||
|
|
||||||
public SewerWindowViewModelFactory(
|
public SewerWindowViewModelFactory(
|
||||||
CreateViewModel<SewerStammdatenViewModel> createSewerStammdatenViewModel,
|
CreateViewModel<SewerStammdatenViewModel> createSewerStammdatenViewModel,
|
||||||
CreateViewModel<SewerDamageListViewModel> createSewerDamageListViewModel,
|
CreateViewModel<SewerDamageListViewModel> createSewerDamageListViewModel,
|
||||||
CreateViewModel<SewerDamageEditViewModel> createSewerDamageEditViewModel,
|
CreateViewModel<SewerDamageEditViewModel> createSewerDamageEditViewModel,
|
||||||
CreateViewModel<SewerPipeLinerViewModel> createSewerPipeLinerViewModel
|
CreateViewModel<SewerPipeLinerViewModel> createSewerPipeLinerViewModel,
|
||||||
|
CreateViewModel<SewerPictureDocumentationViewModel> createSewerPictureDocumentationViewModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_createSewerStammdatenViewModel = createSewerStammdatenViewModel;
|
_createSewerStammdatenViewModel = createSewerStammdatenViewModel;
|
||||||
_createSewerDamageListViewModel = createSewerDamageListViewModel;
|
_createSewerDamageListViewModel = createSewerDamageListViewModel;
|
||||||
_createSewerDamageEditViewModel = createSewerDamageEditViewModel;
|
_createSewerDamageEditViewModel = createSewerDamageEditViewModel;
|
||||||
_createSewerPipeLinerViewModel = createSewerPipeLinerViewModel;
|
_createSewerPipeLinerViewModel = createSewerPipeLinerViewModel;
|
||||||
|
_createSewerPictureDocumentationViewModel = createSewerPictureDocumentationViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseViewModel CreateViewModel(ESewerWindowViewType viewType)
|
public BaseViewModel CreateViewModel(ESewerWindowViewType viewType)
|
||||||
@@ -36,6 +39,7 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
case ESewerWindowViewType.SewerDamageList: return _createSewerDamageListViewModel();
|
case ESewerWindowViewType.SewerDamageList: return _createSewerDamageListViewModel();
|
||||||
case ESewerWindowViewType.SewerDamageEdit: return _createSewerDamageEditViewModel();
|
case ESewerWindowViewType.SewerDamageEdit: return _createSewerDamageEditViewModel();
|
||||||
case ESewerWindowViewType.SewerPipeLiner: return _createSewerPipeLinerViewModel();
|
case ESewerWindowViewType.SewerPipeLiner: return _createSewerPipeLinerViewModel();
|
||||||
|
case ESewerWindowViewType.SewerPictureDocumentation: return _createSewerPictureDocumentationViewModel();
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException("The Viewtype does not have a ViewModel", "viewType");
|
throw new ArgumentException("The Viewtype does not have a ViewModel", "viewType");
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
{
|
{
|
||||||
public class HomeViewModel : BaseViewModel
|
public class HomeViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
79
DaSaSo.Wpf/ViewModel/ImpregnierungEditViewModel.cs
Normal file
79
DaSaSo.Wpf/ViewModel/ImpregnierungEditViewModel.cs
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.Wpf.ViewModel.Commands;
|
||||||
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
|
{
|
||||||
|
public class ImpregnierungEditViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
private Impregnation _model;
|
||||||
|
public ICommand SaveImpregnation { get; set; }
|
||||||
|
public Impregnation Model { get => _model; set => _model = value; }
|
||||||
|
|
||||||
|
public int DN
|
||||||
|
{
|
||||||
|
get => _model.DN;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_model.DN = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string LinerCharge
|
||||||
|
{
|
||||||
|
get => _model.LinerNumber;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_model.LinerNumber = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public decimal Wandstärke
|
||||||
|
{
|
||||||
|
get => _model.WallThickness;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_model.WallThickness = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public decimal LinerLänge
|
||||||
|
{
|
||||||
|
get => _model.Linerlength;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_model.Linerlength = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Imprägniernummer
|
||||||
|
{
|
||||||
|
get => _model.Number;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_model.Number = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime Imprägnierdatum
|
||||||
|
{
|
||||||
|
get => _model.Date;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_model.Date = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ImpregnierungEditViewModel(IActualProject actualProject, IDataService<Impregnation> dataservice)
|
||||||
|
{
|
||||||
|
_model = actualProject.AktuellImpregnation;
|
||||||
|
//Imprägnierdatum = DateTime.Now;
|
||||||
|
SaveImpregnation = new SaveImpregnationCommand(this,dataservice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
87
DaSaSo.Wpf/ViewModel/ImpregnierungListViewModel.cs
Normal file
87
DaSaSo.Wpf/ViewModel/ImpregnierungListViewModel.cs
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.Wpf.ViewModel.Commands;
|
||||||
|
using DaSaSo.Wpf.ViewModel.Interface;
|
||||||
|
using Microsoft.Toolkit.Mvvm.Input;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.ViewModel
|
||||||
|
{
|
||||||
|
public class ImpregnierungListViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
public ObservableCollection<Impregnation> Impregnations { get; }
|
||||||
|
private readonly IDataService<Impregnation> _impregnationService;
|
||||||
|
private Impregnation? _selectedImpregnation = null;
|
||||||
|
public Impregnation? SelectedImpregnation
|
||||||
|
{
|
||||||
|
get => _selectedImpregnation;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_selectedImpregnation != value)
|
||||||
|
{
|
||||||
|
_selectedImpregnation = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
OnPropertyChanged(nameof(CanSelectImpregnation));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public bool CanSelectImpregnation => SelectedImpregnation != null;
|
||||||
|
public ICommand EditImpregnationCommand { get; set; }
|
||||||
|
public ICommand AddImpregnationCommand { get; set; }
|
||||||
|
bool _isLoading;
|
||||||
|
|
||||||
|
public bool IsLoading {
|
||||||
|
get => _isLoading;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(_isLoading != value)
|
||||||
|
{
|
||||||
|
_isLoading = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImpregnierungListViewModel(IDataService<Impregnation> impregnationService,IActualProject actualProject, IRenavigator editRenavigator)
|
||||||
|
{
|
||||||
|
IsLoading = true;
|
||||||
|
Impregnations = new ObservableCollection<Impregnation>();
|
||||||
|
_impregnationService = impregnationService;
|
||||||
|
AddImpregnationCommand = new RelayCommand(() =>
|
||||||
|
{
|
||||||
|
Impregnation newImpregnation = new Impregnation()
|
||||||
|
{
|
||||||
|
Number = "Neu bitte Editieren!"
|
||||||
|
};
|
||||||
|
SelectedImpregnation = newImpregnation;
|
||||||
|
Impregnations.Add(newImpregnation);
|
||||||
|
OnPropertyChanged("Impregnations");
|
||||||
|
});
|
||||||
|
|
||||||
|
//AddImpregnationCommand = //new AddImpregnationCommand(_impregnationService, editRenavigator);
|
||||||
|
EditImpregnationCommand = new EditImpregnationCommand(_impregnationService, this,actualProject, editRenavigator);
|
||||||
|
LoadImpregnations();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void LoadImpregnations()
|
||||||
|
{
|
||||||
|
var impregList = await _impregnationService.GetAll();
|
||||||
|
InitCollection(Impregnations, impregList);
|
||||||
|
IsLoading = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitCollection(ObservableCollection<Impregnation> target, IEnumerable<Impregnation> source)
|
||||||
|
{
|
||||||
|
target.Clear();
|
||||||
|
foreach (var i in source)
|
||||||
|
target.Add(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.Wpf.ViewModel.Interface
|
||||||
{
|
{
|
||||||
public interface IActualProject
|
public interface IActualProject
|
||||||
{
|
{
|
||||||
@@ -19,12 +19,14 @@ namespace DaSaSo.ViewModel.Interface
|
|||||||
Buildingsite AktuellBaustelle { get; }
|
Buildingsite AktuellBaustelle { get; }
|
||||||
SewerObject AktuellSewerObject { get; }
|
SewerObject AktuellSewerObject { get; }
|
||||||
SewerDamage AktuellSewerDamage { get; }
|
SewerDamage AktuellSewerDamage { get; }
|
||||||
|
Impregnation AktuellImpregnation { get; }
|
||||||
|
|
||||||
void SetClient(Client client, bool notification = true);
|
void SetClient(Client client, bool notification = true);
|
||||||
void SetProject(Project project, bool notification = true);
|
void SetProject(Project project, bool notification = true);
|
||||||
void SetBuildingSite(Buildingsite buildingsite);
|
void SetBuildingSite(Buildingsite buildingsite);
|
||||||
void SetSewerObject(SewerObject sewerObject, bool notification = true);
|
void SetSewerObject(SewerObject sewerObject, bool notification = true);
|
||||||
void SetSewerDamage(SewerDamage sewerDamage, bool notification = true);
|
void SetSewerDamage(SewerDamage sewerDamage, bool notification = true);
|
||||||
|
void SetImpregnation(Impregnation impregnation, bool notification = true);
|
||||||
void ResetProject();
|
void ResetProject();
|
||||||
void ResetBuildingSite();
|
void ResetBuildingSite();
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.Wpf.ViewModel.Interface
|
||||||
{
|
{
|
||||||
public interface IMainWindowNavigator : INavigator
|
public interface IMainWindowNavigator : INavigator
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.Wpf.ViewModel.Interface
|
||||||
{
|
{
|
||||||
public interface INavigator
|
public interface INavigator
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.Wpf.ViewModel.Interface
|
||||||
{
|
{
|
||||||
public interface IRenavigator
|
public interface IRenavigator
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.Wpf.ViewModel.Interface
|
||||||
{
|
{
|
||||||
public interface ISewerMainNavigator : INavigator
|
public interface ISewerMainNavigator : INavigator
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
using DaSaSo.Domain.Enums;
|
using DaSaSo.Domain.Enums;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.Wpf.ViewModel.Interface
|
||||||
{
|
{
|
||||||
public interface IViewModelAbstractFactory
|
public interface IViewModelAbstractFactory
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel.Interface
|
namespace DaSaSo.Wpf.ViewModel.Interface
|
||||||
{
|
{
|
||||||
public interface IViewModelFactory<T> where T: BaseViewModel
|
public interface IViewModelFactory<T> where T: BaseViewModel
|
||||||
{
|
{
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user