Exemple #1
0
        public ApiResultObject <List <Role> > GetResult(RoleFilterQuery filter)
        {
            ApiResultObject <List <Role> > result = null;

            try
            {
                bool valid = true;
                valid = valid && IsNotNull(param);
                valid = valid && IsNotNull(filter);
                List <Role> resultData = null;
                if (valid)
                {
                    resultData = new RoleGet(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);
        }
Exemple #2
0
        public Role GetByCode(string code)
        {
            Role result = null;

            try
            {
                result = new RoleGet(param).GetByCode(code);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Exemple #3
0
        public Role GetById(long id)
        {
            Role result = null;

            try
            {
                result = new RoleGet(param).GetById(id);
            }
            catch (Exception ex)
            {
                LogSystem.Error(ex);
                param.HasException = true;
                result             = null;
            }
            return(result);
        }
Exemple #4
0
        public List <Role> Get(RoleFilterQuery filter)
        {
            List <Role> result = null;

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