public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteOrganizationStructureTypeDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         OrganizationStructureTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _organizationStructureTypeApplicationService.When(value as IDeleteOrganizationStructureType);
     } catch (Exception ex) { var response = OrganizationStructureTypesControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
示例#2
0
        public async Task WhenAsync(DeleteOrganizationStructureTypeDto c)
        {
            var idObj         = (c as IDeleteOrganizationStructureType).Id;
            var uriParameters = new OrganizationStructureTypeUriParameters();

            uriParameters.Id = idObj;

            var q = new OrganizationStructureTypeDeleteQuery();

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

            var req = new OrganizationStructureTypeDeleteRequest(uriParameters);

            req.Query = q;

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

            OrganizationStructureTypeProxyUtils.ThrowOnHttpResponseError(resp);
        }
示例#3
0
 public void When(DeleteOrganizationStructureTypeDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }