|
|
Job Component |
SetParameterValue method |
|
SetParameterValue(pName As String, pValue As String) |
Returns: None |
|
The SetParameterValue method allows you to set, or add, the value of a parameter that will be passed to your job upon execution. If the parameter name already exists, it will update the value. If the parameter does not exist it will add it.
Example:
[Visual Basic .NET]
|
Public Sub RunMyJob() |
|
Dim js As ExportBudget.CRJobStatus |
|
Dim myExportBudgetJob As ExportBudget |
|
|
|
myExportBudgetJob = New ExportBudget() |
|
myExportBudgetJob.JobPaths.JobStatusFileName = "ExportJobStatus.xml" |
|
|
|
myExportBudgetJob.SetParameterValue("CUSTOMERID", "100453") |
|
|
|
myExportBudgetJob.RunJob() |
|
|
|
js = myExportBudgetJob.GetJobStatus() |
|
|
|
If Not (js Is Nothing) Then |
|
MsgBox("Job is done, Status: " + js.JobStatus.ToString) |
|
Else |
|
MsgBox("Job is done") |
|
End If |
|
|
|
|
|
End Sub |
|
|
[C#]
|
private void RunMyJob() |
|
{ |
|
ExportBudget.CRJobStatus js; |
|
ExportBudget myExportBudgetJob; |
|
|
|
myExportBudgetJob = new ExportBudget(); |
|
myExportBudgetJob.JobPaths.JobStatusFileName = "ExportJobStatus.xml"; |
|
|
|
myExportBudgetJob.SetParameterValue("CUSTOMERID", "100453"); |
|
|
|
myExportBudgetJob.RunJob(); |
|
|
|
js = myExportBudgetJob.GetJobStatus(); |
|
|
|
if (js != null) |
|
{ |
|
MessageBox.Show("Job is done, Status: " + js.JobStatus.ToString()); |
|
} |
|
else |
|
{ |
|
MessageBox.Show("Job is done"); |
|
} |
|
|
|
|
|
} |
|
|
© 2003 - 2007 Relational Solutions, Inc. - All rights reserved