46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
// Copyright (c) 2017 schick Informatik
|
|
// Description: Darstellung einer Liste von NSW Fehlermeldungen in einem Grid
|
|
//
|
|
|
|
using System.Collections.Generic;
|
|
using System.Windows;
|
|
using System;
|
|
|
|
using bsmd.database;
|
|
using ENI2.Controls;
|
|
|
|
namespace ENI2.EditControls
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for ErrorListDialog.xaml
|
|
/// </summary>
|
|
public partial class ErrorListDialog : StatusWindowBase
|
|
{
|
|
|
|
public event Action<DatabaseEntity> ErrorSelected;
|
|
|
|
public ErrorListDialog()
|
|
{
|
|
InitializeComponent();
|
|
Loaded += ErrorListDialog_Loaded;
|
|
}
|
|
|
|
public List<MessageError> Errors
|
|
{
|
|
get { return this.dataGridErrors.ItemsSource as List<MessageError>; }
|
|
set { this.dataGridErrors.ItemsSource = value; }
|
|
}
|
|
|
|
private void ErrorListDialog_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
this.dataGridErrors.Initialize();
|
|
this.dataGridErrors.EditRequested += DataGridErrors_EditRequested;
|
|
}
|
|
|
|
private void DataGridErrors_EditRequested(DatabaseEntity obj)
|
|
{
|
|
this.ErrorSelected?.Invoke(obj);
|
|
}
|
|
}
|
|
}
|