MainWindow Viewmodel erstellt

This commit is contained in:
Husky
2020-02-22 19:54:08 +01:00
parent 169cfb9830
commit ba431a8fba
10 changed files with 128 additions and 20 deletions

View File

@@ -15,6 +15,7 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using KanSan.Base;
using KanSan.Base.Models;
using KanSan.ViewModel;
using Microsoft.EntityFrameworkCore;
namespace KanSan
@@ -27,15 +28,8 @@ namespace KanSan
public MainWindow()
{
InitializeComponent();
this.Title = ProgrammHashVersion.GIT_HASH;
/*UI.UCKundeEdit uCKundeEdit = new UI.UCKundeEdit();
ContentController.Content = uCKundeEdit;*/
UI.UCKundeList uCKundeList = new UI.UCKundeList();
uCKundeList.KundeAdded += UCKundeList_KundeAdded;
ContentController.Content = uCKundeList;
this.DataContext = new MainWindowViewModel();
//this.Title = ProgrammHashVersion.GIT_HASH;
}
private void UCKundeList_KundeAdded(object sender, UI.KundeAddedKlickEventArgs e)
@@ -43,6 +37,13 @@ namespace KanSan
UI.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;
}
}
}