Click or drag to resize

WSUserScheduleGetUserSchedule Method

Returns a GetUserScheduleOut response with a result model List<GetUserScheduleModel>

Namespace: AppOne.Services.V2.Methods
Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax
public GetUserScheduleOut GetUserSchedule(
	GetUserScheduleIn input
)

Parameters

input  GetUserScheduleIn
A new GetUserScheduleIn object

Return Value

GetUserScheduleOut
A GetUserScheduleOut object
Exceptions
ExceptionCondition
ServiceExceptionStart Date and End Date range should be with in 45 days
Remarks
Use this method to get a results list of GetUserScheduleModel. The GetUserScheduleModel contains the meta data necessary to report on a a users schedule.

DataAction Names

NameDescriptionValues Example
SELECT-ALLReturns all users in system regardless of any state.[ignored]
SELECT-EMPIDReturns only the users with the specified employee ID passed in the values property."abc-123","123","efg"...
Note  Note
The StartDate and EndDate both should be withing 45 days of each other or an exception will be returned. To increase the responsiveness of this service call use a short time span between the StartDate and EndDate.
Example
JSON Request
{
    "AuthToken":"",
    "StartDate":"\/Date(1435734000000)\/",
    "EndDate":"\/Date(1438326000000)\/",
    "DateTimeSchema":0,
    "DataAction":{
        "Name":"SELECT-EMPID",
        "Values":["1234"]
    }
}
JSON Response
{
    "Report": {
        "APIVersion": "2.0",
        "ProcessTime": "0.0540821",
        "RequestTime": "/Date(1458768536042+0000)/",
        "ResponseTime": "/Date(1458768536096+0000)/",
        "Results": 2
    },
    "Results": [ {
        "ID": 3472,
        "EmpIdentifier": "1234",
        "EndDateTime": "/Date(1456898400000+0000)/",
        "EndDateTimeSchema": "2016-03-01T23:00:00",
        "IsAutoGenerated": false,
        "PayTypeID": -1,
        "StartDateTime": "/Date(1456869600000+0000)/",
        "StartDateTimeSchema": "2016-03-01T15:00:00",
        "LL01ID": 35,
        "LL02ID": 2,
        "LL03ID": 0,
        "LL04ID": 0,
        "LL05ID": 0,
        "LL06ID": 0,
        "LL07ID": 0,
        "LL08ID": 0,
        "LL09ID": 0,
        "LL10ID": 0,
        "LL11ID": 0,
        "LL12ID": 0,
        "LL13ID": 0,
        "LL14ID": 0,
        "LL15ID": 0,
        "Detail": [    {
            "ID": 4361,
            "ParentID": 3472,
            "EndDateTime": "/Date(1458756900000+0000)/",
            "EndDateTimeSchema": "2016-03-23T11:15:00",
            "IsAutoGenerated": false,
            "PayTypeID": -3,
            "StartDateTime": "/Date(1458753300000+0000)/",
            "StartDateTimeSchema": "2016-03-23T10:15:00",
            "LL01ID": 35,
            "LL02ID": 2,
            "LL03ID": 0,
            "LL04ID": 0,
            "LL05ID": 0,
            "LL06ID": 0,
            "LL07ID": 0,
            "LL08ID": 0,
            "LL09ID": 0,
            "LL10ID": 0,
            "LL11ID": 0,
            "LL12ID": 0,
            "LL13ID": 0,
            "LL14ID": 0,
            "LL15ID": 0
            }
        ]
    },
    {
        "ID": 3473,
        "EmpIdentifier": "1234",
        "EndDateTime": "/Date(1458604800000+0000)/",
        "EndDateTimeSchema": "2016-03-21T17:00:00",
        "IsAutoGenerated": false,
        "PayTypeID": -1,
        "StartDateTime": "/Date(1458576000000+0000)/",
        "StartDateTimeSchema": "2016-03-21T09:00:00",
        "LL01ID": 35,
        "LL02ID": 2,
        "LL03ID": 0,
        "LL04ID": 0,
        "LL05ID": 0,
        "LL06ID": 0,
        "LL07ID": 0,
        "LL08ID": 0,
        "LL09ID": 0,
        "LL10ID": 0,
        "LL11ID": 0,
        "LL12ID": 0,
        "LL13ID": 0,
        "LL14ID": 0,
        "LL15ID": 0,
        "Detail": null
    }
    ]
}
SOAP: C# WCF Sample
// ==================================
//TEST 1: SELECT-ALL
int countTest_1 = 0;
SoapServiceV2.GetUserScheduleRequest request1 = new SoapServiceV2.GetUserScheduleRequest();
request1.input = new SoapServiceV2.GetUserScheduleIn
{
    AuthToken = AuthToken,
    StartDate = new DateTime(2015,06,01),
    EndDate = new DateTime(2015,07,08),
    DataAction = new DataAction
    {
        Name = "SELECT-ALL"
    }
};
SoapServiceV2.GetUserScheduleResponse response1 = client.GetUserSchedule(request1);
countTest_1 = (response1.GetUserScheduleResult.Results != null) ? response1.GetUserScheduleResult.Results.Count : 0;

// ==================================
//TEST 2: SELECT-ID
int countTest_2 = 0;
SoapServiceV2.GetUserScheduleRequest request2 = new SoapServiceV2.GetUserScheduleRequest();
request2.input = new SoapServiceV2.GetUserScheduleIn
{
    AuthToken = AuthToken,
    StartDate = new DateTime(2015,06,01),
    EndDate = new DateTime(2015,07,08),
    DataAction = new DataAction
    { 
        Name = "SELECT-EMPID",
        Values =new List<string>{"753","99" } 
    }
};
SoapServiceV2.GetUserScheduleResponse response2 = client.GetUserSchedule(request2);
countTest_2 = (response2.GetUserScheduleResult.Results != null) ? response2.GetUserScheduleResult.Results.Count : 0;

Assert.IsTrue(countTest_2 > 0 && countTest_1 > 0);
See Also