Exemplo n.º 1
0
		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);
		}
Exemplo n.º 2
0
		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));
		}
Exemplo n.º 3
0
		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;
		}
Exemplo n.º 4
0
		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();
		}
Exemplo n.º 5
0
		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;
		}