Esempio n. 1
0
        public ActionResult Review(string companyReview, string companyStars)
        {
            if (Globals.isLoggedIn() == false)
            {
                return(RedirectToAction("Index", "Authentication"));
            }

            ServiceBusConnection connection = ConnectionManager.getConnectionObject(Globals.getUser());

            if (connection == null)
            {
                return(RedirectToAction("Index", "Authentication"));
            }
            DateTime now = DateTime.Now;
            AddCompanyReviewRequest request  = new AddCompanyReviewRequest(new Review(companyNameeeee, companyReview, companyStars, now.ToString(), Globals.getUser()));
            ServiceBusResponse      response = connection.addCompanyReview(request);

            //Can check if result is true here or just redirect to displaycompany and reload page

            return(RedirectToAction("Index"));
        }