public IActionResult Index()
        {
            var reviewers = _reviewerRepository.GetReviewers();

            if (reviewers.Count() <= 0)
            {
                ViewBag.Message = "Ther was a problem retrieving reviewers from " +
                                  "the database or no reviever exists";
            }
            return(View(reviewers));
        }
        public IActionResult Index()
        {
            var reviewers = _reviewerRepositoryGUI.GetReviewers();

            if (reviewers.Count() <= 0)
            {
                ViewBag.msg = "There was a problem retrieving reviewers from the Dtabase or the record does not exist";
            }

            return(View(reviewers));
        }
        public async Task <ActionResult> Index()
        {
            var reviewers = await _reviewerRepository.GetReviewers();

            if (reviewers.Count() <= 0)
            {
                ViewBag.Message = "Did not have any reviewers in database";
            }

            return(View(reviewers));
        }
        public IActionResult Index()
        {
            var reviewers = _reviewerRepository.GetReviewers();

            if (reviewers.Count() <= 0)
            {
                ViewBag.Message = "There was a problem retreving reviewers from the database or no reviewer exists";
            }

            ViewBag.SuccessMessage = TempData["SuccessMessage"];
            return(View(reviewers));
        }
        public IActionResult Index()
        {
            var reviewers = reviewerRepository.GetReviewers();

            if (reviewers.Count() <= 0)
            {
                ViewBag.Message = "There are problems retrieving reviewers " +
                                  " or reviewers not exist in the database.";
            }

            return(View(reviewers));
        }
示例#6
0
        public IViewComponentResult Invoke()
        {
            var reviewers = reviewerRepositoryGUI.GetReviewers().OrderBy(r => r.LastName)
                            .Select(x => new { Id = x.Id, Value = x.FirstName + " " + x.LastName });

            var reviewersList = new ReviewerSelectList
            {
                ReviewersList = new SelectList(reviewers, "Id", "Value")
            };

            return(View("_ReviewersList", reviewersList));
        }