Beispiel #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);
        }
Beispiel #2
0
 internal Post GetById(long id, PcsPostFilterQuery filter)
 {
     try
     {
         return(DAOWorker.PcsPostDAO.GetById(id, filter.Query()));
     }
     catch (Exception ex)
     {
         LogSystem.Error(ex);
         param.HasException = true;
         return(null);
     }
 }
Beispiel #3
0
 public List <Post> Get(PcsPostFilterQuery filter)
 {
     try
     {
         return(DAOWorker.PcsPostDAO.Get(filter.Query(), param));
     }
     catch (Exception ex)
     {
         LogSystem.Error(ex);
         param.HasException = true;
         return(null);
     }
 }
Beispiel #4
0
 internal List <Post> GetByProjectId(long projectId)
 {
     try
     {
         PcsPostFilterQuery filter = new PcsPostFilterQuery();
         filter.ProjectId = projectId;
         return(this.Get(filter));
     }
     catch (Exception ex)
     {
         LogSystem.Error(ex);
         param.HasException = true;
     }
     return(null);
 }
Beispiel #5
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);
        }
Beispiel #6
0
 internal List <Post> GetByIds(List <long> ids)
 {
     try
     {
         if (ids != null)
         {
             PcsPostFilterQuery filter = new PcsPostFilterQuery();
             filter.Ids = ids;
             return(this.Get(filter));
         }
     }
     catch (Exception ex)
     {
         LogSystem.Error(ex);
         param.HasException = true;
     }
     return(null);
 }