Ejemplo n.º 1
0
        public ActionResult UpdatePaper(Paper paper, int txtPaperId, string txtComments, string Reviewers)
        {
            int reviewerId = string.IsNullOrEmpty(Reviewers) ? -1 : int.Parse(Reviewers.Trim());

            _editor.PostComments(txtPaperId, txtComments, int.Parse(HttpContext.Session["UserId"].ToString()), reviewerId);
            TempData["PaperPostingFailed"] = "Comments posted successfully";

            paper = _editor.GetPaperDetails(txtPaperId);
            List <Users> reviewers = _review.GetAllReviewersForPaper(paper.PaperId);

            ViewData["Reviewers"] = new SelectList((System.Collections.IEnumerable)reviewers, "UserId", "FirstName");

            return(View("PaperDetails", paper));
        }
Ejemplo n.º 2
0
        public ActionResult GetPaperDetails(int id)
        {
            IEditor _editor = new Editor();
            Paper   paper   = new Paper();

            ActionResult result = this.ValidateReviewerToken();

            if (result != null)
            {
                return(result);
            }

            paper = _editor.GetPaperDetails(id);

            List <Users> reviewers = _review.GetAllReviewersForPaper(paper.PaperId);

            ViewData["ApproveStatus"] = new SelectList(
                new List <SelectListItem>
            {
                new SelectListItem {
                    Selected = true, Text = string.Empty, Value = "-1"
                },
                new SelectListItem {
                    Selected = false, Text = "Approved", Value = "Approved"
                },
                new SelectListItem {
                    Selected = false, Text = "Rejected", Value = "Rejected"
                },
            }, "Value", "Text", 1);

            return(View("PaperDetails", paper));
        }