示例#1
0
        public void Edit(long exitId, [FromBody] MixERP.Net.Entities.HRM.Exit exit)
        {
            if (exit == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.ExitRepository.Update(exit, exitId);
            }
            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));
            }
        }
示例#2
0
 public void Last()
 {
     MixERP.Net.Entities.HRM.Exit exit = Fixture().GetLast();
     Assert.NotNull(exit);
 }
示例#3
0
 public void Previous()
 {
     MixERP.Net.Entities.HRM.Exit exit = Fixture().GetPrevious(0);
     Assert.NotNull(exit);
 }