ویومدل ویرایش ارزیابی از استاد
Inheritance: Decision.ViewModel.Common.BaseRowVersion
        public virtual async Task<ActionResult> Edit(EditEntireEvaluationViewModel viewModel)
        {
            if (!ModelState.IsValid)
            {
                return View(viewModel);
            }

            viewModel.Content = viewModel.Content.ToSafeHtml();
            viewModel.Brief = viewModel.Brief.ToSafeHtml();
            viewModel.StrongPoint = viewModel.StrongPoint.ToSafeHtml();
            viewModel.Foible = viewModel.Foible.ToSafeHtml();
            await _entireEvaluationService.EditAsync(viewModel);
            await _unitOfWork.SaveAllChangesAsync();
            return RedirectToAction(MVC.EntireEvaluation.List(viewModel.ApplicantId));

        }
 public async Task EditAsync(EditEntireEvaluationViewModel viewModel)
 {
     var entireEvaluation = await _entireEvaluations.FirstAsync(a => a.Id == viewModel.Id);
     _mappingEngine.Map(viewModel, entireEvaluation);
 }
 public async  Task FillEditViewModel(EditEntireEvaluationViewModel viewModel)
 {
     viewModel.Evaluators = await _appraiserService.GetAsSelectedListItem(viewModel.EvaluatorId);
 }
 public async Task EditAsync(EditEntireEvaluationViewModel viewModel)
 {
     var EntireEvaluation = await _entireEvaluations.FirstAsync(a => a.Id == viewModel.Id);
     _mappingEngine.Map(viewModel, EntireEvaluation);
     EntireEvaluation.LasModifierId = _userManager.GetCurrentUserId();
 }
        public virtual async Task<ActionResult> Edit(EditEntireEvaluationViewModel viewModel)
        {
            if (!_referentialTeacherService.CanManageTeacher(viewModel.TeacherId)) return HttpNotFound();

            if (!await _entireEvaluationService.IsInDb(viewModel.Id))
                this.AddErrors("Content", "ارزیابی مورد نظر توسط یکی از کاربران در شبکه،حذف شده است");

            if (!ModelState.IsValid)
            {
                await _entireEvaluationService.FillEditViewModel(viewModel);
                return View(viewModel);
            }

            viewModel.Content = viewModel.Content.ToSafeHtml();
            viewModel.Brief = viewModel.Brief.ToSafeHtml();
            viewModel.StrongPoint = viewModel.StrongPoint.ToSafeHtml();
            viewModel.Foible = viewModel.Foible.ToSafeHtml();
            await _entireEvaluationService.EditAsync(viewModel);
            var message = await _unitOfWork.ConcurrencySaveChangesAsync();
            if (message.HasValue())
                this.AddErrors("Content", string.Format(message, "ارزیابی"));

            if (ModelState.IsValid) return RedirectToAction(MVC.EntireEvaluation.List(viewModel.TeacherId));
            await _entireEvaluationService.FillEditViewModel(viewModel);
            return View(viewModel);
        }