private async Task AddStyle() { var style = new StyleModel(Title, MotherCountry, Era); await _stylesManager.AddStyle(style); _customNavigationService.NavigateTo(PageKeys.StyleMain); }
private async Task AddArchitect() { var architect = new ArchitectModel( Name, Surname, Nationality, BirthYear, DeathYear); await _architectsManager.AddArchitect(architect); _customNavigationService.NavigateTo(PageKeys.ArchitectMain); }
private async void AddRepair() { var repair = new RepairModel(RestorationKind, Architecture.Id, RestorationDate.DateTime.Date, RestorationCost); await _repairsManager.AddRepair(repair); _customNavigationService.NavigateTo(PageKeys.RepairMain); }
private async Task AddArchitecture() { var architecture = new ArchitectureModel( Title, CreatedYear, Country, City, Address, Square, Heigth, State, Architect.Id, Style.Id); await _architecturesManager.AddArchitecture(architecture); _customNavigationService.NavigateTo(PageKeys.ArchitectureMain); }
private async Task AddSource() { var source = new SourceModel(SourceKind, Title, Author, CreationYear); source = await _sourcesManager.AddSource(source); await _sourcesManager.UpdateSource(source); _customNavigationService.NavigateTo(PageKeys.SourceAddArchitecture, source); }
private async void OnLoginExecute() { try { //Todo store login info in storage _dataService.Initialize(Username, Password); var isLogged = await _dataService.CheckCredentials(); if (isLogged) { await SaveUserInfos(); _navigationService.NavigateTo(typeof(RootPage)); } else { await _dialogService.ShowMessage("Votre mot de passe ou votre nom d'utilisateur est incorrect", "Erreur de connexion"); } } catch (UnauthorizedAccessException ex) { await _dialogService.ShowMessage("Votre mot de passe ou votre nom d'utilisateur est incorrect", "Erreur de connexion"); Debug.WriteLine(ex.Message); } catch (Exception ex) { await _dialogService.ShowMessage("Une erreur est survenue lors de la connexion aux serveurs", "Erreur de connexion"); Debug.WriteLine(ex.Message); } }
private async void CreateWorkplace() { try { IsBusy = true; await _workplacesManager.CreateWorkplace(Workplace); IsBusy = false; _customNavigationService.NavigateTo(PageKeys.WorkplacesMain); } catch (Exception ex) { HandleError(ex); } }
private async void OnLoading() { try { var userInfos = await GetUserInfos(); _dataService.Initialize(userInfos.UserName, userInfos.Password); var isCredentialOK = await _dataService.CheckCredentials(); _navigationService.NavigateTo(isCredentialOK ? typeof(RootPage) : typeof(LoginPage)); } catch { _navigationService.NavigateTo(typeof(LoginPage)); } }
private async void RemoveFriend() { try { IsBusy = true; await _friendsManager.RemoveFriendsLinkingWith(_personProfileId); IsBusy = false; await ShowMessage("Successfully deleted!"); _customNavigationService.NavigateTo(PageKeys.FriendsList); } catch (Exception ex) { HandleError(ex); } }
private async Task UpdateRestoration() { _restoration.RestorationKind = RestorationKind; _restoration.Periodicity = Periodicity; _restoration.Outlays = Outlays; await _restorationManager.UpdateRestoration(_restoration); _customNavigationService.NavigateTo(PageKeys.RestorationMain); }
public void EditRepair(RepairModel itemToEdit) { _customNavigationService.NavigateTo(PageKeys.RepairAdd, itemToEdit); }
public void EditSource(SourceModel itemToEdit) { _customNavigationService.NavigateTo(PageKeys.SourceAdd, itemToEdit); }
public void EditRestoration(RestorationModel itemToEdit) { _customNavigationService.NavigateTo(PageKeys.RestorationUpdate, itemToEdit); }
private void NavigateTo(PageKeys pageKey) { _customNavigationService.NavigateTo(pageKey); }
public void EditArchitecture(ArchitectureModel itemToEdit) { _customNavigationService.NavigateTo(PageKeys.ArchitectureAdd, itemToEdit); }
public void EditWorkplace(Workplace workplace) { _customNavigationService.NavigateTo(PageKeys.WorkplacesEdit, workplace); }
private void EditProfile() { _customNavigationService.NavigateTo(PageKeys.ProfileCreating, Profile); }