WPF dateiumbenennungen
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
</ApplicationDefinition>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="UI\Baustelle\WindowBaustelleEdit.xaml.cs">
|
||||
<Compile Update="UI\Projekt\WindowProjektEdit.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="UI\Kunde\UCKundeEdit.xaml.cs">
|
||||
@@ -18,7 +18,7 @@
|
||||
<Page Update="MainWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="UI\Baustelle\WindowBaustelleEdit.xaml">
|
||||
<Page Update="UI\Projekt\WindowProjektEdit.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="UI\Kunde\UCKundeEdit.xaml">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:KanSan.UI"
|
||||
mc:Ignorable="d"
|
||||
Title="FRMBaustelle" Height="450" Width="800" Closed="Window_Closed">
|
||||
Title="FRMBaustelle" Height="450" Width="800">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
@@ -29,7 +29,7 @@ namespace KanSan.UI
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.DataContext = new BaustelleViewModel();
|
||||
this.DataContext = new ProjektViewModel();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
using KanSan.Base;
|
||||
using KanSan.Base.Interfaces;
|
||||
using KanSan.Base.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.ViewModel
|
||||
{
|
||||
class BaustelleViewModel : PropertyChangedClass,INotifyPropertyChanged
|
||||
{
|
||||
private Projekt _baustelle;
|
||||
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
||||
|
||||
private string ort;
|
||||
private string strasse;
|
||||
private string projektnummer;
|
||||
public string Ort
|
||||
{
|
||||
get
|
||||
{
|
||||
return ort;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (ort == value) return;
|
||||
ort = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
public string Strasse
|
||||
{
|
||||
get
|
||||
{
|
||||
return strasse;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (strasse == value) return;
|
||||
strasse = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
public string Projektnummer
|
||||
{
|
||||
get
|
||||
{
|
||||
return projektnummer;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (projektnummer == value) return;
|
||||
projektnummer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public BaustelleViewModel()
|
||||
{
|
||||
_baustelle = unitOfWork.BaustellenRepository.Get().First();
|
||||
ort = _baustelle.Ort;
|
||||
strasse = _baustelle.Strasse;
|
||||
projektnummer = _baustelle.Projektnummer;
|
||||
}
|
||||
}
|
||||
}
|
||||
59
KanSan/ViewModel/ProjektViewModel.cs
Normal file
59
KanSan/ViewModel/ProjektViewModel.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using KanSan.Base;
|
||||
using KanSan.Base.Interfaces;
|
||||
using KanSan.Base.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan.ViewModel
|
||||
{
|
||||
class ProjektViewModel : PropertyChangedClass,INotifyPropertyChanged
|
||||
{
|
||||
private Projekt _baustelle;
|
||||
IUnitOfWork unitOfWork = new UnitOfWork(new KanSanContext());
|
||||
|
||||
|
||||
private string ortTeil;
|
||||
private string baustelleNummer;
|
||||
public string OrtTeil
|
||||
{
|
||||
get
|
||||
{
|
||||
return ortTeil;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (ortTeil == value) return;
|
||||
ortTeil = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public string BaustelleNummer
|
||||
{
|
||||
get
|
||||
{
|
||||
return baustelleNummer;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (baustelleNummer == value) return;
|
||||
baustelleNummer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ProjektViewModel()
|
||||
{
|
||||
_baustelle = unitOfWork.BaustellenRepository.Get().First();
|
||||
ortTeil = _baustelle.Ort;
|
||||
|
||||
baustelleNummer = _baustelle.Projektnummer;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user