示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public List <HrsLeaveEntity> GetPaged(HrsLeaveQuery query, out int count)
 {
     throw new NotImplementedException();
 }