LEADTOOLS Cloud (Leadtools.Services.Cloud.ServiceContracts assembly)
LEAD Technologies, Inc

DeleteJob Method

Example 





A Leadtools.Services.Cloud.DataContracts.DeleteJobRequest containing information for the job to be deleted.
Deletes the specified job from the cloud database.
Syntax
[FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=false)]
[OperationContractAttribute()]
DeleteJobResponse DeleteJob( 
   DeleteJobRequest request
)
'Declaration
 
<FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=False)>
<OperationContractAttribute()>
Function DeleteJob( _
   ByVal request As DeleteJobRequest _
) As DeleteJobResponse
'Usage
 
Dim instance As IJobService
Dim request As DeleteJobRequest
Dim value As DeleteJobResponse
 
value = instance.DeleteJob(request)
[FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=false)]
[OperationContractAttribute()]
DeleteJobResponse DeleteJob( 
   DeleteJobRequest request
)
FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=)
OperationContractAttribute()
function Leadtools.Services.Cloud.ServiceContracts.IJobService.DeleteJob( 
   request 
)
[FaultContractAttribute(DetailType=Leadtools.Services.Cloud.FaultContracts.CloudFault, 
   Action="", 
   Name="", 
   Namespace="", 
   ProtectionLevel=ProtectionLevel.None, 
   HasProtectionLevel=false)]
[OperationContractAttribute()]
DeleteJobResponse^ DeleteJob( 
   DeleteJobRequest^ request
) 

Parameters

request
A Leadtools.Services.Cloud.DataContracts.DeleteJobRequest containing information for the job to be deleted.

Return Value

A Leadtools.Services.Cloud.DataContracts.DeleteJobResponse class indicating whether the job was successfully deleted.
Remarks

Use this method to delete a job from the cloud database.

Example
 
Public Sub DeleteJob(ByVal jobID As String)
   Using jobServiceClient As JobServiceClient = New JobServiceClient()
      Dim deleteJobRequest As DeleteJobRequest = New DeleteJobRequest()
      deleteJobRequest.ID = jobID
      Dim deleteJobResponse As DeleteJobResponse = jobServiceClient.DeleteJob(deleteJobRequest)
      If deleteJobResponse.IsDeleted Then
         Console.WriteLine("The job was successfully deleted.")
      Else
         Console.WriteLine("The job was not deleted.")
      End If
   End Using
End Sub
public void DeleteJob(string jobID)
{
   using (JobServiceClient jobServiceClient = new JobServiceClient())
   {
      DeleteJobRequest deleteJobRequest = new DeleteJobRequest();
      deleteJobRequest.ID = jobID;
      DeleteJobResponse deleteJobResponse = jobServiceClient.DeleteJob(deleteJobRequest);
      if (deleteJobResponse.IsDeleted)
         Console.WriteLine("The job was successfully deleted.");
      else
         Console.WriteLine("The job was not deleted.");
   }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IJobService Interface
IJobService Members
Programming with Leadtools Cloud SDK
Understanding The LEADTOOLS Cloud Database

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.