Exemplo n.º 1
0
        public void Edit(long flagId, [FromBody] MixERP.Net.Entities.Core.Flag flag)
        {
            if (flag == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                flag.UserId    = this._UserId;
                flag.FlaggedOn = System.DateTime.UtcNow;

                this.FlagRepository.Update(flag, flagId);
            }
            catch (UnauthorizedException)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden));
            }
            catch
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError));
            }
        }
Exemplo n.º 2
0
 public void Next()
 {
     MixERP.Net.Entities.Core.Flag flag = Fixture().GetNext(0);
     Assert.NotNull(flag);
 }
Exemplo n.º 3
0
 public void Previous()
 {
     MixERP.Net.Entities.Core.Flag flag = Fixture().GetPrevious(0);
     Assert.NotNull(flag);
 }