예제 #1
0
        public void Edit(int customFieldSetupId, [FromBody] Frapid.Config.Entities.CustomFieldSetup customFieldSetup)
        {
            if (customFieldSetup == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.CustomFieldSetupRepository.Update(customFieldSetup, customFieldSetupId);
            }
            catch (UnauthorizedException)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden));
            }
            catch (DataAccessException ex)
            {
                throw new HttpResponseException(new HttpResponseMessage
                {
                    Content    = new StringContent(ex.Message),
                    StatusCode = HttpStatusCode.InternalServerError
                });
            }
#if !DEBUG
            catch
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError));
            }
#endif
        }
예제 #2
0
 public void Last()
 {
     Frapid.Config.Entities.CustomFieldSetup customFieldSetup = Fixture().GetLast();
     Assert.NotNull(customFieldSetup);
 }
예제 #3
0
 public void Previous()
 {
     Frapid.Config.Entities.CustomFieldSetup customFieldSetup = Fixture().GetPrevious(0);
     Assert.NotNull(customFieldSetup);
 }