Exemplo n.º 1
0
 public void Patch(string id, [FromBody] MergePatchInOutLineMvoDto value)
 {
     try {
         InOutLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _inOutLineMvoApplicationService.When(value as IMergePatchInOutLineMvo);
     } catch (Exception ex) { var response = InOutLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemplo n.º 2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteInOutLineMvoDto();
         value.CommandId    = commandId;
         value.RequesterId  = requesterId;
         value.InOutVersion = (long)Convert.ChangeType(version, typeof(long));
         InOutLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _inOutLineMvoApplicationService.When(value as IDeleteInOutLineMvo);
     } catch (Exception ex) { var response = InOutLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemplo n.º 3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteInOutLineMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.InOutVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    InOutLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _inOutLineMvoApplicationService.When(value as IMergePatchInOutLineMvo);
                    return;
                }
                // ///////////////////////////////

                InOutLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _inOutLineMvoApplicationService.When(value as ICreateInOutLineMvo);
            } catch (Exception ex) { var response = InOutLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }