public async void AddRateToUser(float rate) { if (ratingService.AddRateToUser(_selectedOffer.Driver.User.UserName, rate)) { await Application.Current.MainPage.DisplayAlert("Login failed!", "Check if username and password match or correct function is chosen!", "OK"); } else { await Application.Current.MainPage.DisplayAlert("Login failed!", "Check if username and password match or correct function is chosen!", "OK"); } }