43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using KanSan.Base.Models;
|
|
using KanSan.ViewModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace KanSan.UI
|
|
{
|
|
/// <summary>
|
|
/// Interaktionslogik für UCBaustelleEdit.xaml
|
|
/// </summary>
|
|
public partial class UCBaustelleEdit : UserControl
|
|
{
|
|
public event EventHandler SpeichernClicked;
|
|
public UCBaustelleEdit(Baustelle baustelle)
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = new BaustelleEditViewModel(baustelle);
|
|
}
|
|
protected virtual void OnSpeichernKlicked(EventArgs e)
|
|
{
|
|
EventHandler handler = SpeichernClicked;
|
|
if (handler != null)
|
|
handler(this, e);
|
|
}
|
|
|
|
private void Speichern_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
(DataContext as BaustelleEditViewModel).Speichern();
|
|
OnSpeichernKlicked(EventArgs.Empty);
|
|
}
|
|
}
|
|
}
|