Example #1
0
        public ApiResultObject <List <Post> > GetResult(PcsPostFilterQuery filter)
        {
            ApiResultObject <List <Post> > result = null;

            try
            {
                bool valid = true;
                valid = valid && IsNotNull(param);
                valid = valid && IsNotNull(filter);
                List <Post> resultData = null;
                if (valid)
                {
                    resultData = new PcsPostGet(param).Get(filter);
                }
                result = this.PackResult(resultData);
                this.FailLog(result.Success, filter, result.Data);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Example #2
0
        public List <Post> GetByIds(List <long> ids)
        {
            List <Post> result = null;

            try
            {
                result = new PcsPostGet(param).GetByIds(ids);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Example #3
0
        public Post GetById(long id)
        {
            Post result = null;

            try
            {
                result = new PcsPostGet(param).GetById(id);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Example #4
0
        public List <Post> Get(PcsPostFilterQuery filter)
        {
            List <Post> result = null;

            try
            {
                result = new PcsPostGet(param).Get(filter);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Example #5
0
        public List <Post> GetByProjectId(long projectId)
        {
            List <Post> result = null;

            try
            {
                result = new PcsPostGet(param).GetByProjectId(projectId);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }