/// <summary>
        /// Get All The Available Role Lists
        /// </summary>
        /// <returns></returns>
        public List <RoleDetailsLists> GetAvailableRoleLists()
        {
            var roleLists = _roleManagementRepository.GetAvailableRoleLists(StoredProcedureName);
            var roleGroup = roleLists.GroupBy(x => x.SubGroupName).Select(g => g.First()).ToList();
            List <RoleDetailsLists> roleDetailsLists = new List <RoleDetailsLists>();

            foreach (var group in roleGroup)
            {
                RoleDetailsLists roleDetailsList = new RoleDetailsLists();
                roleDetailsList.GroupName    = group.Group;
                roleDetailsList.SubGroupName = group.SubGroupName;
                roleDetailsList.RoleDetails  = roleLists.Where(x => x.SubGroupName == group.SubGroupName).ToList();
                roleDetailsLists.Add(roleDetailsList);
            }
            return(roleDetailsLists);
        }
        public RoleUpdateViewDetails GetRoleDetailsUpdate(string roleId)
        {
            roleId = _encryptionService.DecryptString(roleId);
            var roleDetails = _roleManagementRepository.GetRoleDetailsUpdate(roleId, StoredProcedureName);
            var roleLists   = roleDetails.Item1;
            var roleGroup   = roleLists.GroupBy(x => x.SubGroupName).Select(g => g.First()).ToList();
            List <RoleDetailsLists> roleDetailsLists = new List <RoleDetailsLists>();

            foreach (var group in roleGroup)
            {
                RoleDetailsLists roleDetailsList = new RoleDetailsLists();
                roleDetailsList.GroupName    = group.Group;
                roleDetailsList.SubGroupName = group.SubGroupName;
                roleDetailsList.RoleDetails  = roleLists.Where(x => x.SubGroupName == group.SubGroupName).ToList();
                roleDetailsLists.Add(roleDetailsList);
            }
            RoleUpdateViewDetails roleUpdateViewDetails = new RoleUpdateViewDetails();

            roleUpdateViewDetails.RoleLists     = roleDetailsLists;
            roleUpdateViewDetails.SelectedRoles = roleDetails.Item2;
            roleUpdateViewDetails.RoleId        = roleDetails.Item3.Id;
            roleUpdateViewDetails.RoleName      = roleDetails.Item3.Name;
            return(roleUpdateViewDetails);
        }