Click or drag to resize

WSPayrollPayAdjustGetPayrollPayAdjust Method

Returns a GetPayrollPayAdjustOut response with a result model List<GetPayrollPayAdjustModel>

Namespace: AppOne.Services.V2.Methods
Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax
public GetPayrollPayAdjustOut GetPayrollPayAdjust(
	GetPayrollPayAdjustIn input
)

Parameters

input  GetPayrollPayAdjustIn
A new GetPayrollPayAdjustIn object

Return Value

GetPayrollPayAdjustOut
A GetPayrollPayAdjustOut object
Remarks
Use this method to get a results list of GetPayrollPayAdjustModel. The GetPayrollPayAdjustModel contains the meta data necessary to report on payroll pay types

DataAction Names

NameDescriptionValues Example
SELECT-ALLReturns all pay types in system regardless of any state.[ignored]
SELECT-ACTIVEReturns only the payroll pay types that are active.[ignored]
SELECT-PAYIDReturns only the payroll pay types by the PayAdjustID input values.["-1", "-4", "1", "8"]
Example
JSON Request
{
    "AuthToken":"...==",
    "DataAction":{
        "Name":"SELECT-PAYID",
        "Values":["1", "10"]
    }
}
JSON Response
{
    "Report": {
        "APIVersion": "2.0",
        "ProcessTime": "0.0088903",
        "RequestTime": "/Date(1469577225208-0700)/",
        "ResponseTime": "/Date(1469577225217-0700)/",
        "Results": 2
    },
    "Results": [
        {
            "Code": "F",
            "EndDateTime": "/Date(4102470000000-0700)/",
            "ID": 83,
            "IsDeduction": false,
            "IsDeleted": false,
            "Name": "Fuel",
            "PayAdjustID": 1,
            "StartDateTime": "/Date(1311750000000-0700)/"
        },
        {
            "Code": "HRA ",
            "EndDateTime": "/Date(4102556399000-0700)/",
            "ID": 101,
            "IsDeduction": false,
            "IsDeleted": false,
            "Name": "HRA 001",
            "PayAdjustID": 10,
            "StartDateTime": "/Date(1342162800000-0700)/"
        }
    ]
}
SOAP: C# WCF Sample
public void V2_GetPayrollPayAdjust_SOAP_Test()
{
    try
    {
        var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
        {
            // ==================================
            //TEST 1: SELECT-ALL
            int countTest_1 = 0;
            SoapServiceV2.GetPayrollPayAdjustRequest request1 = new SoapServiceV2.GetPayrollPayAdjustRequest();
            request1.input = new SoapServiceV2.GetPayrollPayAdjustIn
            {
                AuthToken = AuthToken,
                DataAction = new DataAction
                {
                    Name = "SELECT-ALL"
                }
            };
            SoapServiceV2.GetPayrollPayAdjustResponse response1 = client.GetPayrollPayAdjust(request1);
            countTest_1 = (response1.GetPayrollPayAdjustResult.Results != null) ? response1.GetPayrollPayAdjustResult.Results.Count : 0;

            var first_id = response1.GetPayrollPayAdjustResult.Results.FirstOrDefault().ID;
            if (countTest_1 > 0)
            {
                // ==================================
                //TEST 2: SELECT-PAYID
                int countTest_2 = 0;
                SoapServiceV2.GetPayrollPayAdjustRequest request2 = new SoapServiceV2.GetPayrollPayAdjustRequest();
                request2.input = new SoapServiceV2.GetPayrollPayAdjustIn
                {
                    AuthToken = AuthToken,
                    DataAction = new DataAction
                    {
                        Name = "SELECT-PAYID",
                        // Values =new List<string>{response1.GetPayrollResult.Results[0].EmpIdentifier.ToString()} 
                        Values = new List<string> { first_id.ToString() }
                    }
                };
                SoapServiceV2.GetPayrollPayAdjustResponse response2 = client.GetPayrollPayAdjust(request2);
                countTest_2 = (response2.GetPayrollPayAdjustResult.Results != null) ? response2.GetPayrollPayAdjustResult.Results.Count : 0;
                //Assert.IsTrue(countTest_2 > 0 && countTest_1 > 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