public LoginViewModel(IDataService dataService, IBHNavigationService bHNavigationService) { InputParams = new LoginInput { username = "", password = "" }; LoginCommand = new RelayCommand <LoginInput>(login, (LoginInput a) => true); _navigationService = bHNavigationService; }
private void login(LoginInput arg) { if (arg.username.Equals("admin") && arg.password.Equals("admin")) { _navigationService.NavigateTo("Main"); } else { MessageBox.Show("Login failed"); } }