MainWindow Viewmodel erstellt
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user