private async void AddTrip(object sender, RoutedEventArgs e) { if (Validate()) { if (await AddTripViewModel.AddTrip(AddTripName.Text, AddTripLocation.Text, AddTripStartDate.Date.Value.DateTime, AddTripEndDate.Date.Value.DateTime) != null) { ToastService.MakeToast(string.Format(ResourceLoader.GetString("AddTripCreated"), AddTripName.Text)); Frame.Navigate(typeof(TripOverview)); } } }
private async void RegisterUser(object sender, RoutedEventArgs e) { if (Validate()) { if (await ValidateEmail()) { if (await RegisterViewModel.Register(RegisterEmail.Text, RegisterPassword.Password, RegisterFirstname.Text, RegisterLastname.Text) == "SUCCESS") { Frame.Navigate(typeof(Login)); ToastService.MakeToast(string.Format(ResourceLoader.GetString("RegisterAccountCreated"), RegisterEmail.Text)); } } } }