DeleteJob Method

Summary

Deletes the specified job from the Job Processor database.

Syntax
C#
VB
C++
[OperationContractAttribute()] 
[FaultContractAttribute(System.Type)] 
public DeleteJobResponse DeleteJob( 
   DeleteJobRequest request 
) 
<OperationContractAttribute(), 
   FaultContractAttribute(System.Type)> 
 Public Function DeleteJob( 
   ByVal request As DeleteJobRequest 
) As DeleteJobResponse 
public:  
   [OperationContractAttribute] 
   [FaultContractAttribute(System::Type)] 
   DeleteJobResponse^ DeleteJob( 
      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
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."); 
   } 
} 
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 

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.