QueueSystem.GetMyJobCount Method
Gets the number of queue jobs submitted by the current user.
Namespace: [QueueSystem Web service]
Service reference: http://ServerName:32843/[Project Service Application GUID]/PSI/QueueSystem.svc
Web service reference: http://ServerName/ProjectServerName/_vti_bin/PSI/QueueSystem.asmx?wsdl
Syntax
'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/GetMyJobCount", RequestNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
ResponseNamespace := "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetMyJobCount ( _
messageTypes As QueueMsgType(), _
JobCompletionState As JobState(), _
fromDate As DateTime, _
toDate As DateTime, _
maxRows As Integer _
) As Integer
'Usage
Dim instance As QueueSystem
Dim messageTypes As QueueMsgType()
Dim JobCompletionState As JobState()
Dim fromDate As DateTime
Dim toDate As DateTime
Dim maxRows As Integer
Dim returnValue As Integer
returnValue = instance.GetMyJobCount(messageTypes, _
JobCompletionState, fromDate, toDate, _
maxRows)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/GetMyJobCount", RequestNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
ResponseNamespace = "https://schemas.microsoft.com/office/project/server/webservices/QueueSystem/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public int GetMyJobCount(
QueueMsgType[] messageTypes,
JobState[] JobCompletionState,
DateTime fromDate,
DateTime toDate,
int maxRows
)
Parameters
- messageTypes
Type: []
Array of QueueMsgType enumeration values. If a null reference (Nothing in Visual Basic), count all types.
- JobCompletionState
Type: []
JobState enumeration value. If a null reference (Nothing in Visual Basic), count all states.
- fromDate
Type: System.DateTime
Earliest date and time of queue jobs.
- toDate
Type: System.DateTime
Latest date and time of queue jobs.
- maxRows
Type: System.Int32
Maximum number of jobs to count. If zero (0), count all.
Return Value
Type: System.Int32
Count of number of queue jobs within the specified dates, of the specified types and states, submitted by the current user.
Remarks
Project Server Permissions
Permission |
Description |
---|---|
Allows the user to log on to Project Server. Global permission. |
Examples
The following code fragment counts the total number of jobs of all types and states the current user submitted to the queue during the current day.
private static QueueSystemWS.QueueSystem queueSystem =
new QueueSystemWS.QueueSystem();
. . .
int myJobCount = queueSystem.GetMyJobCount(null, null, DateTime.Today, DateTime.Now, 0);
MessageBox.Show("Number of my queue jobs: " + myJobCount.ToString(), "Job Count");