GetUserTimeOffRequestInDataAction Property | |
A simple query abstraction layer used to provide a mechanism by which methods can make simple query calls to various models.
* Required Property
Namespace: AppOne.Services.V2.ContractsAssembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax public DataAction DataAction { get; set; }
function get_DataAction();
function set_DataAction(value);
Property Value
DataActionRemarks Example {
"AuthToken": "...",
"StartDate":"\/Date(1462086000000+0000)\/",
"EndDate":"\/Date(1464678000000+0000)\/",
"DateTimeSchema":0,
"IgnoreDeletedRequests":false,
"DataAction":{
"Name":"SELECT-ALL",
"Values":[""]
}
}
{
"Report": {
"APIVersion": "2.0",
"ProcessTime": "0.0182467",
"RequestTime": "/Date(1463093096606+0000)/",
"ResponseTime": "/Date(1463093096624+0000)/",
"Results": 1
},
"Results": [{
"ID": 980,
"DateTimeSubmitted": "/Date(1463106734903+0000)/",
"DurationPerDaySecs": 28800,
"EmpIdentifier": "5555",
"EmpNotes": "e note",
"EndDateTime": "/Date(1463522400000+0000)/",
"EndDateTimeSchema": "2016-05-17T15:00:00",
"IncludeWeekends": true,
"PayTypeID": 9,
"StartDateTime": "/Date(1463407200000+0000)/",
"StartDateTimeSchema": "2016-05-16T07:00:00",
"StatusType": 0,
"Detail":[
{
"ID": 191600,
"EndDateTime": "/Date(1463436000000+0000)/",
"EndDateTimeSchema": "2016-05-17T15:00:00",
"IsDeleted": false,
"MgrNotes": "",
"StartDateTime": "/Date(1463407200000+0000)/",
"StartDateTimeSchema": "2016-05-16T07:00:00",
"StatusChangedBy": 0,
"StatusChangedOn": "/Date(-2208963600000+0000)/",
"StatusType": 0
},
{
"ID": 191601,
"EndDateTime": "/Date(1463522400000+0000)/",
"EndDateTimeSchema": "2016-05-17T15:00:00",
"IsDeleted": false,
"MgrNotes": "",
"StartDateTime": "/Date(1463493600000+0000)/",
"StartDateTimeSchema": "2016-05-16T07:00:00",
"StatusChangedBy": 0,
"StatusChangedOn": "/Date(-2208963600000+0000)/",
"StatusType": 0
}
]
}]
}
public void V2_GetUserTimeOffRequest_SOAP_Test()
{
try
{
var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
{
int countTest_1 = 0;
SoapServiceV2.GetUserTimeOffRequestRequest request1 = new SoapServiceV2.GetUserTimeOffRequestRequest();
request1.input = new SoapServiceV2.GetUserTimeOffRequestIn
{
AuthToken = AuthToken,
StartDate = new DateTime(2016, 05, 19),
EndDate = new DateTime(2016, 05, 31),
DateTimeSchema = SoapServiceV2.DateTimeSchema.ISO8601Sort,
DataAction = new DataAction
{
Name = "SELECT-ALL"
}
};
SoapServiceV2.GetUserTimeOffRequestResponse response1 = client.GetUserTimeOffRequest(request1);
countTest_1 = (response1.GetUserTimeOffRequestResult.Results != null) ? response1.GetUserTimeOffRequestResult.Results.Count : 0;
if (countTest_1 > 0)
{
int countTest_2 = 0;
SoapServiceV2.GetUserTimeOffRequestRequest request2 = new SoapServiceV2.GetUserTimeOffRequestRequest();
request2.input = new SoapServiceV2.GetUserTimeOffRequestIn
{
AuthToken = AuthToken,
StartDate = new DateTime(2016, 05, 19),
EndDate = new DateTime(2016, 05, 31),
DateTimeSchema = SoapServiceV2.DateTimeSchema.ISO8601Sort,
DataAction = new DataAction
{
Name = "SELECT-EMPID",
Values = new List<string> { "84" }
}
};
SoapServiceV2.GetUserTimeOffRequestResponse response2 = client.GetUserTimeOffRequest(request2);
countTest_2 = (response2.GetUserTimeOffRequestResult.Results != null) ? response2.GetUserTimeOffRequestResult.Results.Count : 0;
Assert.IsTrue(countTest_1 > 0);
}
else
{
Assert.IsTrue(countTest_1 > 0);
}
});
RunServiceClient(actionTestLogic);
}
catch (FaultException<SoapServiceV2.ServiceException> fe)
{
Assert.Fail(fe.Detail.Message);
}
}
See Also