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

            try
            {
                bool valid = true;
                valid = valid && IsNotNull(param);
                valid = valid && IsNotNull(filter);
                List <Employee> resultData = null;
                if (valid)
                {
                    resultData = new PcsEmployeeGet(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 Employee GetByLoginname(string loginname)
        {
            Employee result = null;

            try
            {
                result = new PcsEmployeeGet(param).GetByLoginname(loginname);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Example #3
0
        public Employee GetById(long id)
        {
            Employee result = null;

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

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