Beispiel #1
0
        public async Task <int> OnPostReview()
        {
            var gender      = Gender;
            var age         = Age;
            var rating      = Rating;
            var postalCode  = PostalCode;
            var description = Description;

            ReviewerManager reviewerManager = new ReviewerManager();
            Reviewer        reviewer        = new Reviewer(gender, age, postalCode);

            reviewerManager.PostReviewer(reviewer);

            SurveyManager surveyManager = new SurveyManager();
            Survey        survey        = new Survey()
            {
                Id = 1, Rating = rating, Description = description
            };

            surveyManager.PostSurvey(survey);

            LocationManager locationManager = new LocationManager();
            await locationManager.PostLocation(postalCode, 1);

            return(rating);
        }
        public void OnPostReview()
        {
            //LocationManager locationManager = new LocationManager();
            //await locationManager.PostLocation(int.Parse(postalCode), 1);

            ReviewerManager reviewerManager = new ReviewerManager();
            Reviewer        reviewer        = new Reviewer(ReviewGender, ReviewAge, ReviewPostalCode);

            reviewerManager.PostReviewer(reviewer);

            SurveyManager surveyManager = new SurveyManager();
            Survey        survey        = new Survey()
            {
                Id = 1, Rating = ReviewRating, Description = ReviewDescription
            };

            surveyManager.PostSurvey(survey);

            RedirectToPage("/#");
        }