public AdministrationVM(IAdministrationServices service, IIOService ioService)
 {
     this.administrationService = service;
     this.ioService = ioService;
     this.currentArtistAdministration = new ArtistAdministrationVM(this.administrationService, ioService);
     this.currentCatagoryAdministration = new CatagoryAdministrationVM(this.administrationService);
     this.currentVenueAdministration = new VenueAdministrationVM(this.administrationService);
     this.currentPerformanceAdministration = new PerformanceAdministrationVM(this.administrationService);
     Login = new RelayCommand((c) =>
     {
         var box = c as PasswordBox;
         var password = box.Password;
         user = service.CheckUser(UserName, password);
         if(user != null)
         {
             LoggedIn = true;
             LoginFailedMessage = "";
             RaisePropertyChangedEvent(nameof(LoggedIn));
         }
         else
         {
             LoginFailedMessage = "UserId or Password is invalid";
             RaisePropertyChangedEvent(nameof(LoginFailedMessage));
         }
     });
 }
예제 #2
0
 public AdministrationVM(IAdministrationServices service, IIOService ioService)
 {
     this.administrationService            = service;
     this.ioService                        = ioService;
     this.currentArtistAdministration      = new ArtistAdministrationVM(this.administrationService, ioService);
     this.currentCatagoryAdministration    = new CatagoryAdministrationVM(this.administrationService);
     this.currentVenueAdministration       = new VenueAdministrationVM(this.administrationService);
     this.currentPerformanceAdministration = new PerformanceAdministrationVM(this.administrationService);
     Login = new RelayCommand((c) =>
     {
         var box      = c as PasswordBox;
         var password = box.Password;
         user         = service.CheckUser(UserName, password);
         if (user != null)
         {
             LoggedIn           = true;
             LoginFailedMessage = "";
             RaisePropertyChangedEvent(nameof(LoggedIn));
         }
         else
         {
             LoginFailedMessage = "UserId or Password is invalid";
             RaisePropertyChangedEvent(nameof(LoginFailedMessage));
         }
     });
 }