/// <summary> /// Assigns the selected role groups. /// </summary> /// <param name="reportPresenter">The report presenter.</param> private static void AssignSelectedRoleGroups(ReportPresenter reportPresenter) { IList<int> roleGroups = new List<int>(); if (string.IsNullOrEmpty(reportPresenter.SelectedRoleGroupsIds)) { roleGroups = reportPresenter.RoleGroupList.Select(item => (int)item.RoleGroupID).ToList(); } else { roleGroups = reportPresenter.SelectedRoleGroupsIds.Split(',').Select(id => Convert.ToInt32(id, CultureInfo.CurrentCulture)).ToList(); } reportPresenter.AssignSelectedRoleGroupList(roleGroups); }