public ActionResult QC(AppraiserUserQCViewModel qcViewModel, string nextStep, int? userId = null) { if (qcViewModel.EditUserId == 0) { qcViewModel.EditUserId = userId.HasValue ? userId.Value : 0; } if (ModelState.IsValid) { _appraiserUserService.SaveAppraiserQC(qcViewModel, User.Identity.Name); CommitProviderInstance.Commit(); return RedirectToStep(nextStep, qcViewModel.EditUserId, qcViewModel.IsOwnPage); } TempData[_appraiserQCKey] = qcViewModel; return RedirectToStep(NameHelper.AppraiserProfile.QC, qcViewModel.EditUserId, qcViewModel.IsOwnPage); }
private ActionResult GetQCView(AppraiserUserQCViewModel qcViewModel, int? userId) { ViewBag.Header = qcViewModel.SectionTitle; ViewBag.IsOwnPage = qcViewModel.IsOwnPage; ViewBag.CurrentStep = NameHelper.AppraiserProfile.QC; return View(NameHelper.AppraiserProfile.QC, GetViewModel(qcViewModel, userId)); }
public JsonResult SortAppraiserScoreList(AppraiserUserQCViewModel qc) { var result = new JsonResult(); var model = _appraiserUserService.GetAppraiserScoreHistory(User.Identity.Name, !qc.ScoreHistory.isSortingAsc, qc.EditUserId); var html = GetScoreHistoryAsString(model); result.Data = new { score = model.Score, html = html, isSortAsc = model.isSortingAsc }; return result; }
public ActionResult AddAppraiserScoreNote(AppraiserUserQCViewModel qc) { if (!string.IsNullOrEmpty(qc.NewNote)) { var model = _appraiserUserService.AddAppraiserScoreNote(qc, User.Identity.Name); CommitProviderInstance.Commit(); return PartialView("AppraiserTabs/QCNotesTable", model); } return new EmptyResult(); }
public JsonResult ApplyAppraiserScore(AppraiserUserQCViewModel qc) { var result = new JsonResult(); if (qc.ScoreHistory.Score.HasValue) { var model = _appraiserUserService.AddAppraiserScoreHistoryEntry(qc, User.Identity.Name); CommitProviderInstance.Commit(); var html = GetScoreHistoryAsString(model); result.Data = new { score = model.Score, html = html }; } return result; }