MainviewModel erstellt

This commit is contained in:
Husky
2020-02-23 11:27:10 +01:00
parent ba431a8fba
commit 24ae7b517c
8 changed files with 159 additions and 55 deletions

View File

@@ -25,24 +25,33 @@ namespace KanSan
/// </summary>
public partial class MainWindow : Window
{
UI.UCKundeEdit UCKundeEdit;
UI.UCKundeList UCKundeList;
public MainWindow()
{
InitializeComponent();
this.DataContext = new MainWindowViewModel();
//this.Title = ProgrammHashVersion.GIT_HASH;
UCKundeList = new UI.UCKundeList();
UCKundeList.KundeAdded += UCKundeList_KundeAdded;
UCKundeList.KundeSelect += UCKundeList_KundeSelect;
}
private void UCKundeList_KundeSelect(object sender, UI.KundeAddedKlickEventArgs e)
{
(DataContext as MainWindowViewModel).SelectedKunde = e.kunde;
}
private void UCKundeList_KundeAdded(object sender, UI.KundeAddedKlickEventArgs e)
{
UI.UCKundeEdit uCKundeEdit = new UI.UCKundeEdit(e.kunde);
ContentController.Content = uCKundeEdit;
UCKundeEdit = new UI.UCKundeEdit(e.kunde);
ContentController.Content = UCKundeEdit;
}
private void btnKunden_Click(object sender, RoutedEventArgs e)
{
UI.UCKundeList uCKundeList = new UI.UCKundeList();
uCKundeList.KundeAdded += UCKundeList_KundeAdded;
ContentController.Content = uCKundeList;
ContentController.Content = UCKundeList;
}
}