Beispiel #1
0
        public async Task <List <AutoJobEntity> > GetPageList(AutoJobListParam param, Pagination pagination)
        {
            var expression = ListFilter(param);
            var list       = await this.BaseRepository().FindList(expression, pagination);

            return(list.ToList());
        }
Beispiel #2
0
        public async Task <TData <List <AutoJobEntity> > > GetList(AutoJobListParam param)
        {
            TData <List <AutoJobEntity> > obj = new TData <List <AutoJobEntity> >();

            obj.Result = await autoJobService.GetList(param);

            obj.TotalCount = obj.Result.Count;
            obj.Tag        = 1;
            return(obj);
        }
Beispiel #3
0
        public async Task <TData <List <AutoJobEntity> > > GetPageList(AutoJobListParam param, Pagination pagination)
        {
            TData <List <AutoJobEntity> > obj = new TData <List <AutoJobEntity> >();

            obj.Result = await autoJobService.GetPageList(param, pagination);

            obj.TotalCount = pagination.TotalCount;
            obj.Tag        = 1;
            return(obj);
        }
Beispiel #4
0
        private Expression <Func <AutoJobEntity, bool> > ListFilter(AutoJobListParam param)
        {
            var expression = LinqExtensions.True <AutoJobEntity>();

            if (param != null)
            {
                if (!string.IsNullOrEmpty(param.JobName))
                {
                    expression = expression.And(t => t.JobName.Contains(param.JobName));
                }
            }
            return(expression);
        }
        public async Task <IActionResult> GetPageListJson(AutoJobListParam param, Pagination pagination)
        {
            TData <List <AutoJobEntity> > obj = await autoJobBLL.GetPageList(param, pagination);

            return(Json(obj));
        }