Baustellen können nun angelegt und ausgewählt werden
This commit is contained in:
@@ -28,6 +28,7 @@ namespace KanSan
|
||||
UI.UCKundeEdit UCKundeEdit;
|
||||
UI.UCKundeList UCKundeList;
|
||||
UI.UCProjektList UCProjektList;
|
||||
UI.UCBaustelleList UCBaustelleList;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
@@ -92,6 +93,39 @@ namespace KanSan
|
||||
{
|
||||
ContentController.Content = "MainView";
|
||||
}
|
||||
|
||||
private void btnBaustellen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Projekt projekt = (DataContext as MainWindowViewModel).SelectedProjekt;
|
||||
if (projekt == null) return;
|
||||
UCBaustelleList = new UI.UCBaustelleList(projekt);
|
||||
UCBaustelleList.BaustelleAdded += UCBaustelleList_BaustelleAdded;
|
||||
UCBaustelleList.BaustelleEdited += UCBaustelleList_BaustelleEdited;
|
||||
UCBaustelleList.BaustelleSelected += UCBaustelleList_BaustelleSelected;
|
||||
ContentController.Content = UCBaustelleList;
|
||||
}
|
||||
|
||||
private void UCBaustelleList_BaustelleSelected(object sender, UI.SelectBaustelleEventArgs e)
|
||||
{
|
||||
(DataContext as MainWindowViewModel).SelectedBaustelle = e.baustelle;
|
||||
}
|
||||
|
||||
private void UCBaustelleList_BaustelleEdited(object sender, UI.SelectBaustelleEventArgs e)
|
||||
{
|
||||
if (e.baustelle == null) return;
|
||||
UI.UCBaustelleEdit uCBaustelleEdit = new UI.UCBaustelleEdit(e.baustelle);
|
||||
|
||||
uCBaustelleEdit.SpeichernClicked += Edit_SpeichernClicked;
|
||||
ContentController.Content = uCBaustelleEdit;
|
||||
|
||||
}
|
||||
|
||||
private void UCBaustelleList_BaustelleAdded(object sender, UI.SelectBaustelleEventArgs e)
|
||||
{
|
||||
/*if (e.baustelle == null) return;
|
||||
UI.UCBaustelleEdit uBaustelleEdit = new UI.UCBaustelleEdit(e.baustelle);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user