예제 #1
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteInventoryPostingRuleDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         InventoryPostingRulesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _inventoryPostingRuleApplicationService.When(value as IDeleteInventoryPostingRule);
     } catch (Exception ex) { var response = InventoryPostingRulesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
예제 #2
0
        public async Task WhenAsync(DeleteInventoryPostingRuleDto c)
        {
            var idObj         = (c as IDeleteInventoryPostingRule).InventoryPostingRuleId;
            var uriParameters = new InventoryPostingRuleUriParameters();

            uriParameters.Id = idObj;

            var q = new InventoryPostingRuleDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new InventoryPostingRuleDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.InventoryPostingRule.Delete(req);

            InventoryPostingRuleProxyUtils.ThrowOnHttpResponseError(resp);
        }
예제 #3
0
 public void When(DeleteInventoryPostingRuleDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }