GetUserTimeOffBalanceInDataAction 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
The DataAction property is required to get results from
GetUserTimeOffBalance(GetUserTimeOffBalanceIn) method. Below is a list of the available
DataAction name values that can used to return a dynamic results set
DataAction Names
Name | Description | Values Example |
---|
SELECT-EMPID | Returns only the users with the specified employee ID passed in the values property. | "abc-123","123","efg"... |
Example {
"AuthToken":"...",
"ProjectedBalanceDate":"\/Date(1513407600000)\/",
"DataAction":{
"Name":"SELECT-EMPID",
"Values":["1234"]
}
}
{
"Report": {
"APIVersion": "2.0",
"ProcessTime": "2.1635148",
"RequestTime": "/Date(1492460904312-0700)/",
"ResponseTime": "/Date(1492460906475-0700)/",
"Results": 2
},
"Results": [
{
"AccruedSeconds": 0,
"AdjustmentSeconds": 0,
"AvailableBalanceSeconds": 0,
"EmpIdentifier": "1234",
"GrantedSeconds": 0,
"IsRollover": false,
"PayType": "Vacation",
"PayTypeCode": "V",
"PayTypeEndDate": "/Date(4102556399000-0700)/",
"PayTypeID": 18,
"PayTypeIsDeleted": false,
"PayTypeStartDate": "/Date(1328079600000-0700)/",
"ProjectedBalanceSeconds": 0,
"RolloverSecs": 0,
"TimeOffPolicyDetailEndDate": "/Date(4102556399000-0700)/",
"TimeOffPolicyDetailID": 5,
"TimeOffPolicyDetailIsDeleted": true,
"TimeOffPolicyDetailStartDate": "/Date(1505804400000-0700)/",
"UsedSeconds": 0
},
{
"AccruedSeconds": 0,
"AdjustmentSeconds": 0,
"AvailableBalanceSeconds": 0,
"EmpIdentifier": "1234",
"GrantedSeconds": 0,
"IsRollover": false,
"PayType": "Sick",
"PayTypeCode": "Sick",
"PayTypeEndDate": "/Date(4102470000000-0700)/",
"PayTypeID": 3,
"PayTypeIsDeleted": false,
"PayTypeStartDate": "/Date(1309503600000-0700)/",
"ProjectedBalanceSeconds": 0,
"RolloverSecs": 0,
"TimeOffPolicyDetailEndDate": "/Date(4102556399000-0700)/",
"TimeOffPolicyDetailID": 8,
"TimeOffPolicyDetailIsDeleted": false,
"TimeOffPolicyDetailStartDate": "/Date(1505977200000-0700)/",
"UsedSeconds": 0
}
]
}
public void V2_GetUserTimeOffBalance_SOAP_Test()
{
try
{
var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
{
int countTest_1 = 0;
SoapServiceV2.GetUserTimeOffBalanceRequest request1 = new SoapServiceV2.GetUserTimeOffBalanceRequest();
request1.input = new SoapServiceV2.GetUserTimeOffBalanceIn
{
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.GetUserTimeOffBalanceResponse response1 = client.GetUserTimeOffBalance(request1);
countTest_1 = (response1.GetUserTimeOffBalanceResult.Results != null) ? response1.GetUserTimeOffBalanceResult.Results.Count : 0;
if (countTest_1 > 0)
{
int countTest_2 = 0;
SoapServiceV2.GetUserTimeOffBalanceRequest request2 = new SoapServiceV2.GetUserTimeOffBalanceRequest();
request2.input = new SoapServiceV2.GetUserTimeOffBalanceIn
{
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.GetUserTimeOffBalanceResponse response2 = client.GetUserTimeOffBalance(request2);
countTest_2 = (response2.GetUserTimeOffBalanceResult.Results != null) ? response2.GetUserTimeOffBalanceResult.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