public static ShooterCollection ToShooterCollection(this UiShooterCollection uiShooterCollection)
 {
     return(new ShooterCollection
     {
         ShooterCollectionId = uiShooterCollection.ShooterCollectionId,
         CollectionName = uiShooterCollection.CollectionName
     });
 }
 private void ExecuteDeleteShooterCollectionCommand(UiShooterCollection obj)
 {
     if (_windowService.ShowYesNoMessasge("Schützengruppe löschen",
                                          string.Format("Die Schützengruppe '{0}' wirklich löschen?", obj.CollectionName)))
     {
         _shooterCollectionDataStore.Delete(obj.ToShooterCollection());
         LoadData();
     }
 }
        private void ExecuteAssignShooterCommand(UiShooterCollection obj)
        {
            CollectionShooter collectionShooter = new CollectionShooter
            {
                ShooterId           = UiShooter.ShooterId,
                ShooterCollectionId = UiShooterCollection.ShooterCollectionId
            };

            _collectionShooterDataStore.Create(collectionShooter);
            _windowService.CloseEditShooterWindow();
        }
Пример #4
0
 public EditGroupViewModel()
 {
     if (!DesignTimeHelper.IsInDesignMode)
     {
     }
     else
     {
         UiShooterCollection = new UiShooterCollection
         {
             CollectionName = "fooCollection",
             Shooters       = new List <UiShooter>
             {
                 new UiShooter
                 {
                     FirstName = "alfred",
                     LastName  = "neumann"
                 }
             }
         };
     }
 }
 private bool CanExecuteAssignShooterCommand(UiShooterCollection obj)
 {
     return(obj != null && UiShooter != null);
 }
 private bool CanExecuteDeleteShooterCollectionCommand(UiShooterCollection obj)
 {
     return(obj != null);
 }