private void Login_Click(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(Username.Text.Trim()) || string.IsNullOrEmpty(Password.Password)) { DisplayErrorMessage("نام کاربری یا رمز عبور وارد نشده است."); return; } try { HideErrorMessage(); var Result = AuthenticationCommand.FirstStepLogin(new Core.AppService.Contract.BindingModels.UserAuthenticationBindingModel() { Username = Username.Text, Password = Password.Password }); if (Result.StatusCode != StatusCode.Ok) { DisplayErrorMessage(Result.Message.Text); } else { SessionManagement.AccessToken = Result.Data; RedirectTo(new SecondStepLogin()); } } catch (Exception Ex) { DisplayErrorMessage(Ex.Message); } }
public ServiceResult <string> Post(UserAuthenticationBindingModel request) { return(_authenticationCommand.FirstStepLogin(request)); }