Пример #1
0
        public ApiResultObject <List <Project> > GetResult(PcsProjectFilterQuery filter)
        {
            ApiResultObject <List <Project> > result = null;

            try
            {
                bool valid = true;
                valid = valid && IsNotNull(param);
                valid = valid && IsNotNull(filter);
                List <Project> resultData = null;
                if (valid)
                {
                    resultData = new PcsProjectGet(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);
        }
Пример #2
0
        public Project GetByCode(string code)
        {
            Project result = null;

            try
            {
                result = new PcsProjectGet(param).GetByCode(code);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Пример #3
0
        public Project GetById(long id)
        {
            Project result = null;

            try
            {
                result = new PcsProjectGet(param).GetById(id);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Пример #4
0
        public List <Project> Get(PcsProjectFilterQuery filter)
        {
            List <Project> result = null;

            try
            {
                result = new PcsProjectGet(param).Get(filter);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }