Пример #1
0
        public IActionResult Content(int id)
        {
            var kra    = _Services.GetKeyResultAreaById(id);
            var result = _Services.SuccessIndicatorPerKRA(id).Select
                         (
                a => new KeySuccessIndicatorViewModel
            {
                Id          = a.Id,
                Title       = a.Title,
                Description = a.Description,
                Weight      = a.Weight
            }
                         ).ToList();

            var RatingTables = _Services.GetRatingTables().Select(a => new RatingTableViewModel
            {
                Id          = a.Id,
                Description = a.Description
            }).ToList();
            var item = new KeyResultAreaContentViewModel
            {
                KeyResultAreaId   = kra.Id,
                Title             = kra.Title,
                Description       = kra.Description,
                SuccessIndicators = result,
                RatingTables      = RatingTables,
            };

            return(View(item));
        }