Datenschnittstelle erweitert
This commit is contained in:
@@ -23,6 +23,7 @@ namespace ConsoleApplication
|
|||||||
var manager = kernel.Get<IAuftraggeberManager>();
|
var manager = kernel.Get<IAuftraggeberManager>();
|
||||||
var baustellen = kernel.Get<IBaustelleManager>();
|
var baustellen = kernel.Get<IBaustelleManager>();
|
||||||
|
|
||||||
|
/*
|
||||||
Auftraggeber auftraggeber = new Auftraggeber();
|
Auftraggeber auftraggeber = new Auftraggeber();
|
||||||
auftraggeber.Baustellen = new List<Bauvorhaben>();
|
auftraggeber.Baustellen = new List<Bauvorhaben>();
|
||||||
auftraggeber.Baustellen.Add(new Bauvorhaben()
|
auftraggeber.Baustellen.Add(new Bauvorhaben()
|
||||||
@@ -37,7 +38,7 @@ namespace ConsoleApplication
|
|||||||
auftraggeber.Strasse = "Schlachthofstraße 42";
|
auftraggeber.Strasse = "Schlachthofstraße 42";
|
||||||
|
|
||||||
manager.Add(auftraggeber);
|
manager.Add(auftraggeber);
|
||||||
|
*/
|
||||||
var auftragger = manager.GetAllAuftraggeber();
|
var auftragger = manager.GetAllAuftraggeber();
|
||||||
var bau = baustellen.GetAllBauvorhaben();
|
var bau = baustellen.GetAllBauvorhaben();
|
||||||
|
|
||||||
|
|||||||
@@ -8,5 +8,6 @@ namespace DichtheitManagement.Contract
|
|||||||
{
|
{
|
||||||
IQueryable<Auftraggeber> GetAllAuftraggeber();
|
IQueryable<Auftraggeber> GetAllAuftraggeber();
|
||||||
void Add(Auftraggeber auftraggeber);
|
void Add(Auftraggeber auftraggeber);
|
||||||
|
void Update(Auftraggeber update);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,5 +10,8 @@ namespace DichtheitManagement.Contract
|
|||||||
{
|
{
|
||||||
IQueryable<Bauvorhaben> GetAllBauvorhaben();
|
IQueryable<Bauvorhaben> GetAllBauvorhaben();
|
||||||
void Add(Bauvorhaben bauvorhaben);
|
void Add(Bauvorhaben bauvorhaben);
|
||||||
|
Bauvorhaben GetBauvorhaben(int id);
|
||||||
|
List<Bauvorhaben> GetBauvorhaben(Auftraggeber auftraggeber);
|
||||||
|
void Update(Bauvorhaben bauvorhaben);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,12 @@ namespace DichtheitManagement
|
|||||||
|
|
||||||
public IQueryable<Auftraggeber> GetAllAuftraggeber()
|
public IQueryable<Auftraggeber> GetAllAuftraggeber()
|
||||||
{
|
{
|
||||||
return _repository.Query.Where(p => p.Id >= 0);
|
return _repository.Get(includeProperties: "Baustellen,Baustellen.Prüfobjekte").Where(p => p.Id >= 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(Auftraggeber update)
|
||||||
|
{
|
||||||
|
_repository.Update(update);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,22 @@ namespace DichtheitManagement
|
|||||||
|
|
||||||
public IQueryable<Bauvorhaben> GetAllBauvorhaben()
|
public IQueryable<Bauvorhaben> GetAllBauvorhaben()
|
||||||
{
|
{
|
||||||
return _repository.Get(includeProperties: "Auftraggeber");
|
return _repository.Get(includeProperties: "Auftraggeber,Prüfobjekte");
|
||||||
|
}
|
||||||
|
|
||||||
|
public Bauvorhaben GetBauvorhaben(int id)
|
||||||
|
{
|
||||||
|
return _repository.Get().Where(s => s.Id == id).FirstOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Bauvorhaben> GetBauvorhaben(Auftraggeber auftraggeber)
|
||||||
|
{
|
||||||
|
return _repository.Get().Where(s => s.Auftraggeber == auftraggeber).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(Bauvorhaben bauvorhaben)
|
||||||
|
{
|
||||||
|
_repository.Update(bauvorhaben);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 16.0.31019.35
|
VisualStudioVersion = 17.1.31911.260
|
||||||
MinimumVisualStudioVersion = 15.0.26124.0
|
MinimumVisualStudioVersion = 15.0.26124.0
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DPGetDataContract", "DPGetDataContract\DPGetDataContract.csproj", "{FEAFDFF0-4E0F-4C3F-AA04-3DB55FE40EEF}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DPGetDataContract", "DPGetDataContract\DPGetDataContract.csproj", "{FEAFDFF0-4E0F-4C3F-AA04-3DB55FE40EEF}"
|
||||||
EndProject
|
EndProject
|
||||||
@@ -29,11 +29,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DichtheitManagement.Contrac
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mappings", "Mappings\Mappings.csproj", "{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mappings", "Mappings\Mappings.csproj", "{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuiWPF_ViewModel", "GuiWPF_ViewModel\GuiWPF_ViewModel.csproj", "{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DichtheitsprüfungTerminal", "DichtheitsprüfungTerminal\DichtheitsprüfungTerminal.csproj", "{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DichtheitsprüfungTerminal", "DichtheitsprüfungTerminal\DichtheitsprüfungTerminal.csproj", "{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataGenTests", "DataGenTests\DataGenTests.csproj", "{88B9FEA8-6E47-4987-A8FA-2E68628690E1}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataGenTests", "DataGenTests\DataGenTests.csproj", "{88B9FEA8-6E47-4987-A8FA-2E68628690E1}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{29CAE66D-C5A2-4963-A78A-CEB5E5033224}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{29CAE66D-C5A2-4963-A78A-CEB5E5033224}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
@@ -206,18 +204,6 @@ Global
|
|||||||
{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}.Release|x64.Build.0 = Release|Any CPU
|
{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}.Release|x86.ActiveCfg = Release|Any CPU
|
{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}.Release|x86.Build.0 = Release|Any CPU
|
{CB3C8585-E6B2-42AC-BED6-9924E7CDC355}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{AEE0E978-875E-4BF4-B5D5-CF8D85E227CE}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
{DA1AF5F2-BBF9-4F0E-ACD2-8E10264CFB9C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
using System;
|
using DichtheitManagement.Contract;
|
||||||
|
using GuiWPF.ViewModel;
|
||||||
|
using Mappings;
|
||||||
|
using Ninject;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
using System.Configuration;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -16,8 +20,16 @@ namespace GuiWPF
|
|||||||
protected override void OnStartup(StartupEventArgs e)
|
protected override void OnStartup(StartupEventArgs e)
|
||||||
{
|
{
|
||||||
base.OnStartup(e);
|
base.OnStartup(e);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if !DEBUG
|
||||||
|
MessageBox.Show("Kein gültiger Lizenz gefunden!");
|
||||||
|
Environment.Exit(0);
|
||||||
|
#else
|
||||||
var window = new MainWindow() { DataContext = new MainWindowViewModel() };
|
var window = new MainWindow() { DataContext = new MainWindowViewModel() };
|
||||||
window.Show();
|
window.Show();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,11 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\GuiWPF_ViewModel\GuiWPF_ViewModel.csproj" />
|
<PackageReference Include="Ninject" Version="3.3.5" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Mappings\Mappings.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,5 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup />
|
<PropertyGroup />
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Compile Update="Views\AuftraggeberListPageView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Views\AuftraggeberEditPage.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Views\BauvorhabenEditPageView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Update="Views\SewerObjectDetailsPageView.xaml.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Page Update="Views\AuftraggeberListPageView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Views\AuftraggeberEditPage.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Views\BauvorhabenEditPageView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
<Page Update="Views\SewerObjectDetailsPageView.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</Page>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -4,21 +4,38 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:GuiWPF"
|
xmlns:local="clr-namespace:GuiWPF"
|
||||||
|
xmlns:viewmodel="clr-namespace:GuiWPF.ViewModel"
|
||||||
|
xmlns:views="clr-namespace:GuiWPF.Views"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainWindow" Height="450" Width="800">
|
Title="MainWindow" Height="420" Width="1041">
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<DataTemplate DataType="{x:Type local:HomePageViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:HomePageViewModel}">
|
||||||
<local:HomePageView />
|
<views:HomePageView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type local:SettingsPageViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:SettingsPageViewModel}">
|
||||||
<local:SettingsPageView />
|
<views:SettingsPageView />
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:AuftraggeberListPageViewModel}">
|
||||||
|
<views:AuftraggeberListPageView />
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:AuftraggeberEditPageViewModel}">
|
||||||
|
<views:AuftraggeberEditPage />
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:SewerObjectDetailsPageViewModel}">
|
||||||
|
<views:SewerObjectDetailsPageView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<StackPanel DockPanel.Dock="Left">
|
<StackPanel DockPanel.Dock="Left">
|
||||||
<Button Content="Home Page" Command="{Binding Path=LoadHomePageCommand}" />
|
<!--<Button Content="Auftraggebers" Command="{Binding Path=LoadAuftraggeberListPageCommand}" />
|
||||||
|
<Button Content="Auftraggeber Editieren" Command="{Binding Path=LoadEditAuftraggeberPageCommand}" />
|
||||||
|
<Button Content="Home Page" Command="{Binding Path=LoadHomePageCommand}" />-->
|
||||||
<Button Content="Settings Page" Command="{Binding Path=LoadSettingsPageCommand}" />
|
<Button Content="Settings Page" Command="{Binding Path=LoadSettingsPageCommand}" />
|
||||||
|
<Button Content="Neue Prüfobjekt hinzufügen" Command="{Binding Path=AddNewInspektionsObjektCommand}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
<ListBox Name="Auftraggeber" ItemsSource="{Binding Path=AuftraggeberListe}" SelectedItem="{Binding Path=SelectedAuftraggeber}" />
|
||||||
|
<ListBox Name="Baustellen" ItemsSource="{Binding Path=BauvorhabenListe}" SelectedItem="{Binding Path=SelectedBauvorhaben}" />
|
||||||
|
<ListBox Name="Prüfobjekte" ItemsSource="{Binding Path=InspektionsobjekteListe}" SelectedItem="{Binding Path=SelectedSewerObject}" />
|
||||||
<ContentControl Content="{Binding Path=CurrentViewModel}" />
|
<ContentControl Content="{Binding Path=CurrentViewModel}" />
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -1,45 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows.Input;
|
|
||||||
|
|
||||||
namespace GuiWPF
|
|
||||||
{
|
|
||||||
public class MainWindowViewModel : ViewModelBase
|
|
||||||
{
|
|
||||||
public ICommand LoadHomePageCommand { get; private set; }
|
|
||||||
public ICommand LoadSettingsPageCommand { get; private set;}
|
|
||||||
|
|
||||||
private ViewModelBase _currentViewModel;
|
|
||||||
public ViewModelBase CurrentViewModel
|
|
||||||
{
|
|
||||||
get => _currentViewModel;
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_currentViewModel = value;
|
|
||||||
OnPropertyChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public MainWindowViewModel()
|
|
||||||
{
|
|
||||||
this.LoadHomePage();
|
|
||||||
this.LoadHomePageCommand = new DelegateCommand(o => this.LoadHomePage());
|
|
||||||
this.LoadSettingsPageCommand = new DelegateCommand(o => this.LoadSettingsPage());
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LoadHomePage()
|
|
||||||
{
|
|
||||||
CurrentViewModel = new HomePageViewModel(
|
|
||||||
new HomePage { PageTitle = "This is the Home Page" });
|
|
||||||
}
|
|
||||||
|
|
||||||
private void LoadSettingsPage()
|
|
||||||
{
|
|
||||||
CurrentViewModel = new SettingsPageViewModel(
|
|
||||||
new SettingsPage() { PageTitle = "This is the SettingsPage" });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
37
GuiWPF/ViewModel/AuftraggeberEditPageViewModel.cs
Normal file
37
GuiWPF/ViewModel/AuftraggeberEditPageViewModel.cs
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace GuiWPF.ViewModel
|
||||||
|
{
|
||||||
|
public class AuftraggeberEditPageViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
Models.Auftraggeber _model;
|
||||||
|
DichtheitManagement.Contract.IAuftraggeberManager _auftraggeberManager;
|
||||||
|
|
||||||
|
public string Name { get => _model.Name; set => _model.Name = value;}
|
||||||
|
public string Strasse { get => _model.Strasse; set => _model.Strasse = value; }
|
||||||
|
public string Ort { get => _model.Ort; set => _model.Ort = value;}
|
||||||
|
public string Telefon { get => _model.Tel; set => _model.Tel = value;}
|
||||||
|
|
||||||
|
public ICommand SaveCommand { get;private set;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public AuftraggeberEditPageViewModel(Models.Auftraggeber auftraggeber, DichtheitManagement.Contract.IAuftraggeberManager auftraggeberManager)
|
||||||
|
{
|
||||||
|
_model = auftraggeber;
|
||||||
|
_auftraggeberManager = auftraggeberManager;
|
||||||
|
|
||||||
|
SaveCommand = new DelegateCommand(o => this.SaveAuftraggeber());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SaveAuftraggeber()
|
||||||
|
{
|
||||||
|
_auftraggeberManager.Update(_model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
31
GuiWPF/ViewModel/AuftraggeberListPageViewModel.cs
Normal file
31
GuiWPF/ViewModel/AuftraggeberListPageViewModel.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using DichtheitManagement.Contract;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GuiWPF.ViewModel
|
||||||
|
{
|
||||||
|
public class AuftraggeberListPageViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
private IAuftraggeberManager auftraggeberManager;
|
||||||
|
|
||||||
|
public List<Models.Auftraggeber> Auftraggeberlist { get; set; }
|
||||||
|
/*public AuftraggeberListPageViewModel(IQueryable<Models.Auftraggeber> auftraggeberlist)
|
||||||
|
{
|
||||||
|
|
||||||
|
Auftraggeberlist = auftraggeberlist.ToList();
|
||||||
|
Auftraggeberlist.Last().Name = "Damian";
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
public AuftraggeberListPageViewModel(IAuftraggeberManager auftraggeberManager)
|
||||||
|
{
|
||||||
|
this.auftraggeberManager = auftraggeberManager;
|
||||||
|
Auftraggeberlist = auftraggeberManager.GetAllAuftraggeber().ToList();
|
||||||
|
//Auftraggeberlist.Last().Name = "Damian";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
26
GuiWPF/ViewModel/BauvorhabenEditPageViewModel.cs
Normal file
26
GuiWPF/ViewModel/BauvorhabenEditPageViewModel.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using DichtheitManagement.Contract;
|
||||||
|
using Mappings;
|
||||||
|
using Ninject;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GuiWPF.ViewModel
|
||||||
|
{
|
||||||
|
internal class BauvorhabenEditPageViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
public BauvorhabenEditPageViewModel()
|
||||||
|
{
|
||||||
|
var kernel = new StandardKernel();
|
||||||
|
new KernelInitializer().Initialize(kernel);
|
||||||
|
var baustellen = kernel.Get<IBaustelleManager>();
|
||||||
|
|
||||||
|
var s = baustellen.GetBauvorhaben(1);
|
||||||
|
s.Standort = "Timbuktu";
|
||||||
|
baustellen.Update(s);
|
||||||
|
OnPropertyChanged("BauvorhabenListe");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace GuiWPF
|
namespace GuiWPF.ViewModel
|
||||||
{
|
{
|
||||||
public class HomePageViewModel : ViewModelBase
|
public class HomePageViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
170
GuiWPF/ViewModel/MainWindowViewModel.cs
Normal file
170
GuiWPF/ViewModel/MainWindowViewModel.cs
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
using DichtheitManagement.Contract;
|
||||||
|
using Mappings;
|
||||||
|
using Ninject;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
|
namespace GuiWPF.ViewModel
|
||||||
|
{
|
||||||
|
public class MainWindowViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
public ICommand LoadHomePageCommand { get; private set; }
|
||||||
|
public ICommand LoadSettingsPageCommand { get; private set;}
|
||||||
|
public ICommand LoadAuftraggeberListPageCommand { get; private set; }
|
||||||
|
public ICommand LoadEditAuftraggeberPageCommand { get; private set; }
|
||||||
|
public ICommand AddNewInspektionsObjektCommand { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private Models.Auftraggeber _selectedAuftraggeber;
|
||||||
|
private Models.Bauvorhaben _selectedBauvorhaben;
|
||||||
|
private Models.Inspektionsobjekt _selectedsewerobject;
|
||||||
|
public List<Models.Auftraggeber> AuftraggeberListe { get => auftraggeberlist.ToList(); }
|
||||||
|
public List<Models.Bauvorhaben> BauvorhabenListe
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(SelectedAuftraggeber != null && SelectedAuftraggeber.Baustellen != null)
|
||||||
|
return SelectedAuftraggeber.Baustellen.ToList();
|
||||||
|
return new List<Models.Bauvorhaben>();
|
||||||
|
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public List<Models.Inspektionsobjekt> InspektionsobjekteListe
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if(SelectedAuftraggeber != null && SelectedBauvorhaben.Prüfobjekte != null)
|
||||||
|
return SelectedBauvorhaben.Prüfobjekte.ToList();
|
||||||
|
return new List<Models.Inspektionsobjekt>();
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Models.Bauvorhaben SelectedBauvorhaben
|
||||||
|
{
|
||||||
|
get => _selectedBauvorhaben;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(value != _selectedBauvorhaben)
|
||||||
|
{
|
||||||
|
_selectedBauvorhaben = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
InspektionsobjekteListe.Clear();
|
||||||
|
InspektionsobjekteListe = _selectedBauvorhaben.Prüfobjekte;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Models.Auftraggeber SelectedAuftraggeber
|
||||||
|
{
|
||||||
|
get => _selectedAuftraggeber;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(value != _selectedAuftraggeber)
|
||||||
|
{
|
||||||
|
_selectedAuftraggeber = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
BauvorhabenListe.Clear();
|
||||||
|
BauvorhabenListe = baustellenManager.GetBauvorhaben(SelectedAuftraggeber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Models.Inspektionsobjekt SelectedSewerObject
|
||||||
|
{
|
||||||
|
get => _selectedsewerobject;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if(value != _selectedsewerobject)
|
||||||
|
{
|
||||||
|
_selectedsewerobject = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
CurrentViewModel = new SewerObjectDetailsPageViewModel(SelectedSewerObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private ViewModelBase _currentViewModel;
|
||||||
|
private IQueryable<Models.Auftraggeber> auftraggeberlist = null;
|
||||||
|
|
||||||
|
private IAuftraggeberManager auftraggeberManager = null;
|
||||||
|
private IBaustelleManager baustellenManager = null;
|
||||||
|
|
||||||
|
private StandardKernel kernel = null;
|
||||||
|
public ViewModelBase CurrentViewModel
|
||||||
|
{
|
||||||
|
get => _currentViewModel;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_currentViewModel = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public MainWindowViewModel()
|
||||||
|
{
|
||||||
|
this.LoadHomePage();
|
||||||
|
this.LoadAuftraggeberListPageCommand = new DelegateCommand(o => this.LoadAuftraggeberListPage());
|
||||||
|
this.LoadEditAuftraggeberPageCommand = new DelegateCommand(o => this.LoadAuftraggeberEditPage());
|
||||||
|
this.LoadHomePageCommand = new DelegateCommand(o => this.LoadHomePage());
|
||||||
|
this.LoadSettingsPageCommand = new DelegateCommand(o => this.LoadSettingsPage());
|
||||||
|
this.AddNewInspektionsObjektCommand = new DelegateCommand(o => this.AddNewInspektionsObjekt());
|
||||||
|
|
||||||
|
kernel = new StandardKernel();
|
||||||
|
new KernelInitializer().Initialize(kernel);
|
||||||
|
auftraggeberManager = kernel.Get<IAuftraggeberManager>();
|
||||||
|
baustellenManager = kernel.Get<IBaustelleManager>();
|
||||||
|
|
||||||
|
|
||||||
|
auftraggeberlist = auftraggeberManager.GetAllAuftraggeber();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddNewInspektionsObjekt()
|
||||||
|
{
|
||||||
|
if (SelectedBauvorhaben.Prüfobjekte == null)
|
||||||
|
SelectedBauvorhaben.Prüfobjekte = new List<Models.Inspektionsobjekt>();
|
||||||
|
SelectedBauvorhaben.Prüfobjekte.Add(new Models.Inspektionsobjekt());
|
||||||
|
auftraggeberManager.Update(SelectedAuftraggeber);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadHomePage()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
CurrentViewModel = new HomePageViewModel(
|
||||||
|
new HomePage { PageTitle = "This is the Home Page" });
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadSettingsPage()
|
||||||
|
{
|
||||||
|
CurrentViewModel = new SettingsPageViewModel(
|
||||||
|
new SettingsPage() { PageTitle = "This is the SettingsPage" });
|
||||||
|
//auftraggeberManager.Update(auftraggeberlist.OrderBy(y => y.Id).Last());
|
||||||
|
BauvorhabenEditPageViewModel bauvorhaben = new BauvorhabenEditPageViewModel();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadAuftraggeberEditPage()
|
||||||
|
{
|
||||||
|
CurrentViewModel = new AuftraggeberEditPageViewModel(auftraggeberManager.GetAllAuftraggeber().OrderBy(y => y.Id).Last(),auftraggeberManager);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadAuftraggeberListPage()
|
||||||
|
{
|
||||||
|
CurrentViewModel = new AuftraggeberListPageViewModel(auftraggeberManager);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ using System.Linq;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace GuiWPF
|
namespace GuiWPF.ViewModel
|
||||||
{
|
{
|
||||||
public class SettingsPageViewModel : ViewModelBase
|
public class SettingsPageViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
51
GuiWPF/ViewModel/SewerObjectDetailsPageViewModel.cs
Normal file
51
GuiWPF/ViewModel/SewerObjectDetailsPageViewModel.cs
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
using Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GuiWPF.ViewModel
|
||||||
|
{
|
||||||
|
internal class SewerObjectDetailsPageViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
private Inspektionsobjekt _model;
|
||||||
|
|
||||||
|
public SewerObjectDetailsPageViewModel(Inspektionsobjekt selectedSewerObject)
|
||||||
|
{
|
||||||
|
this._model = selectedSewerObject;
|
||||||
|
}
|
||||||
|
#region getsetters
|
||||||
|
public string ObjektName
|
||||||
|
{
|
||||||
|
get => _model.Objektname;
|
||||||
|
set => _model.Objektname = value;
|
||||||
|
}
|
||||||
|
public string ObenName
|
||||||
|
{
|
||||||
|
get => _model.ObereSchacht;
|
||||||
|
set => _model.ObereSchacht = value;
|
||||||
|
}
|
||||||
|
public string UntenName
|
||||||
|
{
|
||||||
|
get => _model.UntereSchacht;
|
||||||
|
set => _model.UntereSchacht= value;
|
||||||
|
}
|
||||||
|
public decimal ObjektLength
|
||||||
|
{
|
||||||
|
get => _model.ObjektLänge;
|
||||||
|
set => _model.ObjektLänge = value;
|
||||||
|
}
|
||||||
|
public decimal Durchmesser
|
||||||
|
{
|
||||||
|
get => _model.Durchmesser;
|
||||||
|
set => _model.Durchmesser = value;
|
||||||
|
}
|
||||||
|
public string Bemerkung
|
||||||
|
{
|
||||||
|
get => _model.Bemerkung;
|
||||||
|
set => _model.Bemerkung = value;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
34
GuiWPF/Views/AuftraggeberEditPage.xaml
Normal file
34
GuiWPF/Views/AuftraggeberEditPage.xaml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<UserControl x:Class="GuiWPF.Views.AuftraggeberEditPage"
|
||||||
|
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:GuiWPF.Views"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" Content="Name" />
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" Content="Straße" />
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" Content="Ort" />
|
||||||
|
<Label Grid.Row="3" Grid.Column="0" Content="Telefon" />
|
||||||
|
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=Name}" />
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Strasse}" />
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding Path=Ort}" />
|
||||||
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Path=Telefon}" />
|
||||||
|
|
||||||
|
<Button Grid.Row="4" Grid.ColumnSpan="2" Content="Speichern" Command="{Binding Path=SaveCommand}" />
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
GuiWPF/Views/AuftraggeberEditPage.xaml.cs
Normal file
28
GuiWPF/Views/AuftraggeberEditPage.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 GuiWPF.Views
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for AuftraggeberEditPage.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AuftraggeberEditPage : UserControl
|
||||||
|
{
|
||||||
|
public AuftraggeberEditPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
15
GuiWPF/Views/AuftraggeberListPageView.xaml
Normal file
15
GuiWPF/Views/AuftraggeberListPageView.xaml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<UserControl x:Class="GuiWPF.Views.AuftraggeberListPageView"
|
||||||
|
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:GuiWPF"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800"
|
||||||
|
>
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Label>Auftraggebers</Label>
|
||||||
|
<ListBox ItemsSource="{Binding Auftraggeberlist}"></ListBox>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
29
GuiWPF/Views/AuftraggeberListPageView.xaml.cs
Normal file
29
GuiWPF/Views/AuftraggeberListPageView.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
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 GuiWPF.Views
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for AuftraggeberListPageView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class AuftraggeberListPageView : UserControl
|
||||||
|
{
|
||||||
|
public AuftraggeberListPageView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
12
GuiWPF/Views/BauvorhabenEditPageView.xaml
Normal file
12
GuiWPF/Views/BauvorhabenEditPageView.xaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<UserControl x:Class="GuiWPF.Views.BauvorhabenEditPageView"
|
||||||
|
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:GuiWPF.Views"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
GuiWPF/Views/BauvorhabenEditPageView.xaml.cs
Normal file
28
GuiWPF/Views/BauvorhabenEditPageView.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 GuiWPF.Views
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for BauvorhabenEditPageView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class BauvorhabenEditPageView : UserControl
|
||||||
|
{
|
||||||
|
public BauvorhabenEditPageView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<UserControl x:Class="GuiWPF.HomePageView"
|
<UserControl x:Class="GuiWPF.Views.HomePageView"
|
||||||
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"
|
||||||
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace GuiWPF
|
namespace GuiWPF.Views
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaktionslogik für HomePageView.xaml
|
/// Interaktionslogik für HomePageView.xaml
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
<UserControl x:Class="GuiWPF.SettingsPageView"
|
<UserControl x:Class="GuiWPF.Views.SettingsPageView"
|
||||||
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"
|
||||||
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
|||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
|
||||||
namespace GuiWPF
|
namespace GuiWPF.Views
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaktionslogik für SettingsPageView.xaml
|
/// Interaktionslogik für SettingsPageView.xaml
|
||||||
36
GuiWPF/Views/SewerObjectDetailsPageView.xaml
Normal file
36
GuiWPF/Views/SewerObjectDetailsPageView.xaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<UserControl x:Class="GuiWPF.Views.SewerObjectDetailsPageView"
|
||||||
|
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:GuiWPF.Views"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
<RowDefinition Height="auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="auto" />
|
||||||
|
<ColumnDefinition Width="auto" MinWidth="400" />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Label Grid.Column="0" Grid.Row="0" Content="Objektname" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="1" Content="Obere Schacht" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="2" Content="Untere Schacht" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="3" Content="Objektlänge" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="4" Content="Durchmesser" />
|
||||||
|
<Label Grid.Column="0" Grid.Row="5" Content="Bemerkung" />
|
||||||
|
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding ObjektName}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding ObenName}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding UntenName}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding ObjektLength}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Durchmesser}" />
|
||||||
|
<TextBox Grid.Column="1" Grid.Row="5" Text="{Binding Bemerkung}" />
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
28
GuiWPF/Views/SewerObjectDetailsPageView.xaml.cs
Normal file
28
GuiWPF/Views/SewerObjectDetailsPageView.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 GuiWPF.Views
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for SewerObjectDetails.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class SewerObjectDetailsPageView : UserControl
|
||||||
|
{
|
||||||
|
public SewerObjectDetailsPageView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -11,5 +11,10 @@ namespace Models {
|
|||||||
public string Strasse {get;set;}
|
public string Strasse {get;set;}
|
||||||
public string Tel {get;set;}
|
public string Tel {get;set;}
|
||||||
public List<Bauvorhaben> Baustellen { get; set; }
|
public List<Bauvorhaben> Baustellen { get; set; }
|
||||||
|
|
||||||
|
override public string ToString()
|
||||||
|
{
|
||||||
|
return Name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,6 +10,11 @@ namespace Models {
|
|||||||
public string Standort { get; set; }
|
public string Standort { get; set; }
|
||||||
public string Strasse { get; set; }
|
public string Strasse { get; set; }
|
||||||
public string Ort { get; set; }
|
public string Ort { get; set; }
|
||||||
public IEnumerable<Inspektionsobjekt> Prüfobjekte { get; set; }
|
public List<Inspektionsobjekt> Prüfobjekte { get; set; }
|
||||||
|
|
||||||
|
override public string ToString()
|
||||||
|
{
|
||||||
|
return String.Format("{0} - {1}", Standort, Strasse);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,6 +16,10 @@ namespace Models
|
|||||||
public string Bemerkung { get; set; }
|
public string Bemerkung { get; set; }
|
||||||
|
|
||||||
public List<PressureTest> pressureTests { get; set; }
|
public List<PressureTest> pressureTests { get; set; }
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Objektname;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,23 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:4.0.30319.42000
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
|
|
||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("DataGen")]
|
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("DataGen")]
|
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("DataGen")]
|
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
|
||||||
|
|
||||||
// Generated by the MSBuild WriteCodeFragment class.
|
|
||||||
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
9113d0cf00bae8fabc242e3d8175fb5a59bf4d1d
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
is_global = true
|
|
||||||
build_property.RootNamespace = DataGen
|
|
||||||
build_property.ProjectDir = C:\Users\KFZ\Desktop\source\Dichtheitsprüfung_\DataGen\
|
|
||||||
Reference in New Issue
Block a user