←Select platform

DeleteJob Method

Summary

Deletes the specified job from the Job Processor database.

Syntax

C#
VB
C++
[FaultContractAttribute(DetailType=Leadtools.Services.JobProcessor.FaultContracts.CloudFault,  
   Action="",  
   Name="",  
   Namespace="",  
   ProtectionLevel=ProtectionLevel.None,  
   HasProtectionLevel=false)] 
[OperationContractAttribute()] 
Leadtools.Services.Jobprocessor.Datacontracts.DeleteJobResponse DeleteJob(  
   Leadtools.Services.Jobprocessor.Datacontracts.DeleteJobRequest request 
) 
<FaultContractAttribute(DetailType=Leadtools.Services.JobProcessor.FaultContracts.CloudFault,  
   Action="",  
   Name="",  
   Namespace="",  
   ProtectionLevel=ProtectionLevel.None,  
   HasProtectionLevel=False)> 
<OperationContractAttribute()> 
Function DeleteJob( _ 
   ByVal request As Leadtools.Services.Jobprocessor.Datacontracts.DeleteJobRequest _ 
) As Leadtools.Services.Jobprocessor.Datacontracts.DeleteJobResponse 
[FaultContractAttribute(DetailType=Leadtools.Services.JobProcessor.FaultContracts.CloudFault,  
   Action="",  
   Name="",  
   Namespace="",  
   ProtectionLevel=ProtectionLevel.None,  
   HasProtectionLevel=false)] 
[OperationContractAttribute()] 
Leadtools.Services.Jobprocessor.Datacontracts.DeleteJobResponse^ DeleteJob(  
   Leadtools.Services.Jobprocessor.Datacontracts.DeleteJobRequest^ request 
) 

Parameters

request
A Leadtools.Services.JobProcessor.DataContracts.DeleteJobRequest containing information about the job to be deleted.

Return Value

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

Remarks

Use this method to delete a job from the Job Processor database.

Example

C#
VB
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 
using LeadtoolsJobProcessorExamples.JobService; 
 
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

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
Click or drag to resize