コード例 #1
0
ファイル: PartyRolesController.cs プロジェクト: windygu/wms-2
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeletePartyRoleDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         PartyRolesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _partyRoleApplicationService.When(value as IDeletePartyRole);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
0
        public async Task WhenAsync(DeletePartyRoleDto c)
        {
            var idObj         = PartyRoleProxyUtils.ToIdString((c as IDeletePartyRole).PartyRoleId);
            var uriParameters = new PartyRoleUriParameters();

            uriParameters.Id = idObj;

            var q = new PartyRoleDeleteQuery();

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

            var req = new PartyRoleDeleteRequest(uriParameters);

            req.Query = q;

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

            PartyRoleProxyUtils.ThrowOnHttpResponseError(resp);
        }
コード例 #3
0
 public void When(DeletePartyRoleDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }