public List <HrsLeaveEntity> QueryLeave(HrsLeaveQuery query) { var sqlQuery = (from leave in QuickRepository.GetAll <HrsLeaveEntity>() where leave.CreatedUserID == query.CreatedUserID orderby leave.ID descending select leave); var list = sqlQuery.ToList(); return(list); }
public ResponseResult <List <HrsLeaveEntity> > QueryLeave([FromBody] HrsLeaveQuery query) { var result = ResponseResult <List <HrsLeaveEntity> > .Default(); try { var hrsService = new HrsLeaveService(); var list = hrsService.QueryLeave(query); result = ResponseResult <List <HrsLeaveEntity> > .Success(list); } catch (System.Exception ex) { result = ResponseResult <List <HrsLeaveEntity> > .Error(ex.Message); } return(result); }
public List <HrsLeaveEntity> GetPaged(HrsLeaveQuery query, out int count) { throw new NotImplementedException(); }