public List <Role> GetAllRole() { RoleDal roleDal = new RoleDal(); roleDal.GetAll(); roleDal.ReturnUnitToPool(); return(roleDal.list_Role); }
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(); }
/// <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; } }
public void TestMethod5() { List <Role> roleList = roleDal.GetAll(); Assert.AreEqual(8, roleList.Count); }
public IEnumerable <Role> GetAllRole() => _roleDal.GetAll <Role>();
public IEnumerable <Role> GetAll() { return(roleDal.GetAll()); }
//获取全部 public DataTable GetAll() { return(dal.GetAll()); }