public ActionResult Create(ActivityAssigneeGroupViewModel activityAssigneeGroupViewModel) { bool isSuperAdmin = User.IsInAnyRoles("SuperAdmin"); var organisationId = UserOrganisationId; if (ModelState.IsValid) { activityAssigneeGroupViewModel.ActivityAssigneeGroup.OrganisationId = organisationId; activityAssigneeGroupViewModel.ActivityAssigneeGroup = NidanBusinessService.CreateActivityAssigneeGroup(organisationId, activityAssigneeGroupViewModel.ActivityAssigneeGroup); return(RedirectToAction("Edit", "ActivityAssigneeGroup", new { id = activityAssigneeGroupViewModel.ActivityAssigneeGroup.ActivityAssigneeGroupId })); } activityAssigneeGroupViewModel.Centres = new SelectList(NidanBusinessService.RetrieveCentres(organisationId, e => isSuperAdmin || e.CentreId == UserCentreId).ToList()); activityAssigneeGroupViewModel.Personnels = new SelectList(NidanBusinessService.RetrievePersonnels(organisationId, e => true).Items.ToList()); return(View(activityAssigneeGroupViewModel)); }