Exemple #1
0
        public List <Role> GetAllRole()
        {
            RoleDal roleDal = new RoleDal();

            roleDal.GetAll();
            roleDal.ReturnUnitToPool();
            return(roleDal.list_Role);
        }
Exemple #2
0
        private void userRolesWindow_Loaded(object sender, RoutedEventArgs e)
        {
            RoleDal roles = new RoleDal(RoleUtil.connString);

            RoleUtil.appRoles      = roles.GetAll();
            RoleUtil.appRolesCodes = RoleUtil.appRoles.Select(s => s.RoleCode).ToList();
            //lstUnassignedRoles.ItemsSource = RoleUtil.AppRolesCodes;
            LoadUsersIntoUI();
        }
Exemple #3
0
        /// <summary>
        /// Get list role
        /// </summary>
        /// <param name="objContex">Get table to object</param>
        /// <returns></returns>
        public static List <RoleDto> GetAll(ModelUnibookContainer objContex)
        {
            try
            {
                List <RoleDto> roleList = new List <RoleDto>();
                foreach (var item in RoleDal.GetAll(objContex))
                {
                    roleList.Add(RoleBrl.GetDto(item.RoleId, objContex));
                }

                return(roleList);
            }
            catch (DbEntityValidationException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
        public void TestMethod5()
        {
            List <Role> roleList = roleDal.GetAll();

            Assert.AreEqual(8, roleList.Count);
        }
Exemple #5
0
 public IEnumerable <Role> GetAllRole() => _roleDal.GetAll <Role>();
 public IEnumerable <Role> GetAll()
 {
     return(roleDal.GetAll());
 }
Exemple #7
0
 //获取全部
 public DataTable GetAll()
 {
     return(dal.GetAll());
 }