CustomerDataService.GetJobState Method
CustomerDataService.GetJobState Method
Returns the state of the data upload job represented by the jobID parameter.
Public Function GetJobState (jobID As System.String) As JobState
[C#]
public JobState GetJobState (System.String jobID);
Parameters
- jobID
A unique ID that represents a data upload job.
Example
[Visual Basic]
'Create an instance of the customer data service proxy.
Dim custDataService As CustomerDataService = New CustomerDataService
'Set PreAuthenticate to True
custDataService.PreAuthenticate = True
'Assign your credentials.
custDataService.Credentials = _
New NetworkCredential(myUserName, mySecurePassword, myDomainName)
'Get job state by calling the GetJobState method.
Dim myJobState As JobState = custDataService.GetJobState(myJobID)
Select Case (myJobState)
Case JobState.Pending
'Still Pending.
Case JobState.Loading
'Still Loading
Case Else
'None of the above two
End Select
[C#]
//Create an instance of the customer data service proxy.
CustomerDataService cds = new CustomerDataService();
//Assign your credentials.
cds.Credentials = new System.Net.NetworkCredential(myUserName,
mySecurePassword, myDomainName);
//Set PreAuthenticate to true
cds.PreAuthenticate = true;
try
{
//Get job state by calling the GetJobState method.
JobState myJobStatus = cds.GetJobState(myJobID);
switch(myJobStatus)
{
case JobState.Pending:
//Still Pending.
break;
case JobState.Loading:
//Still Loading
break;
default:
//None of the above two
break;
}
}
catch(Exception ex)
{
string message = ex.Message;
//Do your exception handling here.
}
See Also
LocationDataService Class | JobState