public void Edit(string formName, [FromBody] MixERP.Net.Entities.Core.CustomFieldForm customFieldForm)
        {
            if (customFieldForm == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.CustomFieldFormRepository.Update(customFieldForm, formName);
            }
            catch (UnauthorizedException)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden));
            }
            catch (MixERPException ex)
            {
                throw new HttpResponseException(new HttpResponseMessage
                {
                    Content    = new StringContent(ex.Message),
                    StatusCode = HttpStatusCode.InternalServerError
                });
            }
            catch
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError));
            }
        }
Exemplo n.º 2
0
 public void Get()
 {
     MixERP.Net.Entities.Core.CustomFieldForm customFieldForm = Fixture().Get(string.Empty);
     Assert.NotNull(customFieldForm);
 }
Exemplo n.º 3
0
 public void First()
 {
     MixERP.Net.Entities.Core.CustomFieldForm customFieldForm = Fixture().GetFirst();
     Assert.NotNull(customFieldForm);
 }