Пример #1
0
 private void StudentsBiographicalInformationIsEdited()
 {
     _newBiographicalInformation = new StudentBiographicalInformationModelBuilder().Build();
     var profileModel = new ProfileModel {BiographicalInfo = _newBiographicalInformation};
     _profilePage.EditBiographicalInfo(profileModel);
 }
Пример #2
0
        public virtual JsonResult EditBiographicalInfo(EditableStudentBiographicalInfoModel model)
        {
            if (!ModelState.IsValid)
            {
                var nglErrors = ModelState.GetNglErrors();
                return Json(new { nglErrors }, JsonRequestBehavior.AllowGet);
            }

            var student = _studentRepository.GetByUSI(model.StudentUsi);
            _studentBiographicalInfoToStudentMapper.Map(model, student);
           
            _repository.Save();

            TempData["ShowSuccess"] = true;
            return Json(true, JsonRequestBehavior.AllowGet);
        }