Ejemplo n.º 1
0
        /// <summary>
        /// 根据EnumTypeId获取Enumcode
        /// </summary>
        /// <param name="alarmRequest"></param>
        /// <returns></returns>
        public BasicResponse <DataTable> GetEnumcodeByEnumTypeId(GetEnumcodeByEnumTypeIdRequest alarmRequest)
        {
            var response = new BasicResponse <DataTable>();

            if (string.IsNullOrWhiteSpace(alarmRequest.EnumTypeId))
            {
                response.Code    = -100;
                response.Message = "参数错误!";
                return(response);
            }
            try
            {
                var datatable = _Repository.GetEnumcodeByEnumTypeId(alarmRequest.EnumTypeId);
                response.Data = datatable;
            }
            catch (Exception ex)
            {
                response.Code    = -100;
                response.Message = ex.Message;
                this.ThrowException("根据EnumTypeId获取Enumcode", ex);
            }

            return(response);
        }