public ActionResult Edit(long id)
        {
            var academicRank = _academicRankRepository.GetById(id);
            var model        = Mapper.Map <AcademicRank, AcademicRankCatalogEditModel>(academicRank);

            model.PossibleParent = _academicRankRepository
                                   .GetPossibleParents()
                                   .Select(pp => new SelectListItem
            {
                Text  = pp.Title,
                Value = pp.AcademicRankID.ToString()
            });
            return(View(model));
        }
Esempio n. 2
0
        public ActionResult Delete(long ID)
        {
            var academicRank = _academicRankRepository.GetById(ID);

            _academicRankRepository.Delete(academicRank);
            return(Json(new IDJson <long> {
                ID = ID, Status = EntityStatus.SUCCESS, Text = "Успешно удалено!"
            }));
        }