public void Edit(string fiscalYearCode, [FromBody] MixERP.Net.Entities.Core.FiscalYear fiscalYear) { if (fiscalYear == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed)); } try { this.FiscalYearRepository.Update(fiscalYear, fiscalYearCode); } 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)); } }
public void Get() { MixERP.Net.Entities.Core.FiscalYear fiscalYear = Fixture().Get(string.Empty); Assert.NotNull(fiscalYear); }
public void First() { MixERP.Net.Entities.Core.FiscalYear fiscalYear = Fixture().GetFirst(); Assert.NotNull(fiscalYear); }