private async Task SignInCommandAsAdminAsync() { if (IsBusy) { return; } try { IsBusy = true; var centerService = new CenterService(); Result = await centerService.LoginCenter(Username, Password); if (Result) { Preferences.Set("CenterName", Username); await Application.Current.MainPage.Navigation.PushModalAsync(new CenterTabbedView()); } else { await Application.Current.MainPage.DisplayAlert("Error", "Invalid Username or Password", "OK"); } } catch (Exception ex) { await Application.Current.MainPage.DisplayAlert("Error", ex.Message, "OK"); } finally { IsBusy = false; } }