Compare commits
6 Commits
renavigato
...
sewerdamag
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3388891134 | ||
|
|
cae9f38227 | ||
|
|
b48c012c18 | ||
|
|
98494be3cf | ||
|
|
9da7090883 | ||
|
|
4789b5f252 |
4
.editorconfig
Normal file
4
.editorconfig
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
[*.cs]
|
||||||
|
|
||||||
|
# CA1416: Validate platform compatibility
|
||||||
|
dotnet_diagnostic.CA1416.severity = none
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
// See https://aka.ms/new-console-template for more information
|
// See https://aka.ms/new-console-template for more information
|
||||||
|
|
||||||
|
using DaSaSo.ConsoleApp;
|
||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
using DaSaSo.EntityFramework;
|
using DaSaSo.EntityFramework;
|
||||||
using DaSaSo.EntityFramework.Services;
|
using DaSaSo.EntityFramework.Services;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
IDataService<Client> clientService = new GenericDataService<Client>(new DaSaSoDbContextFactory(""));
|
|
||||||
clientService.Create(new Client()
|
testclass test = new testclass();
|
||||||
{
|
test.data = efields.CATRA | efields.PRO;
|
||||||
Firstname = "Cynthia",
|
|
||||||
LastName = "Schreuder",
|
var s = test.data.HasFlag(efields.CATRA);
|
||||||
Country = "Tarmstedt",
|
|
||||||
Postcode = "25445",
|
Debugger.Break();
|
||||||
});
|
|
||||||
|
|||||||
38
DaSaSo.ConsoleApp/testclass.cs
Normal file
38
DaSaSo.ConsoleApp/testclass.cs
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.ConsoleApp
|
||||||
|
{
|
||||||
|
class testclass
|
||||||
|
{
|
||||||
|
public efields data;
|
||||||
|
}
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
enum efields : int
|
||||||
|
{
|
||||||
|
PRO = 1,
|
||||||
|
CONTRA = 2,
|
||||||
|
DESPRED = 4,
|
||||||
|
CATRA = 8
|
||||||
|
};
|
||||||
|
|
||||||
|
static class EnumerationExtensions
|
||||||
|
{
|
||||||
|
public static bool Has<T>(this System.Enum type, T value)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return (((int)(object)type & (int)(object)value) == (int)(object)value);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -5,4 +5,8 @@
|
|||||||
<Nullable>disable</Nullable>
|
<Nullable>disable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\.editorconfig" Link=".editorconfig" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace DaSaSo.Domain.DesignModel
|
|||||||
{
|
{
|
||||||
public string Streetname { get; set; }
|
public string Streetname { get; set; }
|
||||||
public string CountryName { get; set; }
|
public string CountryName { get; set; }
|
||||||
|
public bool IsSelected { get; set; }
|
||||||
public IEnumerable<SewerObject> SewerObjects { get; set; }
|
public IEnumerable<SewerObject> SewerObjects { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
public enum ESewerWindowViewType
|
public enum ESewerWindowViewType
|
||||||
{
|
{
|
||||||
SewerStammdaten,
|
SewerStammdaten,
|
||||||
SewerDamageList
|
SewerDamageList,
|
||||||
|
SewerDamageEdit,
|
||||||
|
SewerPipeLiner
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
namespace DaSaSo.Domain.Model
|
using System;
|
||||||
|
|
||||||
|
namespace DaSaSo.Domain.Model
|
||||||
{
|
{
|
||||||
|
[Flags]
|
||||||
public enum EDamageType
|
public enum EDamageType
|
||||||
{
|
{
|
||||||
|
NONE = 0,
|
||||||
Riss = 1,
|
Riss = 1,
|
||||||
Bruch = 2,
|
Bruch = 2,
|
||||||
Scherbe = 4,
|
Scherbe = 4,
|
||||||
@@ -9,20 +13,28 @@
|
|||||||
Inkrustation = 16,
|
Inkrustation = 16,
|
||||||
Ablagerung = 32,
|
Ablagerung = 32,
|
||||||
EinrageneStutzen = 64,
|
EinrageneStutzen = 64,
|
||||||
Infiltration = 128
|
Infiltration = 128,
|
||||||
|
Static = Riss | Bruch | Scherbe,
|
||||||
|
Betrieb = Wurzel | Inkrustation | Ablagerung,
|
||||||
|
Other = EinrageneStutzen | Infiltration
|
||||||
}
|
}
|
||||||
|
[Flags]
|
||||||
public enum EPreparationType
|
public enum EPreparationType
|
||||||
{
|
{
|
||||||
|
NONE = 0,
|
||||||
CleanedHD = 1,
|
CleanedHD = 1,
|
||||||
CleanedMechanisch = 2,
|
CleanedMechanisch = 2,
|
||||||
CleanedRoborter = 4,
|
CleanedRoboter = 4,
|
||||||
FaekalienFrei = 8
|
FaekalienFrei = 8,
|
||||||
|
WaterBaried = 16,
|
||||||
|
PermitNeeded = 32,
|
||||||
|
STVO = 64
|
||||||
}
|
}
|
||||||
public class SewerDamage : DomainObject
|
public class SewerDamage : DomainObject
|
||||||
{
|
{
|
||||||
public SewerObject SewerObject { get; set; }
|
public SewerObject SewerObject { get; set; }
|
||||||
public decimal Distance { get; set; }
|
public decimal Distance { get; set; }
|
||||||
public EDamageType DamageType { get; set; }
|
public EDamageType DamageType { get; set; }
|
||||||
public EPreparationType PreparationType { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,9 @@ namespace DaSaSo.Domain.Model
|
|||||||
public class SewerObject : DomainObject
|
public class SewerObject : DomainObject
|
||||||
{
|
{
|
||||||
public Buildingsite BuildingSite { get; set; }
|
public Buildingsite BuildingSite { get; set; }
|
||||||
|
public string SanNummer { get; set; }
|
||||||
public string StreetName { get; set; }
|
public string StreetName { get; set; }
|
||||||
|
public string Hausnummer { get; set; }
|
||||||
public string ObjektName { get; set; }
|
public string ObjektName { get; set; }
|
||||||
public SewerPoint PunktOben { get; set; }
|
public SewerPoint PunktOben { get; set; }
|
||||||
public EPointType PunktObenType { get; set; }
|
public EPointType PunktObenType { get; set; }
|
||||||
@@ -28,6 +30,8 @@ namespace DaSaSo.Domain.Model
|
|||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool IsSelected { get; set; }
|
public bool IsSelected { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public bool IsChanged { get; set; } = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,12 +13,6 @@ namespace DaSaSo.Domain.Model
|
|||||||
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; }
|
||||||
public bool CleanedHD { get; set; }
|
public EPreparationType PreparationType { get; set; }
|
||||||
public bool CleanedMechanisch { get; set; }
|
|
||||||
public bool CleanedRoborter { get; set; }
|
|
||||||
public bool WaterBaried { get; set; }
|
|
||||||
public bool PermitNeeded { get; set; }
|
|
||||||
public bool STVO { get; set; }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace DaSaSo.EntityFramework
|
|||||||
|
|
||||||
public DaSaSoDbContext CreateDbContext()
|
public DaSaSoDbContext CreateDbContext()
|
||||||
{
|
{
|
||||||
DbContextOptionsBuilder<DaSaSoDbContext>? options = new DbContextOptionsBuilder<DaSaSoDbContext>();
|
DbContextOptionsBuilder<DaSaSoDbContext>? options = new();
|
||||||
_configureDbContext(options);
|
_configureDbContext(options);
|
||||||
//_connectionString = "Host = localhost; Database = dasaso; Username = kansan; Password = kansan";
|
//_connectionString = "Host = localhost; Database = dasaso; Username = kansan; Password = kansan";
|
||||||
//options.UseNpgsql(_connectionString);
|
//options.UseNpgsql(_connectionString);
|
||||||
@@ -34,7 +34,7 @@ namespace DaSaSo.EntityFramework
|
|||||||
{
|
{
|
||||||
var options = new DbContextOptionsBuilder<DaSaSoDbContext>();
|
var options = new DbContextOptionsBuilder<DaSaSoDbContext>();
|
||||||
options.UseNpgsql("Host = localhost; Database = dasaso; Username = kansan; Password = kansan");
|
options.UseNpgsql("Host = localhost; Database = dasaso; Username = kansan; Password = kansan");
|
||||||
DaSaSoDbContext result = new DaSaSoDbContext(options.Options);
|
DaSaSoDbContext result = new(options.Options);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
|||||||
397
DaSaSo.EntityFramework/Migrations/20211005060234_DeletedPrepartionFromDamage.Designer.cs
generated
Normal file
397
DaSaSo.EntityFramework/Migrations/20211005060234_DeletedPrepartionFromDamage.Designer.cs
generated
Normal file
@@ -0,0 +1,397 @@
|
|||||||
|
// <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("20211005060234_DeletedPrepartionFromDamage")]
|
||||||
|
partial class DeletedPrepartionFromDamage
|
||||||
|
{
|
||||||
|
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<string>("ContactPerson")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Country")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("ProjectId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
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<DateTime>("Date")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
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<DateTime>("Date")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
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>("PermitNeeded")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("Preliner")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<int>("PreparationType")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<bool>("STVO")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
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<bool>("WaterBaried")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
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<int?>("ClientId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Projektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
|
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>("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<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.Project", "Project")
|
||||||
|
.WithMany("BuildingSites")
|
||||||
|
.HasForeignKey("ProjectId");
|
||||||
|
|
||||||
|
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.Project", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||||
|
.WithMany("Projects")
|
||||||
|
.HasForeignKey("ClientId");
|
||||||
|
|
||||||
|
b.Navigation("Client");
|
||||||
|
});
|
||||||
|
|
||||||
|
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.Client", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Projects");
|
||||||
|
});
|
||||||
|
|
||||||
|
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,70 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Migrations
|
||||||
|
{
|
||||||
|
public partial class DeletedPrepartionFromDamage : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PreparationType",
|
||||||
|
table: "SewerDamages");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CleanedHD",
|
||||||
|
table: "PipeLiners");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CleanedMechanisch",
|
||||||
|
table: "PipeLiners");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "CleanedRoborter",
|
||||||
|
table: "PipeLiners");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "PreparationType",
|
||||||
|
table: "PipeLiners",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PreparationType",
|
||||||
|
table: "PipeLiners");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "PreparationType",
|
||||||
|
table: "SewerDamages",
|
||||||
|
type: "integer",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: 0);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "CleanedHD",
|
||||||
|
table: "PipeLiners",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "CleanedMechanisch",
|
||||||
|
table: "PipeLiners",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "CleanedRoborter",
|
||||||
|
table: "PipeLiners",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
394
DaSaSo.EntityFramework/Migrations/20211005082652_AddHousenumbers.Designer.cs
generated
Normal file
394
DaSaSo.EntityFramework/Migrations/20211005082652_AddHousenumbers.Designer.cs
generated
Normal file
@@ -0,0 +1,394 @@
|
|||||||
|
// <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("20211005082652_AddHousenumbers")]
|
||||||
|
partial class AddHousenumbers
|
||||||
|
{
|
||||||
|
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<string>("ContactPerson")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Country")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int?>("ProjectId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
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<DateTime>("Date")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
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<DateTime>("Date")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
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<int?>("ClientId")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Projektnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
|
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.Project", "Project")
|
||||||
|
.WithMany("BuildingSites")
|
||||||
|
.HasForeignKey("ProjectId");
|
||||||
|
|
||||||
|
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.Project", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("DaSaSo.Domain.Model.Client", "Client")
|
||||||
|
.WithMany("Projects")
|
||||||
|
.HasForeignKey("ClientId");
|
||||||
|
|
||||||
|
b.Navigation("Client");
|
||||||
|
});
|
||||||
|
|
||||||
|
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.Client", b =>
|
||||||
|
{
|
||||||
|
b.Navigation("Projects");
|
||||||
|
});
|
||||||
|
|
||||||
|
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,68 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace DaSaSo.EntityFramework.Migrations
|
||||||
|
{
|
||||||
|
public partial class AddHousenumbers : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PermitNeeded",
|
||||||
|
table: "PipeLiners");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "STVO",
|
||||||
|
table: "PipeLiners");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "WaterBaried",
|
||||||
|
table: "PipeLiners");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Hausnummer",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "SanNummer",
|
||||||
|
table: "SewerObjects",
|
||||||
|
type: "text",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Hausnummer",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "SanNummer",
|
||||||
|
table: "SewerObjects");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "PermitNeeded",
|
||||||
|
table: "PipeLiners",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "STVO",
|
||||||
|
table: "PipeLiners",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "WaterBaried",
|
||||||
|
table: "PipeLiners",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -119,15 +119,6 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
|
|
||||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
b.Property<bool>("CleanedHD")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<bool>("CleanedMechanisch")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<bool>("CleanedRoborter")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<bool>("ClosedEnd")
|
b.Property<bool>("ClosedEnd")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
@@ -146,14 +137,11 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<string>("Operator")
|
b.Property<string>("Operator")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<bool>("PermitNeeded")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<bool>("Preliner")
|
b.Property<bool>("Preliner")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
b.Property<bool>("STVO")
|
b.Property<int>("PreparationType")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<decimal>("TemperaturAssembly")
|
b.Property<decimal>("TemperaturAssembly")
|
||||||
.HasColumnType("numeric");
|
.HasColumnType("numeric");
|
||||||
@@ -167,9 +155,6 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<decimal>("TemperatureSewer")
|
b.Property<decimal>("TemperatureSewer")
|
||||||
.HasColumnType("numeric");
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
b.Property<bool>("WaterBaried")
|
|
||||||
.HasColumnType("boolean");
|
|
||||||
|
|
||||||
b.Property<string>("Weather")
|
b.Property<string>("Weather")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
@@ -218,9 +203,6 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<decimal>("Distance")
|
b.Property<decimal>("Distance")
|
||||||
.HasColumnType("numeric");
|
.HasColumnType("numeric");
|
||||||
|
|
||||||
b.Property<int>("PreparationType")
|
|
||||||
.HasColumnType("integer");
|
|
||||||
|
|
||||||
b.Property<int?>("SewerObjectId")
|
b.Property<int?>("SewerObjectId")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
@@ -248,6 +230,9 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<int>("DN")
|
b.Property<int>("DN")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("Hausnummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("Material")
|
b.Property<string>("Material")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
@@ -272,6 +257,9 @@ namespace DaSaSo.EntityFramework.Migrations
|
|||||||
b.Property<int>("PunktUntenType")
|
b.Property<int>("PunktUntenType")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("SanNummer")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<bool>("SewerActivated")
|
b.Property<bool>("SewerActivated")
|
||||||
.HasColumnType("boolean");
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
|||||||
@@ -37,12 +37,10 @@ namespace DaSaSo.EntityFramework.Services
|
|||||||
|
|
||||||
public async Task<Buildingsite> Get(int id)
|
public async Task<Buildingsite> Get(int id)
|
||||||
{
|
{
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
{
|
Buildingsite entity = await context.Buildingsites.FirstOrDefaultAsync((e) => e.Id == id);
|
||||||
Buildingsite entity = await context.Buildingsites.FirstOrDefaultAsync((e) => e.Id == id);
|
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<IEnumerable<Buildingsite>> GetAll()
|
public Task<IEnumerable<Buildingsite>> GetAll()
|
||||||
@@ -54,11 +52,9 @@ namespace DaSaSo.EntityFramework.Services
|
|||||||
{
|
{
|
||||||
// Get Clientid
|
// Get Clientid
|
||||||
int id = project.Id;
|
int id = project.Id;
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
{
|
IEnumerable<Buildingsite> entities = await context.Buildingsites.Where(x => x.Project.Id == id).ToListAsync();
|
||||||
IEnumerable<Buildingsite> entities = await context.Buildingsites.Where(x => x.Project.Id == id).ToListAsync();
|
return entities;
|
||||||
return entities;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Buildingsite> Update(int id, Buildingsite entity)
|
public async Task<Buildingsite> Update(int id, Buildingsite entity)
|
||||||
|
|||||||
@@ -39,22 +39,18 @@ 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.Include(a => a.Projects).FirstOrDefaultAsync((e) => e.Id == id);
|
|
||||||
|
|
||||||
return entity;
|
return entity;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<Client>> GetAll()
|
public async Task<IEnumerable<Client>> GetAll()
|
||||||
{
|
{
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
{
|
IEnumerable<Client> entities = await context.Clients.ToListAsync();
|
||||||
IEnumerable<Client> entities = await context.Clients.ToListAsync();
|
|
||||||
|
|
||||||
return entities;
|
return entities;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Client> Update(int id, Client entity)
|
public async Task<Client> Update(int id, Client entity)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
|
|||||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -19,43 +20,35 @@ namespace DaSaSo.EntityFramework.Services.Common
|
|||||||
}
|
}
|
||||||
public async Task<T> Create(T entity)
|
public async Task<T> Create(T entity)
|
||||||
{
|
{
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
{
|
EntityEntry<T> createdEntity = await context.Set<T>().AddAsync(entity);
|
||||||
EntityEntry<T> createdEntity = await context.Set<T>().AddAsync(entity);
|
await context.SaveChangesAsync();
|
||||||
await context.SaveChangesAsync();
|
return createdEntity.Entity;
|
||||||
return createdEntity.Entity;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public T CreateNonAsync(T entity)
|
public T CreateNonAsync(T entity)
|
||||||
{
|
{
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
{
|
EntityEntry<T> createdEntity = context.Set<T>().Add(entity);
|
||||||
EntityEntry<T> createdEntity = context.Set<T>().Add(entity);
|
context.SaveChanges();
|
||||||
context.SaveChanges();
|
return createdEntity.Entity;
|
||||||
return createdEntity.Entity;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<bool> Delete(int id)
|
public async Task<bool> Delete(int id)
|
||||||
{
|
{
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
{
|
T entity = await context.Set<T>().FirstOrDefaultAsync((e) => e.Id == id);
|
||||||
T entity = await context.Set<T>().FirstOrDefaultAsync((e) => e.Id == id);
|
context.Set<T>().Remove(entity);
|
||||||
context.Set<T>().Remove(entity);
|
await context.SaveChangesAsync();
|
||||||
await context.SaveChangesAsync();
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public async Task<T> Update(int id, T entity)
|
public async Task<T> Update(int id, T entity)
|
||||||
{
|
{
|
||||||
using (DaSaSoDbContext context = _contextFactory.CreateDbContext())
|
using DaSaSoDbContext context = _contextFactory.CreateDbContext();
|
||||||
{
|
entity.Id = id;
|
||||||
entity.Id = id;
|
context.Set<T>().Update(entity);
|
||||||
context.Set<T>().Update(entity);
|
await context.SaveChangesAsync();
|
||||||
await context.SaveChangesAsync();
|
return entity;
|
||||||
return entity;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace DaSaSo.ViewModel
|
|||||||
{
|
{
|
||||||
_actualProject = actualProject;
|
_actualProject = actualProject;
|
||||||
_renavigator = renavigator;
|
_renavigator = renavigator;
|
||||||
_buildingSiteDataService = buildingSiteDataService as BuildingsiteDataService;
|
_buildingSiteDataService = (BuildingsiteDataService)buildingSiteDataService;
|
||||||
Buildingsites = new ObservableCollection<Buildingsite>();
|
Buildingsites = new ObservableCollection<Buildingsite>();
|
||||||
EditCommand = new EditBuildingsiteCommand(buildingSiteDataService,actualProject,renavigator,buildingsiteService,this);
|
EditCommand = new EditBuildingsiteCommand(buildingSiteDataService,actualProject,renavigator,buildingsiteService,this);
|
||||||
SelectCommand = new SelectBuildingsiteCommand(actualProject, this);
|
SelectCommand = new SelectBuildingsiteCommand(actualProject, this);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ namespace DaSaSo.ViewModel
|
|||||||
public class ClientEditViewModel : BaseViewModel
|
public class ClientEditViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
private Client _model;
|
private Client _model;
|
||||||
private IDataService<Client> _dataService;
|
private readonly IDataService<Client> _dataService;
|
||||||
private readonly IActualProject _actualProject;
|
private readonly IActualProject _actualProject;
|
||||||
private readonly IRenavigator renavigator;
|
private readonly IRenavigator renavigator;
|
||||||
|
|
||||||
@@ -32,9 +32,9 @@ namespace DaSaSo.ViewModel
|
|||||||
this._model = _actualProject.AktuellClient;
|
this._model = _actualProject.AktuellClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveClient()
|
private async void SaveClient()
|
||||||
{
|
{
|
||||||
_dataService.Update(Model.Id, Model);
|
await _dataService.Update(Model.Id, Model);
|
||||||
renavigator.Renavigate();
|
renavigator.Renavigate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,7 @@ namespace DaSaSo.ViewModel
|
|||||||
{
|
{
|
||||||
public ObservableCollection<Client> Clients { get; }
|
public ObservableCollection<Client> Clients { get; }
|
||||||
private Client? _selectedClient;
|
private Client? _selectedClient;
|
||||||
private IDataService<Client> _dataService;
|
private readonly IDataService<Client> _dataService;
|
||||||
private readonly IRenavigator renavigator;
|
|
||||||
IEnumerable<Client>? result;
|
|
||||||
bool _isLoading = true;
|
bool _isLoading = true;
|
||||||
|
|
||||||
public ICommand SelectCommand { get; set; }
|
public ICommand SelectCommand { get; set; }
|
||||||
@@ -63,19 +61,14 @@ namespace DaSaSo.ViewModel
|
|||||||
{
|
{
|
||||||
Clients = new ObservableCollection<Client>();
|
Clients = new ObservableCollection<Client>();
|
||||||
_dataService = dataService;
|
_dataService = dataService;
|
||||||
this.renavigator = renavigator;
|
|
||||||
LoadClient();
|
LoadClient();
|
||||||
SelectCommand = new SelectClientCommand(actualProject, this); //= new RelayCommand(SelectClient, () => SelectedClient != null);
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~ClientListViewModel()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public async void LoadClient()
|
public async void LoadClient()
|
||||||
{
|
{
|
||||||
IsLoading = true;
|
IsLoading = true;
|
||||||
@@ -86,7 +79,7 @@ namespace DaSaSo.ViewModel
|
|||||||
IsLoading = false;
|
IsLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitCollection(ObservableCollection<Client> target, IEnumerable<Client> source)
|
private static void InitCollection(ObservableCollection<Client> target, IEnumerable<Client> source)
|
||||||
{
|
{
|
||||||
target.Clear();
|
target.Clear();
|
||||||
foreach (var i in source)
|
foreach (var i in source)
|
||||||
|
|||||||
36
DaSaSo.ViewModel/Commands/AddDamageCommand.cs
Normal file
36
DaSaSo.ViewModel/Commands/AddDamageCommand.cs
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.ViewModel.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.ViewModel.Commands
|
||||||
|
{
|
||||||
|
class AddDamageCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly IActualProject actualProject;
|
||||||
|
private readonly IRenavigator addedNavigator;
|
||||||
|
|
||||||
|
public AddDamageCommand(IActualProject actualProject, IRenavigator addedNavigator)
|
||||||
|
{
|
||||||
|
this.actualProject = actualProject;
|
||||||
|
this.addedNavigator = addedNavigator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
SewerDamage newSewerDamage = new SewerDamage();
|
||||||
|
//newSewerDamage.SewerObject = actualProject.AktuellSewerObject; // Führt zur Exception, dass EF versucht doppelte einträge vorzunehmen
|
||||||
|
|
||||||
|
actualProject.AktuellSewerObject.SewerDamages.Add(newSewerDamage);
|
||||||
|
actualProject.SetSewerDamage(actualProject.AktuellSewerObject.SewerDamages.Last());
|
||||||
|
|
||||||
|
|
||||||
|
//addedNavigator.Renavigate(); // Bug führt zur generellen umnavigation...
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -36,11 +36,14 @@ namespace DaSaSo.ViewModel.Commands
|
|||||||
_sewerObjectService = sewerObjectService;
|
_sewerObjectService = sewerObjectService;
|
||||||
_renavigator = renavigator;
|
_renavigator = renavigator;
|
||||||
_navigator = navigator;
|
_navigator = navigator;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override async Task ExecuteAsync(object? parameter)
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
{
|
{
|
||||||
|
Trace.WriteLine(_actualProject.AktuellSewerObject.IsChanged);
|
||||||
_navigator.CurrentViewModel = null;
|
_navigator.CurrentViewModel = null;
|
||||||
_renavigator.Renavigate();
|
_renavigator.Renavigate();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.ViewModel.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -14,19 +16,24 @@ namespace DaSaSo.ViewModel.Commands
|
|||||||
|
|
||||||
private readonly IActualProject _actualProject;
|
private readonly IActualProject _actualProject;
|
||||||
private readonly ClientListViewModel _clientListViewModel;
|
private readonly ClientListViewModel _clientListViewModel;
|
||||||
|
private readonly IDataService<Client> _dataservice;
|
||||||
|
|
||||||
public override bool CanExecute(object? parameter)
|
public override bool CanExecute(object? parameter)
|
||||||
{
|
{
|
||||||
return _clientListViewModel.CanSelectClient;
|
return _clientListViewModel.CanSelectClient;
|
||||||
}
|
}
|
||||||
public SelectClientCommand(IActualProject actualProject, ClientListViewModel clientListViewModel)
|
public SelectClientCommand(
|
||||||
|
IDataService<Client> dataService,
|
||||||
|
IActualProject actualProject,
|
||||||
|
ClientListViewModel clientListViewModel)
|
||||||
{
|
{
|
||||||
_actualProject = actualProject;
|
_actualProject = actualProject;
|
||||||
_clientListViewModel = clientListViewModel;
|
_clientListViewModel = clientListViewModel;
|
||||||
_clientListViewModel.PropertyChanged += _clientListViewModel_PropertyChanged;
|
_clientListViewModel.PropertyChanged += ClientListViewModel_PropertyChanged;
|
||||||
|
_dataservice = dataService;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _clientListViewModel_PropertyChanged(object? sender, PropertyChangedEventArgs e)
|
private void ClientListViewModel_PropertyChanged(object? sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if(e.PropertyName == nameof(_clientListViewModel.CanSelectClient))
|
if(e.PropertyName == nameof(_clientListViewModel.CanSelectClient))
|
||||||
{
|
{
|
||||||
@@ -36,8 +43,10 @@ namespace DaSaSo.ViewModel.Commands
|
|||||||
|
|
||||||
public override async Task ExecuteAsync(object? parameter)
|
public override async Task ExecuteAsync(object? parameter)
|
||||||
{
|
{
|
||||||
var s = _clientListViewModel.SelectedClient;
|
Client? _selectedClient = _clientListViewModel.SelectedClient;
|
||||||
_actualProject.SetClient(s);
|
if (_selectedClient == null) return;
|
||||||
|
_selectedClient = await _dataservice.Get(_selectedClient.Id);
|
||||||
|
_actualProject.SetClient(_selectedClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
24
DaSaSo.ViewModel/Commands/SelectDamageCommand.cs
Normal file
24
DaSaSo.ViewModel/Commands/SelectDamageCommand.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.ViewModel.Commands
|
||||||
|
{
|
||||||
|
class SelectDamageCommand : AsyncCommandBase
|
||||||
|
{
|
||||||
|
private readonly SewerMainListViewModel _sewerMainListViewModel;
|
||||||
|
|
||||||
|
public SelectDamageCommand(SewerMainListViewModel sewerMainListViewModel)
|
||||||
|
{
|
||||||
|
_sewerMainListViewModel = sewerMainListViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override Task ExecuteAsync(object? parameter)
|
||||||
|
{
|
||||||
|
var d = _sewerMainListViewModel;
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
50
DaSaSo.ViewModel/Controls/SewerDamageControllViewModel.cs
Normal file
50
DaSaSo.ViewModel/Controls/SewerDamageControllViewModel.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.ViewModel.Controls
|
||||||
|
{
|
||||||
|
public class SewerDamageControllViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
public bool Riss { get; set; }
|
||||||
|
public bool Bruch { get; set; }
|
||||||
|
public bool Scherbe { get; set; }
|
||||||
|
public bool Wurzel { get; set; }
|
||||||
|
public bool Inkrustation { get; set; }
|
||||||
|
public bool Ablagerungen { get; set; }
|
||||||
|
public bool EinrageneStutzen { get; set; }
|
||||||
|
public bool Infiltration { get; set; }
|
||||||
|
public SewerDamageControllViewModel(EDamageType damageType)
|
||||||
|
{
|
||||||
|
Riss = damageType.HasFlag(EDamageType.Riss);
|
||||||
|
Bruch = damageType.HasFlag(EDamageType.Bruch);
|
||||||
|
Scherbe = damageType.HasFlag(EDamageType.Scherbe);
|
||||||
|
|
||||||
|
Wurzel = damageType.HasFlag(EDamageType.Wurzel);
|
||||||
|
Inkrustation = damageType.HasFlag(EDamageType.Inkrustation);
|
||||||
|
Ablagerungen = damageType.HasFlag(EDamageType.Ablagerung);
|
||||||
|
|
||||||
|
EinrageneStutzen = damageType.HasFlag(EDamageType.EinrageneStutzen);
|
||||||
|
Infiltration = damageType.HasFlag(EDamageType.Infiltration);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EDamageType CalculateDamageFlags()
|
||||||
|
{
|
||||||
|
EDamageType result = EDamageType.NONE;
|
||||||
|
if (Riss) result |= EDamageType.Riss;
|
||||||
|
if (Bruch) result |= EDamageType.Bruch;
|
||||||
|
if (Scherbe) result |= EDamageType.Scherbe;
|
||||||
|
if (Wurzel) result |= EDamageType.Wurzel;
|
||||||
|
if (Inkrustation) result |= EDamageType.Inkrustation;
|
||||||
|
if (Ablagerungen) result |= EDamageType.Ablagerung;
|
||||||
|
if (EinrageneStutzen) result |= EDamageType.EinrageneStutzen;
|
||||||
|
if (Infiltration) result |= EDamageType.Infiltration;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.ViewModel.Controls
|
||||||
|
{
|
||||||
|
public class SewerPreperationControllViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
public bool HD { get; set; }
|
||||||
|
public bool Mechanisch { get; set; }
|
||||||
|
public bool Roboter { get; set; }
|
||||||
|
public bool Faekalienfrei { get; set; }
|
||||||
|
|
||||||
|
public SewerPreperationControllViewModel(EPreparationType preparationType)
|
||||||
|
{
|
||||||
|
HD = preparationType.HasFlag(EPreparationType.CleanedHD);
|
||||||
|
Mechanisch = preparationType.HasFlag(EPreparationType.CleanedMechanisch);
|
||||||
|
Roboter = preparationType.HasFlag(EPreparationType.CleanedRoboter);
|
||||||
|
Faekalienfrei = preparationType.HasFlag(EPreparationType.FaekalienFrei);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EPreparationType CalculatePreparationFlags()
|
||||||
|
{
|
||||||
|
EPreparationType result = EPreparationType.NONE;
|
||||||
|
if (HD) result |= EPreparationType.CleanedHD;
|
||||||
|
if (Mechanisch) result |= EPreparationType.CleanedMechanisch;
|
||||||
|
if (Roboter) result |= EPreparationType.CleanedRoboter;
|
||||||
|
if (Faekalienfrei) result |= EPreparationType.FaekalienFrei;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,15 +12,20 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
{
|
{
|
||||||
private CreateViewModel<SewerStammdatenViewModel> _createSewerStammdatenViewModel;
|
private CreateViewModel<SewerStammdatenViewModel> _createSewerStammdatenViewModel;
|
||||||
private CreateViewModel<SewerDamageListViewModel> _createSewerDamageListViewModel;
|
private CreateViewModel<SewerDamageListViewModel> _createSewerDamageListViewModel;
|
||||||
|
private CreateViewModel<SewerDamageEditViewModel> _createSewerDamageEditViewModel;
|
||||||
|
private CreateViewModel<SewerPipeLinerViewModel> _createSewerPipeLinerViewModel;
|
||||||
|
|
||||||
public SewerWindowViewModelFactory(
|
public SewerWindowViewModelFactory(
|
||||||
CreateViewModel<SewerStammdatenViewModel> createSewerStammdatenViewModel,
|
CreateViewModel<SewerStammdatenViewModel> createSewerStammdatenViewModel,
|
||||||
CreateViewModel<SewerDamageListViewModel> createSewerDamageListViewModel
|
CreateViewModel<SewerDamageListViewModel> createSewerDamageListViewModel,
|
||||||
|
CreateViewModel<SewerDamageEditViewModel> createSewerDamageEditViewModel,
|
||||||
|
CreateViewModel<SewerPipeLinerViewModel> createSewerPipeLinerViewModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_createSewerStammdatenViewModel = createSewerStammdatenViewModel;
|
_createSewerStammdatenViewModel = createSewerStammdatenViewModel;
|
||||||
_createSewerDamageListViewModel = createSewerDamageListViewModel;
|
_createSewerDamageListViewModel = createSewerDamageListViewModel;
|
||||||
|
_createSewerDamageEditViewModel = createSewerDamageEditViewModel;
|
||||||
|
_createSewerPipeLinerViewModel = createSewerPipeLinerViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseViewModel CreateViewModel(ESewerWindowViewType viewType)
|
public BaseViewModel CreateViewModel(ESewerWindowViewType viewType)
|
||||||
@@ -29,6 +34,8 @@ namespace DaSaSo.ViewModel.Factories
|
|||||||
{
|
{
|
||||||
case ESewerWindowViewType.SewerStammdaten: return _createSewerStammdatenViewModel();
|
case ESewerWindowViewType.SewerStammdaten: return _createSewerStammdatenViewModel();
|
||||||
case ESewerWindowViewType.SewerDamageList: return _createSewerDamageListViewModel();
|
case ESewerWindowViewType.SewerDamageList: return _createSewerDamageListViewModel();
|
||||||
|
case ESewerWindowViewType.SewerDamageEdit: return _createSewerDamageEditViewModel();
|
||||||
|
case ESewerWindowViewType.SewerPipeLiner: return _createSewerPipeLinerViewModel();
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException("The Viewtype does not have a ViewModel", "viewType");
|
throw new ArgumentException("The Viewtype does not have a ViewModel", "viewType");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,15 +13,18 @@ namespace DaSaSo.ViewModel.Interface
|
|||||||
event EventHandler? ProjectChanged;
|
event EventHandler? ProjectChanged;
|
||||||
event EventHandler? BuildingSiteChanged;
|
event EventHandler? BuildingSiteChanged;
|
||||||
event EventHandler? SewerObjectChanged;
|
event EventHandler? SewerObjectChanged;
|
||||||
|
event EventHandler? SewerDamageChanged;
|
||||||
Client AktuellClient { get; }
|
Client AktuellClient { get; }
|
||||||
Project AktuellProjekt { get; }
|
Project AktuellProjekt { get; }
|
||||||
Buildingsite AktuellBaustelle { get; }
|
Buildingsite AktuellBaustelle { get; }
|
||||||
SewerObject AktuellSewerObject { get; }
|
SewerObject AktuellSewerObject { get; }
|
||||||
|
SewerDamage AktuellSewerDamage { 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 ResetProject();
|
void ResetProject();
|
||||||
void ResetBuildingSite();
|
void ResetBuildingSite();
|
||||||
}
|
}
|
||||||
|
|||||||
90
DaSaSo.ViewModel/SewerDamageEditViewModel.cs
Normal file
90
DaSaSo.ViewModel/SewerDamageEditViewModel.cs
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using DaSaSo.ViewModel.Controls;
|
||||||
|
using DaSaSo.ViewModel.Interface;
|
||||||
|
using Microsoft.Toolkit.Mvvm.Input;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.ViewModel
|
||||||
|
{
|
||||||
|
public class SewerDamageEditViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
private SewerDamage? _damage;
|
||||||
|
|
||||||
|
public SewerDamageControllViewModel damageControllViewModel { get; set; }
|
||||||
|
//public SewerPreperationControllViewModel preperationControllViewModel { get; set; }
|
||||||
|
public IRelayCommand Berechne { get; set; }
|
||||||
|
|
||||||
|
private string? _entfernung;
|
||||||
|
public string Entfernung
|
||||||
|
{
|
||||||
|
get => _entfernung;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_entfernung = value;
|
||||||
|
_damage.SewerObject.IsChanged = true;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SewerDamage? Damage
|
||||||
|
{
|
||||||
|
get => _damage;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_damage = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SewerDamageEditViewModel(IActualProject actualProject)
|
||||||
|
{
|
||||||
|
if (actualProject.AktuellSewerDamage == null) throw new NullReferenceException(nameof(actualProject.AktuellSewerDamage));
|
||||||
|
Damage = actualProject.AktuellSewerDamage;
|
||||||
|
|
||||||
|
damageControllViewModel = new SewerDamageControllViewModel(Damage.DamageType);
|
||||||
|
//preperationControllViewModel = new SewerPreperationControllViewModel(Damage.PreparationType);
|
||||||
|
|
||||||
|
Entfernung = Damage.Distance.ToString();
|
||||||
|
|
||||||
|
/*Berechne = new RelayCommand(() =>
|
||||||
|
{
|
||||||
|
//Debugger.Break();
|
||||||
|
Damage.DamageType = damageControllViewModel.CalculateDamageFlags();
|
||||||
|
Damage.PreparationType = preperationControllViewModel.CalculatePreparationFlags();
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
~SewerDamageEditViewModel()
|
||||||
|
{
|
||||||
|
//Debugger.Break();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Dispose()
|
||||||
|
{
|
||||||
|
// Alle Werte Speichern, form wurde geändert (Noch nicht in DB!)
|
||||||
|
EDamageType newDamage = damageControllViewModel.CalculateDamageFlags();
|
||||||
|
//EPreparationType newPrepartion = preperationControllViewModel.CalculatePreparationFlags();
|
||||||
|
if(Damage.DamageType != newDamage)
|
||||||
|
{
|
||||||
|
Damage.DamageType = newDamage;
|
||||||
|
Damage.SewerObject.IsChanged = true;
|
||||||
|
}
|
||||||
|
/* if(Damage.PreparationType != newPrepartion)
|
||||||
|
{
|
||||||
|
Damage.PreparationType = newPrepartion;
|
||||||
|
Damage.SewerObject.IsChanged = true;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
damageControllViewModel.Dispose();
|
||||||
|
//preperationControllViewModel.Dispose();
|
||||||
|
base.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
using DaSaSo.Domain.Model;
|
using DaSaSo.Domain.Model;
|
||||||
using DaSaSo.Domain.Services;
|
using DaSaSo.Domain.Services;
|
||||||
|
using DaSaSo.ViewModel.Commands;
|
||||||
using DaSaSo.ViewModel.Interface;
|
using DaSaSo.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;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DaSaSo.ViewModel
|
namespace DaSaSo.ViewModel
|
||||||
{
|
{
|
||||||
@@ -13,15 +15,29 @@ namespace DaSaSo.ViewModel
|
|||||||
{
|
{
|
||||||
private readonly IActualProject _actualProject;
|
private readonly IActualProject _actualProject;
|
||||||
private readonly IDataService<SewerObject> _dataService;
|
private readonly IDataService<SewerObject> _dataService;
|
||||||
|
private SewerDamage? _selectedDamage;
|
||||||
|
|
||||||
|
public ICommand AddNewDamage { get; set; }
|
||||||
|
public SewerDamage SelectedDamage
|
||||||
|
{
|
||||||
|
get => _selectedDamage;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_selectedDamage = value;
|
||||||
|
_actualProject.SetSewerDamage(_selectedDamage);
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SewerObject _model;
|
SewerObject _model;
|
||||||
public List<SewerDamage> Damages { get => _model.SewerDamages.ToList(); }
|
public List<SewerDamage> Damages { get => _model.SewerDamages.ToList(); }
|
||||||
|
|
||||||
public SewerDamageListViewModel(IActualProject actualProject, IDataService<SewerObject> dataService)
|
public SewerDamageListViewModel(IActualProject actualProject, IDataService<SewerObject> dataService, IRenavigator addedNavigator)
|
||||||
{
|
{
|
||||||
_actualProject = actualProject;
|
_actualProject = actualProject;
|
||||||
_dataService = dataService;
|
_dataService = dataService;
|
||||||
_model = _actualProject.AktuellSewerObject;
|
_model = _actualProject.AktuellSewerObject;
|
||||||
|
AddNewDamage = new AddDamageCommand(actualProject,addedNavigator);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,15 +17,18 @@ namespace DaSaSo.ViewModel
|
|||||||
{
|
{
|
||||||
public class SewerMainListViewModel : BaseViewModel
|
public class SewerMainListViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
private ISewerMainNavigator _navigator { get; set; }
|
private ISewerMainNavigator Navigator { get; set; }
|
||||||
private readonly SewerObjectDataService _dataservice;
|
private readonly SewerObjectDataService _dataservice;
|
||||||
private readonly ISewerObjectService _sewerObjectService;
|
private readonly ISewerObjectService _sewerObjectService;
|
||||||
private readonly IRenavigator _renavigator;
|
private readonly IRenavigator _renavigator;
|
||||||
private IActualProject _actualProject { get; set; }
|
private IActualProject ActualProject { get; set; }
|
||||||
public ICommand UpdateCurrentSewerViewModelCommand { get; }
|
public ICommand UpdateCurrentSewerViewModelCommand { get; }
|
||||||
public ICommand CloseCommand { get; set; }
|
public ICommand CloseCommand { get; set; }
|
||||||
public BaseViewModel CurrentSewerViewModel => _navigator.CurrentViewModel;
|
public ICommand SchadenCommand { get; set; }
|
||||||
|
public ICommand Schlauchliner { get; set; }
|
||||||
|
public BaseViewModel CurrentSewerViewModel => Navigator.CurrentViewModel;
|
||||||
|
|
||||||
|
public bool CanSelectDamage => Schaden != null;
|
||||||
public bool IsLoading
|
public bool IsLoading
|
||||||
{
|
{
|
||||||
get => _isLoading;
|
get => _isLoading;
|
||||||
@@ -38,37 +41,65 @@ namespace DaSaSo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private SewerDamage _schaden;
|
||||||
|
public SewerDamage Schaden
|
||||||
|
{
|
||||||
|
get => _schaden;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_schaden = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
OnPropertyChanged(nameof(CanSelectDamage));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string Strasse { get => _actualProject.AktuellSewerObject.StreetName; }
|
public string Strasse { get => ActualProject.AktuellSewerObject.StreetName; }
|
||||||
public string AktualObject { get => _actualProject.AktuellSewerObject.ObjektName; }
|
public string AktualObject { get => ActualProject.AktuellSewerObject.ObjektName; }
|
||||||
|
|
||||||
bool _isLoading = true;
|
bool _isLoading = true;
|
||||||
public bool CanSaveSewer => !string.IsNullOrEmpty(_actualProject.AktuellSewerObject.StreetName);
|
public bool CanSaveSewer => !string.IsNullOrEmpty(ActualProject.AktuellSewerObject.StreetName);
|
||||||
|
|
||||||
public SewerMainListViewModel(IDataService<SewerObject> dataService, ISewerMainNavigator navigator,IActualProject actualProject, IViewModelSewerMainFactory viewModelFactory, IRenavigator renavigator, ISewerObjectService sewerObjectService, ISewerpointService sewerpointService)
|
public SewerMainListViewModel(
|
||||||
|
IDataService<SewerObject> dataService,
|
||||||
|
ISewerMainNavigator navigator,
|
||||||
|
IActualProject actualProject,
|
||||||
|
IViewModelSewerMainFactory viewModelFactory,
|
||||||
|
IRenavigator renavigator,
|
||||||
|
ISewerObjectService sewerObjectService,
|
||||||
|
ISewerpointService sewerpointService
|
||||||
|
)
|
||||||
{
|
{
|
||||||
_navigator = navigator;
|
Navigator = navigator;
|
||||||
_actualProject = actualProject;
|
ActualProject = actualProject;
|
||||||
_dataservice = (SewerObjectDataService)dataService;
|
_dataservice = (SewerObjectDataService)dataService;
|
||||||
_renavigator = renavigator;
|
_renavigator = renavigator;
|
||||||
_sewerObjectService = sewerObjectService;
|
_sewerObjectService = sewerObjectService;
|
||||||
CloseCommand = new SaveSewerCommand(_dataservice,_actualProject,_sewerObjectService,_renavigator,_navigator); //RelayCommand(SaveSewer);
|
CloseCommand = new SaveSewerCommand(_dataservice,ActualProject,_sewerObjectService,_renavigator,Navigator); //RelayCommand(SaveSewer);
|
||||||
LoadModel();
|
LoadModel();
|
||||||
UpdateCurrentSewerViewModelCommand = new UpdateCurrentSewerViewModelCommand(_navigator, viewModelFactory);
|
UpdateCurrentSewerViewModelCommand = new UpdateCurrentSewerViewModelCommand(Navigator, viewModelFactory);
|
||||||
_navigator.StateChanged += () => OnPropertyChanged(nameof(CurrentSewerViewModel));
|
Navigator.StateChanged += () => OnPropertyChanged(nameof(CurrentSewerViewModel));
|
||||||
|
ActualProject.SewerDamageChanged += ActualProject_SewerDamageChanged;
|
||||||
|
|
||||||
|
//SchadenCommand = UpdateCurrentSewerViewModelCommand.Execute(); // new SelectDamageCommand(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ActualProject_SewerDamageChanged(object? sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Schaden = ActualProject.AktuellSewerDamage;
|
||||||
|
OnPropertyChanged(nameof(Schaden));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void LoadModel()
|
private async void LoadModel()
|
||||||
{
|
{
|
||||||
IsLoading = true;
|
IsLoading = true;
|
||||||
SewerObject sewer = await _dataservice.Get(_actualProject.AktuellSewerObject.Id);
|
SewerObject sewer = await _dataservice.Get(ActualProject.AktuellSewerObject.Id);
|
||||||
_actualProject.SetSewerObject(sewer,false);
|
ActualProject.SetSewerObject(sewer,false);
|
||||||
IsLoading = false;
|
IsLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
{
|
{
|
||||||
_navigator.StateChanged -= () => OnPropertyChanged(nameof(CurrentSewerViewModel));
|
Navigator.StateChanged -= () => OnPropertyChanged(nameof(CurrentSewerViewModel));
|
||||||
base.Dispose();
|
base.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
DaSaSo.ViewModel/SewerPipeLinerViewModel.cs
Normal file
12
DaSaSo.ViewModel/SewerPipeLinerViewModel.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.ViewModel
|
||||||
|
{
|
||||||
|
public class SewerPipeLinerViewModel : BaseViewModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -36,6 +36,30 @@ namespace DaSaSo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public string Hausnummer
|
||||||
|
{
|
||||||
|
get => Model.Hausnummer;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(Model.Hausnummer != value)
|
||||||
|
{
|
||||||
|
Model.Hausnummer = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string Sanierungsid
|
||||||
|
{
|
||||||
|
get => Model.SanNummer;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(Model.SanNummer != value)
|
||||||
|
{
|
||||||
|
Model.SanNummer = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public string Oberepunkt
|
public string Oberepunkt
|
||||||
{
|
{
|
||||||
@@ -155,6 +179,12 @@ namespace DaSaSo.ViewModel
|
|||||||
|
|
||||||
Model = _actualProject.AktuellSewerObject;
|
Model = _actualProject.AktuellSewerObject;
|
||||||
SaveCommand = new SaveSewerStammdatenCommand(this, dataService, sewerpointService);
|
SaveCommand = new SaveSewerStammdatenCommand(this, dataService, sewerpointService);
|
||||||
|
this.PropertyChanged += SewerStammdatenViewModel_PropertyChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SewerStammdatenViewModel_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
Model.IsChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
~SewerStammdatenViewModel()
|
~SewerStammdatenViewModel()
|
||||||
|
|||||||
@@ -15,12 +15,15 @@ namespace DaSaSo.ViewModel.State.ActualState
|
|||||||
public Project? AktuellProjekt { get; private set; }
|
public Project? AktuellProjekt { get; private set; }
|
||||||
public SewerObject? AktuellSewerObject { get; private set; }
|
public SewerObject? AktuellSewerObject { get; private set; }
|
||||||
|
|
||||||
|
public SewerDamage? AktuellSewerDamage { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
#region events
|
#region events
|
||||||
public event EventHandler? ClientChanged;
|
public event EventHandler? ClientChanged;
|
||||||
public event EventHandler? ProjectChanged;
|
public event EventHandler? ProjectChanged;
|
||||||
public event EventHandler? BuildingSiteChanged;
|
public event EventHandler? BuildingSiteChanged;
|
||||||
public event EventHandler? SewerObjectChanged;
|
public event EventHandler? SewerObjectChanged;
|
||||||
|
public event EventHandler? SewerDamageChanged;
|
||||||
|
|
||||||
protected void OnClientChanged()
|
protected void OnClientChanged()
|
||||||
{
|
{
|
||||||
@@ -38,9 +41,15 @@ namespace DaSaSo.ViewModel.State.ActualState
|
|||||||
{
|
{
|
||||||
SewerObjectChanged?.Invoke(this, new EventArgs());
|
SewerObjectChanged?.Invoke(this, new EventArgs());
|
||||||
}
|
}
|
||||||
|
protected void OnSewerDamageChanged()
|
||||||
|
{
|
||||||
|
SewerDamageChanged?.Invoke(this, new EventArgs());
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
public void SetClient(Client client, bool notification = true)
|
public void SetClient(Client client, bool notification = true)
|
||||||
{
|
{
|
||||||
|
//ResetProject();
|
||||||
|
//ResetBuildingSite();
|
||||||
AktuellClient = client;
|
AktuellClient = client;
|
||||||
if(notification)
|
if(notification)
|
||||||
OnClientChanged();
|
OnClientChanged();
|
||||||
@@ -48,6 +57,7 @@ namespace DaSaSo.ViewModel.State.ActualState
|
|||||||
|
|
||||||
public void SetProject(Project project, bool notification = true)
|
public void SetProject(Project project, bool notification = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
AktuellProjekt = project;
|
AktuellProjekt = project;
|
||||||
if(notification)
|
if(notification)
|
||||||
OnProjectChanged();
|
OnProjectChanged();
|
||||||
@@ -77,5 +87,12 @@ namespace DaSaSo.ViewModel.State.ActualState
|
|||||||
{
|
{
|
||||||
SetBuildingSite(null);
|
SetBuildingSite(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetSewerDamage(SewerDamage sewerDamage, bool notification = true)
|
||||||
|
{
|
||||||
|
AktuellSewerDamage = sewerDamage;
|
||||||
|
if (notification)
|
||||||
|
OnSewerDamageChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using Microsoft.Win32;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -23,6 +24,12 @@ namespace DaSaSo.ViewModel
|
|||||||
public sealed class MainWindowViewModel : BaseViewModel
|
public sealed class MainWindowViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
private readonly IViewModelAbstractFactory viewModelFactory;
|
private readonly IViewModelAbstractFactory viewModelFactory;
|
||||||
|
|
||||||
|
public MainWindowViewModel(IViewModelAbstractFactory viewModelFactory)
|
||||||
|
{
|
||||||
|
this.viewModelFactory = viewModelFactory;
|
||||||
|
}
|
||||||
|
|
||||||
private readonly IActualProject _actualProject;
|
private readonly IActualProject _actualProject;
|
||||||
private readonly IDataService<Client> _clientDataService;
|
private readonly IDataService<Client> _clientDataService;
|
||||||
private readonly IDataService<Project> _projectDataService;
|
private readonly IDataService<Project> _projectDataService;
|
||||||
@@ -31,15 +38,15 @@ namespace DaSaSo.ViewModel
|
|||||||
private string _clientname = "";
|
private string _clientname = "";
|
||||||
private string _projektname = "";
|
private string _projektname = "";
|
||||||
private string _buildingsitename = "";
|
private string _buildingsitename = "";
|
||||||
RegistryKey registry;
|
private readonly RegistryKey? registry;
|
||||||
const string REGISTRYKEY = "HKEY_CURRENT_USER\\Software\\Cosysda\\DaSaSo";
|
const string REGISTRYKEY = "HKEY_CURRENT_USER\\Software\\Cosysda\\DaSaSo";
|
||||||
public bool CanSelectProject { get => _actualProject.AktuellClient != null; }
|
public bool CanSelectProject { get => _actualProject.AktuellClient != null; }
|
||||||
public bool CanSelectBuildingSite { get => _actualProject.AktuellProjekt != null; }
|
public bool CanSelectBuildingSite { get => _actualProject.AktuellProjekt != null; }
|
||||||
public bool CanSelectSewerObjects { get => _actualProject.AktuellBaustelle != null; }
|
public bool CanSelectSewerObjects { get => _actualProject.AktuellBaustelle != null; }
|
||||||
|
|
||||||
public IMainWindowNavigator _navigator { get; set; }
|
public IMainWindowNavigator Navigator { get; set; }
|
||||||
public ICommand UpdateCurrentViewModelCommand { get; }
|
public ICommand UpdateCurrentViewModelCommand { get; }
|
||||||
public BaseViewModel CurrentViewModel => _navigator.CurrentViewModel;
|
public BaseViewModel CurrentViewModel => Navigator.CurrentViewModel;
|
||||||
|
|
||||||
public string ClientName
|
public string ClientName
|
||||||
{
|
{
|
||||||
@@ -78,13 +85,17 @@ namespace DaSaSo.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public string ApplicationTitle
|
public static string ApplicationTitle
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string gitVersion;
|
string gitVersion;
|
||||||
|
#pragma warning disable CS8600 // Converting null literal or possible null value to non-nullable type.
|
||||||
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DaSaSo.ViewModel.version.txt"))
|
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("DaSaSo.ViewModel.version.txt"))
|
||||||
using (StreamReader reader = new StreamReader(stream))
|
#pragma warning restore CS8600 // Converting null literal or possible null value to non-nullable type.
|
||||||
|
#pragma warning disable CS8604 // Possible null reference argument.
|
||||||
|
using (StreamReader reader = new(stream))
|
||||||
|
#pragma warning restore CS8604 // Possible null reference argument.
|
||||||
{
|
{
|
||||||
gitVersion = reader.ReadToEnd();
|
gitVersion = reader.ReadToEnd();
|
||||||
}
|
}
|
||||||
@@ -99,37 +110,37 @@ namespace DaSaSo.ViewModel
|
|||||||
IDataService<Buildingsite> buildingsiteDataService
|
IDataService<Buildingsite> buildingsiteDataService
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this._navigator = navigator;
|
this.Navigator = navigator;
|
||||||
this.viewModelFactory = viewModelFactory;
|
this.viewModelFactory = viewModelFactory;
|
||||||
_clientDataService = clientDataService;
|
_clientDataService = clientDataService;
|
||||||
_projectDataService = projectDataService;
|
_projectDataService = projectDataService;
|
||||||
_buildingsiteDataService = buildingsiteDataService;
|
_buildingsiteDataService = buildingsiteDataService;
|
||||||
|
|
||||||
|
registry = Registry.CurrentUser.OpenSubKey("Software\\Cosysda\\DaSaSo");
|
||||||
|
if (registry == null) InitRegistry();
|
||||||
|
|
||||||
_navigator.StateChanged += _navigator_StateChanged;
|
Navigator.StateChanged += Navigator_StateChanged;
|
||||||
|
|
||||||
UpdateCurrentViewModelCommand = new UpdateCurrentViewModelCommand(navigator, viewModelFactory);
|
UpdateCurrentViewModelCommand = new UpdateCurrentViewModelCommand(navigator, viewModelFactory);
|
||||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Home);
|
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Home);
|
||||||
_actualProject = actualProject;
|
_actualProject = actualProject;
|
||||||
_actualProject.ClientChanged += _actualProject_ClientChanged;
|
_actualProject.ClientChanged += ActualProject_ClientChanged;
|
||||||
_actualProject.ProjectChanged += _actualProject_ProjectChanged;
|
_actualProject.ProjectChanged += ActualProject_ProjectChanged;
|
||||||
_actualProject.BuildingSiteChanged += _actualProject_BuildingSiteChanged;
|
_actualProject.BuildingSiteChanged += ActualProject_BuildingSiteChanged;
|
||||||
_actualProject.SewerObjectChanged += _actualProject_SewerObjectChanged;
|
_actualProject.SewerObjectChanged += ActualProject_SewerObjectChanged;
|
||||||
|
|
||||||
ladeRegistry();
|
LadeRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void ladeRegistry()
|
private async void LadeRegistry()
|
||||||
{
|
{
|
||||||
|
|
||||||
registry = Registry.CurrentUser.OpenSubKey("Software\\Cosysda\\DaSaSo");
|
|
||||||
if (registry == null) initRegistry();
|
|
||||||
int clientid = Convert.ToInt32((string)registry.GetValue("lastclient", "-1"));
|
int clientid = Convert.ToInt32((string)registry.GetValue("lastclient", "-1"));
|
||||||
if (clientid == -1)
|
if (clientid == -1)
|
||||||
return;
|
return;
|
||||||
Client lastClient = await _clientDataService.Get(clientid);
|
Client lastClient = await _clientDataService.Get(clientid);
|
||||||
if (lastClient == null)
|
if (lastClient == null)
|
||||||
{
|
{
|
||||||
saveInRegistry("lastclient", "-1");
|
SaveInRegistry("lastclient", "-1");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_actualProject.SetClient(lastClient);
|
_actualProject.SetClient(lastClient);
|
||||||
@@ -140,64 +151,65 @@ namespace DaSaSo.ViewModel
|
|||||||
Project lastProject = await _projectDataService.Get(projectid);
|
Project lastProject = await _projectDataService.Get(projectid);
|
||||||
if(lastProject == null)
|
if(lastProject == null)
|
||||||
{
|
{
|
||||||
saveInRegistry("lastproject","-1");
|
SaveInRegistry("lastproject","-1");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_actualProject.SetProject(lastProject);
|
_actualProject.SetProject(lastProject);
|
||||||
|
|
||||||
int buildingsiteid = Convert.ToInt32((string)registry.GetValue("lastbuildingsite", "-1"));
|
string? value = registry.GetValue("lastbuildingsite", "-1") as string;
|
||||||
|
int buildingsiteid = Convert.ToInt32(value);
|
||||||
if (buildingsiteid == -1)
|
if (buildingsiteid == -1)
|
||||||
return;
|
return;
|
||||||
Buildingsite lastBuildingiste = await _buildingsiteDataService.Get(buildingsiteid);
|
Buildingsite lastBuildingiste = await _buildingsiteDataService.Get(buildingsiteid);
|
||||||
if(lastBuildingiste == null)
|
if(lastBuildingiste == null)
|
||||||
{
|
{
|
||||||
saveInRegistry("lastbuildingsite","-1");
|
SaveInRegistry("lastbuildingsite","-1");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_actualProject.SetBuildingSite(lastBuildingiste);
|
_actualProject.SetBuildingSite(lastBuildingiste);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveInRegistry(string key, string value)
|
private static void SaveInRegistry(string key, string value)
|
||||||
{
|
{
|
||||||
Registry.SetValue(REGISTRYKEY, key, value);
|
Registry.SetValue(REGISTRYKEY, key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initRegistry()
|
private void InitRegistry()
|
||||||
{
|
{
|
||||||
Registry.CurrentUser.CreateSubKey("Software\\Cosysda\\DaSaSo");
|
Registry.CurrentUser.CreateSubKey("Software\\Cosysda\\DaSaSo");
|
||||||
ladeRegistry();
|
LadeRegistry();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _actualProject_SewerObjectChanged(object? sender, EventArgs e)
|
private void ActualProject_SewerObjectChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.SewerMainMenu);
|
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.SewerMainMenu);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _navigator_StateChanged()
|
private void Navigator_StateChanged()
|
||||||
{
|
{
|
||||||
OnPropertyChanged(nameof(CurrentViewModel));
|
OnPropertyChanged(nameof(CurrentViewModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _actualProject_BuildingSiteChanged(object? sender, EventArgs e)
|
private void ActualProject_BuildingSiteChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
saveInRegistry("lastbuildingsite", _actualProject.AktuellBaustelle.Id.ToString());
|
SaveInRegistry("lastbuildingsite", _actualProject.AktuellBaustelle.Id.ToString());
|
||||||
Buildingsitename = _actualProject.AktuellBaustelle.BuildingSiteNumber;
|
Buildingsitename = _actualProject.AktuellBaustelle.BuildingSiteNumber;
|
||||||
OnPropertyChanged(nameof(CanSelectSewerObjects));
|
OnPropertyChanged(nameof(CanSelectSewerObjects));
|
||||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.SewerObjects);
|
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.SewerObjects);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _actualProject_ProjectChanged(object? sender, EventArgs e)
|
private void ActualProject_ProjectChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
saveInRegistry("lastproject", _actualProject.AktuellProjekt.Id.ToString());
|
SaveInRegistry("lastproject", _actualProject.AktuellProjekt.Id.ToString());
|
||||||
Projektname = _actualProject.AktuellProjekt.Name;
|
Projektname = _actualProject.AktuellProjekt.Name;
|
||||||
OnPropertyChanged(nameof(CanSelectBuildingSite));
|
OnPropertyChanged(nameof(CanSelectBuildingSite));
|
||||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Buildingsites);
|
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Buildingsites);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void _actualProject_ClientChanged(object? sender, EventArgs e)
|
private void ActualProject_ClientChanged(object? sender, EventArgs e)
|
||||||
{
|
{
|
||||||
saveInRegistry("lastclient", _actualProject.AktuellClient.Id.ToString());
|
SaveInRegistry("lastclient", _actualProject.AktuellClient.Id.ToString());
|
||||||
ClientName = _actualProject.AktuellClient.Firstname;
|
ClientName = _actualProject.AktuellClient.Firstname;
|
||||||
OnPropertyChanged(nameof(CanSelectProject));
|
OnPropertyChanged(nameof(CanSelectProject));
|
||||||
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Projects);
|
UpdateCurrentViewModelCommand.Execute(EMainWindowViewType.Projects);
|
||||||
|
|||||||
@@ -6,13 +6,17 @@
|
|||||||
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.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="200">
|
d:DesignHeight="607.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" />
|
||||||
<RadioButton Content="Schäden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerDamageList}" Margin="20" />
|
<RadioButton Content="Schäden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerDamageList}" Margin="20" />
|
||||||
<RadioButton Content="Schließen" Style="{StaticResource ToggleButtonList}" Command="{Binding CloseCommand}" Margin="20" />
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
|
<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="Schlauchliner" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerPipeLiner}" Margin="20" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
26
DaSaSo.Wpf/Converters/EqualDamageTypeToBooleanConverter.cs
Normal file
26
DaSaSo.Wpf/Converters/EqualDamageTypeToBooleanConverter.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.Converters
|
||||||
|
{
|
||||||
|
class EqualDamageTypeToBooleanConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
bool result = (((int)value & (int)parameter) == (int)value);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
//EDamageType result = (EDamageType)parameter;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.Converters
|
||||||
|
{
|
||||||
|
class EqualPreperationTypeToBooleanConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
EPreparationType damagevalue = (EPreparationType)value;
|
||||||
|
EPreparationType damageParameter = (EPreparationType)parameter;
|
||||||
|
return damagevalue.HasFlag(damageParameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -37,6 +37,21 @@
|
|||||||
<Compile Update="View\SewerObjecte\SewerObjecteListView.xaml.cs">
|
<Compile Update="View\SewerObjecte\SewerObjecteListView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Update="View\SewerObject\Controls\SewerDamage.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="View\SewerObject\Controls\SewerDamagePreparation.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="View\SewerObject\Controls\SewerRehabilation.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="View\SewerObject\SewerPipeLinerView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="View\SewerObject\SewerDamageEditView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Update="View\SewerObject\SewerDamageListView.xaml.cs">
|
<Compile Update="View\SewerObject\SewerDamageListView.xaml.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -84,6 +99,21 @@
|
|||||||
<Page Update="View\SewerObjecte\SewerObjecteListView.xaml">
|
<Page Update="View\SewerObjecte\SewerObjecteListView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Update="View\SewerObject\Controls\SewerDamage.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="View\SewerObject\Controls\SewerDamagePreparation.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="View\SewerObject\Controls\SewerRehabilation.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="View\SewerObject\SewerPipeLinerView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="View\SewerObject\SewerDamageEditView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
<Page Update="View\SewerObject\SewerDamageListView.xaml">
|
<Page Update="View\SewerObject\SewerDamageListView.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
{
|
{
|
||||||
host.ConfigureServices(services =>
|
host.ConfigureServices(services =>
|
||||||
{
|
{
|
||||||
services.AddSingleton<IDataService<Client>, ClientDataService>();
|
services.AddTransient<IDataService<Client>, ClientDataService>();
|
||||||
services.AddSingleton<IDataService<Project>, ProjectDataService>();
|
services.AddSingleton<IDataService<Project>, ProjectDataService>();
|
||||||
services.AddTransient<IDataService<Buildingsite>, BuildingsiteDataService>();
|
services.AddTransient<IDataService<Buildingsite>, BuildingsiteDataService>();
|
||||||
services.AddSingleton<IDataService<SewerObject>, SewerObjectDataService>();
|
services.AddSingleton<IDataService<SewerObject>, SewerObjectDataService>();
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
services.AddSingleton<ViewModelDelegateRenavigator<BuildingsiteEditViewModel>>();
|
services.AddSingleton<ViewModelDelegateRenavigator<BuildingsiteEditViewModel>>();
|
||||||
|
|
||||||
services.AddSingleton<ViewModelDelegateRenavigator<SewerObjectListViewModel>>();
|
services.AddSingleton<ViewModelDelegateRenavigator<SewerObjectListViewModel>>();
|
||||||
|
services.AddTransient<ViewModelDelegateRenavigator<SewerDamageEditViewModel>>();
|
||||||
|
|
||||||
services.AddSingleton<CreateViewModel<HomeViewModel>>(services =>
|
services.AddSingleton<CreateViewModel<HomeViewModel>>(services =>
|
||||||
{
|
{
|
||||||
@@ -77,7 +78,19 @@ namespace DaSaSo.Wpf.HostBuilders
|
|||||||
{
|
{
|
||||||
return () => new SewerDamageListViewModel(
|
return () => new SewerDamageListViewModel(
|
||||||
services.GetRequiredService<IActualProject>(),
|
services.GetRequiredService<IActualProject>(),
|
||||||
services.GetRequiredService<IDataService<SewerObject>>());
|
services.GetRequiredService<IDataService<SewerObject>>(),
|
||||||
|
services.GetRequiredService<ViewModelDelegateRenavigator<SewerDamageEditViewModel>>()
|
||||||
|
);
|
||||||
|
});
|
||||||
|
services.AddTransient<CreateViewModel<SewerDamageEditViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new SewerDamageEditViewModel(
|
||||||
|
services.GetRequiredService<IActualProject>()
|
||||||
|
);
|
||||||
|
});
|
||||||
|
services.AddTransient<CreateViewModel<SewerPipeLinerViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new SewerPipeLinerViewModel();
|
||||||
});
|
});
|
||||||
|
|
||||||
services.AddTransient<CreateViewModel<ClientListViewModel>>(services =>
|
services.AddTransient<CreateViewModel<ClientListViewModel>>(services =>
|
||||||
|
|||||||
24
DaSaSo.Wpf/Sampledata/SewerDamageListSampleData.cs
Normal file
24
DaSaSo.Wpf/Sampledata/SewerDamageListSampleData.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using DaSaSo.Domain.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace DaSaSo.Wpf.Sampledata
|
||||||
|
{
|
||||||
|
public class SewerDamageListSampleData
|
||||||
|
{
|
||||||
|
public ObservableCollection<SewerDamage> Damages { get; private set; } = new ObservableCollection<SewerDamage>();
|
||||||
|
public SewerDamageListSampleData()
|
||||||
|
{
|
||||||
|
Damages.Add(new SewerDamage()
|
||||||
|
{
|
||||||
|
DamageType = EDamageType.Bruch | EDamageType.EinrageneStutzen,
|
||||||
|
Distance = 12.5m
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,11 +17,12 @@
|
|||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
<RowDefinition />
|
<RowDefinition />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Projektname" />
|
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Projektnummer" />
|
|
||||||
|
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ProjektName}" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Projektnummer" />
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding ProjektNummer}" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Projektname" />
|
||||||
|
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ProjektNummer}" />
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding ProjektName}" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Button Content="Speichern" Command="{Binding SaveProjectCommand}" />
|
<Button Content="Speichern" Command="{Binding SaveProjectCommand}" />
|
||||||
|
|||||||
52
DaSaSo.Wpf/View/SewerObject/Controls/SewerDamage.xaml
Normal file
52
DaSaSo.Wpf/View/SewerObject/Controls/SewerDamage.xaml
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.Controls.SewerDamage"
|
||||||
|
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: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}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid Background="LightBlue">
|
||||||
|
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Border Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="Black" BorderThickness="3">
|
||||||
|
<TextBlock TextAlignment="Center" Text="Schaden" />
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="0" Grid.Row="1" BorderBrush="Black" BorderThickness="2,1" Margin="3">
|
||||||
|
<StackPanel>
|
||||||
|
<Label />
|
||||||
|
<Label Content="Rohrstatik schaden" />
|
||||||
|
<CheckBox Content="Riss" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Riss}" />
|
||||||
|
<CheckBox Content="Bruch" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Bruch}" />
|
||||||
|
<CheckBox Content="Scherbe" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Scherbe}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Column="1" Grid.Row="1" BorderBrush="Black" BorderThickness="1,2" Margin="3">
|
||||||
|
<StackPanel>
|
||||||
|
<Label Content="Rohr Betrieb Hinderniss" />
|
||||||
|
<CheckBox Content="Wurzeln" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Wurzel }"/>
|
||||||
|
<CheckBox Content="Inkrustation" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Inkrustation }" />
|
||||||
|
<CheckBox Content="Ablagerungen" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Ablagerungen}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Grid.Column="2" Grid.Row="1" BorderBrush="Black" BorderThickness="1,2" Margin="3">
|
||||||
|
<StackPanel>
|
||||||
|
<Label Content="Sonstiges" />
|
||||||
|
<CheckBox Content="Einragende Anschluss" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding EinrageneStutzen }" />
|
||||||
|
<CheckBox Content="Infiltration" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Infiltration }"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
DaSaSo.Wpf/View/SewerObject/Controls/SewerDamage.xaml.cs
Normal file
28
DaSaSo.Wpf/View/SewerObject/Controls/SewerDamage.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.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for SewerDamage.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SewerDamage : UserControl
|
||||||
|
{
|
||||||
|
public SewerDamage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.Controls.SewerDamagePreparation"
|
||||||
|
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.Controls" xmlns:controls="clr-namespace:DaSaSo.ViewModel.Controls;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=controls:SewerPreperationControllViewModel}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid Background="LightBlue">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.Row="0" BorderThickness="3" BorderBrush="Black">
|
||||||
|
<TextBlock Text="Vorbereitungen" TextAlignment="Center"/>
|
||||||
|
</Border>
|
||||||
|
<Border BorderBrush="Black" Grid.Row="1" BorderThickness="2" Margin="3">
|
||||||
|
<StackPanel>
|
||||||
|
<CheckBox Margin="5" Content="HD Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding HD}" />
|
||||||
|
<CheckBox Margin="5" Content="Mechanisch Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Mechanisch}" />
|
||||||
|
<CheckBox Margin="5" Content="Mit Roborter Gereinigt" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Roboter}" />
|
||||||
|
<CheckBox Margin="5" Content="Schadstelle Fäkalienfrei" Style="{StaticResource checkBoxCircleSmall}" IsChecked="{Binding Faekalienfrei}" />
|
||||||
|
<CheckBox Margin="5" Content="Genehmigung wurde eingeholt" Style="{StaticResource checkBoxCircleSmall}" />
|
||||||
|
<CheckBox Margin="5" Content="Wasserhaltung wurde eingerichtet" Style="{StaticResource checkBoxCircleSmall}" />
|
||||||
|
<CheckBox Margin="5" Content="Es wurde nach StVO abgesichert" Style="{StaticResource checkBoxCircleSmall}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -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.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for SewerDamagePreparation.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SewerDamagePreparation : UserControl
|
||||||
|
{
|
||||||
|
public SewerDamagePreparation()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
42
DaSaSo.Wpf/View/SewerObject/Controls/SewerRehabilation.xaml
Normal file
42
DaSaSo.Wpf/View/SewerObject/Controls/SewerRehabilation.xaml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.Controls.SewerRehabilation"
|
||||||
|
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.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border>
|
||||||
|
<local:SewerDamagePreparation />
|
||||||
|
</Border>
|
||||||
|
<Border Grid.Column="1" BorderBrush="Black" BorderThickness="2">
|
||||||
|
<Grid Grid.Column="1" Background="LightBlue">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="0" Content="Operator" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="1" Content="Datum" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="2" Content="Temperatur Aussen" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="3" Content="Temperatur Kanal" />
|
||||||
|
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="0" Margin="20" />
|
||||||
|
<!--<TextBox Grid.Column="1" Grid.Row="1" Margin="20" />-->
|
||||||
|
<DatePicker Grid.Column="1" Grid.Row="1" Margin="20" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="2" Margin="20" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="3" Margin="20" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
@@ -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.Controls
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for SewerRehabilation.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SewerRehabilation : UserControl
|
||||||
|
{
|
||||||
|
public SewerRehabilation()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
41
DaSaSo.Wpf/View/SewerObject/SewerDamageEditView.xaml
Normal file
41
DaSaSo.Wpf/View/SewerObject/SewerDamageEditView.xaml
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.SewerDamageEditView"
|
||||||
|
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: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}"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<selfControls:SewerDamage Grid.Column="0" Grid.Row="0" DataContext="{Binding damageControllViewModel}" Margin="3" />
|
||||||
|
<!--<selfControls:SewerDamagePreparation Grid.Column="1" Grid.Row="0" DataContext="{Binding preperationControllViewModel}" Margin="3" />-->
|
||||||
|
<Grid Grid.Row="1" Grid.Column="0">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="200" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Column="0" Grid.Row="0" Content="Entfernung" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Damage.Distance,StringFormat={}{0:#.##}}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<Button Grid.Column="1" Grid.Row="1" Content="Sanierung Zeigen" Command="{Binding Berechne}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
DaSaSo.Wpf/View/SewerObject/SewerDamageEditView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/SewerObject/SewerDamageEditView.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 SewerDamageEditView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SewerDamageEditView : UserControl
|
||||||
|
{
|
||||||
|
public SewerDamageEditView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,12 +2,37 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
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:SewerDamageListViewModel}"
|
xmlns:sd="clr-namespace:DaSaSo.Wpf.Sampledata"
|
||||||
mc:Ignorable="d"
|
xmlns:damagetype ="clr-namespace:DaSaSo.Domain.Model;assembly=DaSaSo.Domain"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
||||||
|
xmlns:converters="clr-namespace:DaSaSo.Wpf.Converters"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="1020">
|
||||||
|
<UserControl.Resources>
|
||||||
|
<converters:EqualDamageTypeToBooleanConverter x:Key="EqualDamageTypeToBooleanConverter" />
|
||||||
|
<converters:EqualPreperationTypeToBooleanConverter x:Key="EqualPreperationTypeToBooleanConverter" />
|
||||||
|
</UserControl.Resources>
|
||||||
|
<d:UserControl.DataContext>
|
||||||
|
<sd:SewerDamageListSampleData />
|
||||||
|
</d:UserControl.DataContext>
|
||||||
<Grid>
|
<Grid>
|
||||||
<DataGrid ItemsSource="{Binding Damages}" />
|
<StackPanel>
|
||||||
|
<DataGrid ItemsSource="{Binding Damages}" AutoGenerateColumns="False" IsReadOnly="True" SelectedItem="{Binding SelectedDamage}">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTextColumn Header="Entfernung" Binding="{Binding Distance}" />
|
||||||
|
<DataGridCheckBoxColumn Header="Statik (Riss / Bruch / Scherbe)" Binding="{Binding DamageType, Converter={StaticResource EqualDamageTypeToBooleanConverter}, ConverterParameter={x:Static damagetype:EDamageType.Static}}" />
|
||||||
|
<DataGridCheckBoxColumn Header="Betrieb (Wurzeln / Inkrustation / Ablagerungen)" Binding="{Binding DamageType, Converter={StaticResource EqualDamageTypeToBooleanConverter}, ConverterParameter={x:Static damagetype:EDamageType.Betrieb}}" />
|
||||||
|
<DataGridCheckBoxColumn Header="Sonstiges (Infiltration / Einragene Stutzen)" Binding="{Binding DamageType, Converter={StaticResource EqualDamageTypeToBooleanConverter}, ConverterParameter={x:Static damagetype:EDamageType.Other}}" />
|
||||||
|
|
||||||
|
|
||||||
|
<DataGridCheckBoxColumn Header="HD Reinigung" Binding="{Binding PreparationType, Converter={StaticResource EqualPreperationTypeToBooleanConverter}, ConverterParameter={x:Static damagetype:EPreparationType.CleanedHD}}" />
|
||||||
|
<DataGridCheckBoxColumn Header="Mechanisch gereinigt" Binding="{Binding PreparationType, Converter={StaticResource EqualPreperationTypeToBooleanConverter}, ConverterParameter={x:Static damagetype:EPreparationType.CleanedMechanisch}}" />
|
||||||
|
<DataGridCheckBoxColumn Header="Roboter" Binding="{Binding PreparationType, Converter={StaticResource EqualPreperationTypeToBooleanConverter}, ConverterParameter={x:Static damagetype:EPreparationType.CleanedRoboter}}" />
|
||||||
|
<DataGridCheckBoxColumn Header="Fäkalienfrei" Binding="{Binding PreparationType, Converter={StaticResource EqualPreperationTypeToBooleanConverter}, ConverterParameter={x:Static damagetype:EPreparationType.FaekalienFrei}}" />
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
<Button Content="Neue Schaden Aufnehmen" Command="{Binding AddNewDamage}" />
|
||||||
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -15,6 +15,12 @@
|
|||||||
<DataTemplate DataType="{x:Type viewmodel:SewerDamageListViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:SewerDamageListViewModel}">
|
||||||
<views:SewerDamageListView />
|
<views:SewerDamageListView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:SewerDamageEditViewModel}">
|
||||||
|
<views:SewerDamageEditView />
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:SewerPipeLinerViewModel}">
|
||||||
|
<views:SewerPipeLinerView />
|
||||||
|
</DataTemplate>
|
||||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
49
DaSaSo.Wpf/View/SewerObject/SewerPipeLinerView.xaml
Normal file
49
DaSaSo.Wpf/View/SewerObject/SewerPipeLinerView.xaml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.SewerPipeLinerView"
|
||||||
|
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:controls="clr-namespace:DaSaSo.Wpf.View.SewerObject.Controls"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Grid.Row="0">
|
||||||
|
<controls:SewerRehabilation />
|
||||||
|
</Border>
|
||||||
|
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="1">
|
||||||
|
<Grid Background="LightBlue">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="0" Content="Geschlossene Ende" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="1" Content="Preliner verwendet?" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="2" Content="Liner-Charge" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="3" Content="Lagerung Temperatur" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="4" Content="Temperatur beim Einbau" />
|
||||||
|
<Label Margin="20" Grid.Column="0" Grid.Row="5" Content="Einbaudruck" />
|
||||||
|
|
||||||
|
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="0" Margin="20" Content="Ja" />
|
||||||
|
<CheckBox Style="{StaticResource checkBoxCircleSmall}" Grid.Column="1" Grid.Row="1" Margin="20" Content="Ja" />
|
||||||
|
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="2" Margin="20" />
|
||||||
|
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="3" Margin="20" />
|
||||||
|
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="4" Margin="20" />
|
||||||
|
<TextBox BorderThickness="0" Grid.Column="1" Grid.Row="5" Margin="20" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
DaSaSo.Wpf/View/SewerObject/SewerPipeLinerView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/SewerObject/SewerPipeLinerView.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 Pipeliner.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SewerPipeLinerView : UserControl
|
||||||
|
{
|
||||||
|
public SewerPipeLinerView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -27,19 +27,22 @@
|
|||||||
<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>
|
||||||
<Label Grid.Column="0" Grid.Row="0" Content="Haltungsname" Margin="20" />
|
<Label Grid.Column="0" Grid.Row="0" Content="Sanierung ID" Margin="20" />
|
||||||
<Label Grid.Column="0" Grid.Row="1" Content="Punkt Oben" Margin="20" />
|
<Label Grid.Column="0" Grid.Row="1" Content="Haltungsname" Margin="20" />
|
||||||
<Label Grid.Column="0" Grid.Row="2" Content="Punkt Unten" Margin="20" />
|
<Label Grid.Column="0" Grid.Row="2" Content="Punkt Oben" Margin="20" />
|
||||||
<Label Grid.Column="0" Grid.Row="3" Content="Durchmesser" Margin="20" />
|
<Label Grid.Column="0" Grid.Row="3" Content="Punkt Unten" Margin="20" />
|
||||||
<Label Grid.Column="0" Grid.Row="4" Content="Material" Margin="20" />
|
<Label Grid.Column="0" Grid.Row="4" Content="Durchmesser" Margin="20" />
|
||||||
<Label Grid.Column="0" Grid.Row="5" Content="Leitungslänge" Margin="20" />
|
<Label Grid.Column="0" Grid.Row="5" Content="Material" Margin="20" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Haltungsname }" Margin="20" />
|
<Label Grid.Column="0" Grid.Row="6" Content="Leitungslänge" Margin="20" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Oberepunkt }" Margin="20" />
|
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Sanierungsid}" Margin="20" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Unterepunkt }" Margin="20" />
|
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Haltungsname }" Margin="20" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Durchmesser }" Margin="20" />
|
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Oberepunkt }" Margin="20" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Material }" Margin="20" />
|
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Unterepunkt }" Margin="20" />
|
||||||
<TextBox Grid.Column="1" Grid.Row="5" Text="{Binding Leitungslength }" Margin="20" />
|
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Durchmesser }" Margin="20" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="5" Text="{Binding Material }" Margin="20" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="6" Text="{Binding Leitungslength }" Margin="20" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Column="1">
|
<Grid Grid.Column="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -49,11 +52,14 @@
|
|||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="auto"/>
|
<RowDefinition Height="auto"/>
|
||||||
<RowDefinition Height="auto" />
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="Strasse" Margin="20" />
|
<Label Grid.Row="0" Grid.Column="0" Content="Strasse" Margin="20" />
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="Ort" Margin="20" />
|
<Label Grid.Row="1" Grid.Column="0" Content="Hausnummer" Margin="20" />
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="Ort" Margin="20" />
|
||||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Strasse}" Margin="20"/>
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Strasse}" Margin="20"/>
|
||||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Ort}" Margin="20"/>
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Hausnummer}" Margin="20" />
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Ort}" Margin="20"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Button Grid.Row="1" Grid.ColumnSpan="2" FontSize="20" Content="Speichern" Command="{Binding SaveCommand}" />
|
<Button Grid.Row="1" Grid.ColumnSpan="2" FontSize="20" Content="Speichern" Command="{Binding SaveCommand}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -26,8 +26,21 @@
|
|||||||
|
|
||||||
<DataTemplate DataType="{x:Type model:SewerObject}">
|
<DataTemplate DataType="{x:Type model:SewerObject}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<TextBlock Text="{Binding ObjektName}" />
|
<TextBlock Text="SanID [" />
|
||||||
<TextBlock Text="{Binding Material}" />
|
<TextBlock Text="{Binding SanNummer}" Foreground="Red" />
|
||||||
|
<TextBlock Text="] Hausnummer [" />
|
||||||
|
<TextBlock Text="{Binding Hausnummer}" Foreground="Red" />
|
||||||
|
<TextBlock Text="] Haltung [" />
|
||||||
|
<!--<TextBlock Text="[" />-->
|
||||||
|
<TextBlock Foreground="Blue" Text="{Binding ObjektName}" />
|
||||||
|
<TextBlock Text="] DN [" />
|
||||||
|
<TextBlock Text="{Binding DN}" Foreground="Blue" />
|
||||||
|
<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}">
|
||||||
|
|||||||
@@ -27,4 +27,39 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="checkBoxCircleSmall" TargetType="{x:Type CheckBox}">
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||||
|
<Setter Property="Margin" Value="0" />
|
||||||
|
<Setter Property="Content" Value="" />
|
||||||
|
<Setter Property="IsEnabled" Value="{Binding Change}" />
|
||||||
|
<Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}" />
|
||||||
|
<Setter Property="Foreground" Value="Black" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type CheckBox}">
|
||||||
|
<Grid>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Ellipse Name="outerEllipse" Grid.Column="0" Width="30" Height="30" StrokeThickness="2" Stroke="#FFFFFFFF" />
|
||||||
|
<Ellipse Name="highlightCircle" Grid.Column="0" Width="20" Height="20" Fill="#FFFFFFFF" />
|
||||||
|
<ContentPresenter Name="content" Grid.Column="1" Content="{TemplateBinding Content}" Margin="5,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
|
||||||
|
</Grid>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||||
|
<Setter TargetName="highlightCircle" Property="Shape.Fill" Value="BlueViolet" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="ToggleButton.IsChecked" Value="False">
|
||||||
|
<Setter TargetName="highlightCircle" Property="Shape.Fill" Value="#FFFFFF" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="UIElement.IsFocused" Value="True">
|
||||||
|
<Setter TargetName="outerEllipse" Property="Shape.Stroke" Value="BlueViolet" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -17,6 +17,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.InMemoryProvider", "
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.DatabaseConverter", "DaSaSo.DatabaseConverter\DaSaSo.DatabaseConverter.csproj", "{E0842F1A-E74D-4B84-BD27-3585901B0DE9}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DaSaSo.DatabaseConverter", "DaSaSo.DatabaseConverter\DaSaSo.DatabaseConverter.csproj", "{E0842F1A-E74D-4B84-BD27-3585901B0DE9}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C7F32A0F-BC57-43A4-8865-AC88C109676F}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.editorconfig = .editorconfig
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|||||||
Reference in New Issue
Block a user