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

            try
            {
                this.WidgetGroupRepository.Update(widgetGroup, widgetGroupName);
            }
            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));
            }
        }
Example #2
0
 public void Next()
 {
     MixERP.Net.Entities.Core.WidgetGroup widgetGroup = Fixture().GetNext(string.Empty);
     Assert.NotNull(widgetGroup);
 }
Example #3
0
 public void First()
 {
     MixERP.Net.Entities.Core.WidgetGroup widgetGroup = Fixture().GetFirst();
     Assert.NotNull(widgetGroup);
 }