public IActionResult Index(string groupId, int sectionId)
        {
            DoctrinaGroup          currentGroup   = _doctrinaGroupRepository.GetGroup(groupId);
            DoctrinaGroupSection   currentSection = _doctrinaGroupRepository.GetSection(sectionId);
            IList <DoctrinaScript> scripts        = _doctrinaGroupRepository.GetScripts(sectionId);

            SectionIndexViewModel model = new SectionIndexViewModel
            {
                Group          = currentGroup,
                CurrentSection = currentSection,
                Scripts        = scripts
            };

            return(View(model));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index(string id)
        {
            DoctrinaGroup  group = _doctrinaGroupRepository.GetGroup(id);
            GroupViewModel model = new GroupViewModel
            {
                Group    = group,
                Members  = new List <DoctrinaUser>(),
                Sections = _doctrinaGroupRepository.GetSections(id)
            };

            foreach (var userId in _doctrinaGroupRepository.GetGroupMemberIds(id))
            {
                var user = await _userManager.FindByIdAsync(userId);

                model.Members.Add(user);
            }

            return(View(model));
        }