public PagingEntity<FullUser> QueryPaging(FullUserQueryForm form) { form.IsDeleted = 0; PagingEntity<FullUser> result = new PagingEntity<FullUser>(); result.Record = bll.Query(form); result.RecordCount = bll.QueryCount(form); return result; }
public List<FullUser> SimpleQuery(FullUserQueryForm form) { ISqlMapper mapper = MapperHelper.GetMapper(); UserDao dao = new UserDao(mapper); return dao.QueryFullUser(form); }
public int QueryCount(FullUserQueryForm form) { ISqlMapper mapper = MapperHelper.GetMapper(); UserDao dao = new UserDao(mapper); return dao.QueryFullUserCount(form); }
public List<FullUser> Query(FullUserQueryForm form) { ISqlMapper mapper = MapperHelper.GetMapper(); UserDao dao = new UserDao(mapper); User_RoleDao urdao = new User_RoleDao(mapper); RoleDao roledao = new RoleDao(mapper); var users = dao.QueryFullUser(form); var userids = (from u in users select u.ID).ToList(); var urs = urdao.Query(new User_RoleQueryForm { UserIDs = userids }); var roleids = (from ur in urs select ur.RoleID).Distinct().ToList(); var roles = roledao.Query(new RoleQueryForm { IDs = roleids }); foreach (var u in users) { u.Roles = (from ur in urs join role in roles on ur.RoleID equals role.ID where ur.UserID.Equals(u.ID) select role).ToList(); } return users; }
public List<FullUser> Query(FullUserQueryForm form) { form.IsDeleted = 0; return bll.Query(form); }