Esempio n. 1
0
        // GET: ReviewerSuggetion
        public ActionResult ReviewersSuggestions(int?id)
        {
            int[] roleIds = _manuscriptDBRepositoryReadSide.GetUserRoles(userID);
            if (roleIds.Count() > 0)
            {
                ViewBag.SearchList  = _manuscriptDBRepositoryReadSide.GetSearchList();
                ViewBag.JournalList = _manuscriptDBRepositoryReadSide.GetJournalList();
                ViewBag.RoleList    = _manuscriptDBRepositoryReadSide.GetUserRoleList(roleIds);
                ViewBag.TaskIDList  = _reviewerDBRepositoryReadSide.GetTaskIDList();
                ReviewerSuggestionVM msReviewerSuggestionVM;
                int reviewerID = id ?? default(int);

                if (_reviewerService._reviewerSuggetionBL == null)
                {
                    _reviewerService._reviewerSuggetionBL = new BAL.Manuscript.ReviewerSuggetionBL();
                }

                if (_reviewerService._reviewerSuggetionBL.msReviewerSuggestionDBRepositoryReadSide == null)
                {
                    _reviewerService._reviewerSuggetionBL.msReviewerSuggestionDBRepositoryReadSide = _reviewerDBRepositoryReadSide;
                }
                if (reviewerID == 0)
                {
                    msReviewerSuggestionVM = _reviewerService.GetManuscriptScreeningDefaultVM();
                }
                else
                {
                    msReviewerSuggestionVM = _reviewerService.GetManuscriptScreeningVM(reviewerID);
                }
                return(View(msReviewerSuggestionVM));
            }
            else
            {
                return(File("~/Views/Shared/Unauthorised.htm", "text/html"));
            }
        }