Leistungsverzeichnisposition kann nun bearbeitet werden
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using KanSan.ViewModel;
|
||||
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;
|
||||
@@ -19,6 +21,7 @@ namespace KanSan.UI
|
||||
/// </summary>
|
||||
public partial class UCLeistungsverzeichnisPosList : UserControl
|
||||
{
|
||||
public event EventHandler<SelectedLeistungsverzeichnisEventArgs> LeistungsverzeichnisEdited;
|
||||
public UCLeistungsverzeichnisPosList()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -29,5 +32,28 @@ namespace KanSan.UI
|
||||
{
|
||||
(DataContext as LeistungsverzeichnisPositionenListViewModel).NeueLeistungsverzeichnisPosition();
|
||||
}
|
||||
|
||||
private void EditLVPosition_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
LeistungsverzeichnisPosition pos = (dgLeistungsverzeichnis.SelectedItem as LeistungsverzeichnisPosition);
|
||||
if (pos == null) return;
|
||||
OnClickLeistungsverzeichnisEdit(new SelectedLeistungsverzeichnisEventArgs()
|
||||
{
|
||||
LeistungsverzeichnisPosition = pos
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
protected virtual void OnClickLeistungsverzeichnisEdit(SelectedLeistungsverzeichnisEventArgs e)
|
||||
{
|
||||
EventHandler<SelectedLeistungsverzeichnisEventArgs> handler = LeistungsverzeichnisEdited;
|
||||
if (handler != null)
|
||||
handler(this, e);
|
||||
}
|
||||
}
|
||||
|
||||
public class SelectedLeistungsverzeichnisEventArgs : EventArgs
|
||||
{
|
||||
public LeistungsverzeichnisPosition LeistungsverzeichnisPosition { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user