Files
BeWoPlaner/BeWo/View/Controls/ServiceRecordPopUp.xaml.cs
2016-06-27 01:45:38 +02:00

31 lines
963 B
C#

using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using BeWo.ViewModel;
namespace BeWo.View.Controls
{
/// <summary>
/// Interaction logic for ServiceRecordPopUp.xaml
/// </summary>
public partial class ServiceRecordPopUp : UserControl
{
public ServiceRecordPopUp(List<ServiceRecordVM> serviceRecords)
{
this.InitializeComponent();
this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => BeWoApp.MainControl.CloseCurrentPopUp()));
this.DataContext = serviceRecords;
if (serviceRecords == null || serviceRecords.Count == 0)
{
this.serviceRecordGrid.Visibility = Visibility.Collapsed;
}
else
{
this.tb_nodata.Visibility = Visibility.Collapsed;
}
}
}
}