72 lines
2.0 KiB
C#
72 lines
2.0 KiB
C#
using KanSan.Base.Models;
|
|
using KanSan.ViewModel;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
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
|
|
{
|
|
public static class CalendarCommands
|
|
{
|
|
public static RoutedCommand SelectToday = new RoutedCommand("Today", typeof(CalendarCommands));
|
|
}
|
|
/// <summary>
|
|
/// Interaktionslogik für UCTaetigkeitEdit.xaml
|
|
/// </summary>
|
|
public partial class UCTaetigkeitEdit : UserControl
|
|
{
|
|
public event EventHandler SpeichernClicked;
|
|
protected virtual void OnSpeichernClicked(EventArgs e)
|
|
{
|
|
EventHandler handler = SpeichernClicked;
|
|
if (handler != null)
|
|
handler(this, e);
|
|
}
|
|
|
|
public UCTaetigkeitEdit(Taetigkeiten taetigkeit)
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = new TaetigkeitEditViewModel(taetigkeit);
|
|
|
|
}
|
|
|
|
private void Speichern_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
(DataContext as TaetigkeitEditViewModel).Speichern();
|
|
OnSpeichernClicked(EventArgs.Empty);
|
|
}
|
|
|
|
private void SelectTodayExecuted(object target, ExecutedRoutedEventArgs e)
|
|
{
|
|
|
|
Calender.SelectedDate = DateTime.Now;
|
|
}
|
|
|
|
private void SelectTodayCanExecute(object target, CanExecuteRoutedEventArgs e)
|
|
{
|
|
e.CanExecute = true;
|
|
}
|
|
|
|
private void Güteschutzprotokoll_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void ErledigtLöschen_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
(DataContext as TaetigkeitEditViewModel).LöscheErledigt();
|
|
MessageBox.Show("Eintrag wurde als gelöscht Markiert");
|
|
}
|
|
}
|
|
}
|