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