Beispiel #1
0
        public void GeCustomAttributesByType()
        {
            GetCustomAttributesDataRequest request = new GetCustomAttributesDataRequest {
                TypeId = 2
            };

            GetCustomAttributesDataResponse response = m.GetCustomAttributesByType(request);

            Assert.IsNotNull(response.CustomAttributes);
        }
Beispiel #2
0
        public GetCustomAttributesDataResponse GetCustomAttributesByType(GetCustomAttributesDataRequest request)
        {
            GetCustomAttributesDataResponse result = null;

            try
            {
                result = new GetCustomAttributesDataResponse();
                IAttributeRepository repo = AttrFactory.GetRepository(request, RepositoryType.AttributeLibrary);

                result.CustomAttributes = repo.FindByType(request.TypeId) as List <CustomAttributeData>;
                result.Version          = request.Version;
                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #3
0
        public GetCustomAttributesDataResponse Get(GetCustomAttributesDataRequest request)
        {
            GetCustomAttributesDataResponse response = new GetCustomAttributesDataResponse();

            try
            {
                if (string.IsNullOrEmpty(request.UserId))
                {
                    throw new UnauthorizedAccessException("PatientGoalDD:Get()::Unauthorized Access");
                }

                response         = Manager.GetCustomAttributesByType(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);

                string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0";
                Common.Helper.LogException(int.Parse(aseProcessID), ex);
            }
            return(response);
        }