Beispiel #1
0
 public CreationVisitorWindow(EntranceLoggerEntities dataSource)
 {
     InitializeComponent();
     DataContext = new CreationVisitorViewModel(dataSource)
     {
         CloseAction = OnClose
     };
     source = dataSource;
 }
Beispiel #2
0
 public CreationVisitorViewModel(EntranceLoggerEntities dataSource)
 {
     source    = dataSource;
     Employees = new List <EmployeeViewModel>();
     foreach (var item in dataSource.Employees)
     {
         if (item.IsActive)
         {
             Employees.Add(new EmployeeViewModel(item));
         }
     }
     AddCommand = new RelayCommand(OnAddCommand);
 }