Пример #1
0
        private void StudentsBiographicalInformationIsEdited()
        {
            _newBiographicalInformation = new StudentBiographicalInformationModelBuilder().Build();
            var profileModel = new ProfileModel {
                BiographicalInfo = _newBiographicalInformation
            };

            _profilePage.EditBiographicalInfo(profileModel);
        }
Пример #2
0
        public bool EditedBiographicalInformationIsVisable(EditableStudentBiographicalInfoModel newBiographicalInformation)
        {
            WaitFor.AjaxCallsToComplete();
            var sex      = Browser.PageSource.Contains(newBiographicalInformation.Sex.Humanize());
            var birthday = Browser.PageSource.Contains(newBiographicalInformation.BirthDate);
            var latino   = Browser.PageSource.Contains(newBiographicalInformation.HispanicLatinoEthnicity.ToString());
            var race     = Browser.PageSource.Contains(newBiographicalInformation.Race.Humanize());
            var language = Browser.PageSource.Contains(newBiographicalInformation.HomeLanguage.ToString());

            return(sex && birthday && language && latino && race);
        }
Пример #3
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));
        }