WSUserScheduleAddUserSchedule Method | |
Namespace: AppOne.Services.V2.MethodsAssembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax Remarks Example {
"AuthToken":"String_Content",
"Payload":[{
"EmpIdentifier":"String_Content",
"EndDateTime":"\/Date(1465477200000)\/",
"PayTypeID":-1,
"StartDateTime":"\/Date(1465459200000)\/",
"LLID01": 3,
"LLID02": 1,
"LLID03": 5,
"LLID04": 16,
"LLID05": 0,
"LLID06": 0,
"LLID07": 0,
"LLID08": 0,
"LLID09": 0,
"LLID10": 0,
"LLID11": 0,
"LLID12": 0,
"LLID13": 0,
"LLID14": 0,
"LLID15": 0
}]
}
{
"Report": {
"ProcessTime": "0.0493385",
"RequestTime": "/Date(1446076731108+0000)/",
"ResponseTime": "/Date(1446076731157+0000)/",
"Results": 1
},
"Results": [
{
"ID": 1,
"Messages": [
"Schedule successfully added"
],
"Status": 1
}
]
}
public void V2_AddUserSchedule_SOAP_Test()
{
try
{
var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
{
List<int> scheduleIds = new List<int>();
bool pass = true;
SoapServiceV2.AddUserScheduleRequest request1 = new SoapServiceV2.AddUserScheduleRequest();
List<SoapServiceV2.AddUserScheduleModel> payLoad = new List<AddUserScheduleModel>();
SoapServiceV2.AddUserScheduleModel payLoadItem = new AddUserScheduleModel
{
EmpIdentifier = "123",
StartDateTime = ChangeTime(DateTime.Now, 8, 0, 0, 0),
EndDateTime = ChangeTime(DateTime.Now, 16, 0, 0, 0),
PayTypeID = PayType.PayTypes.Work.GetHashCode(),
EnableHomeLaborLevelAssignment = true
};
payLoad.Add(payLoadItem);
request1.input = new SoapServiceV2.AddUserScheduleIn
{
AuthToken = AuthToken,
Payload = payLoad
};
SoapServiceV2.AddUserScheduleResponse response1 = client.AddUserSchedule(request1);
pass = (response1.AddUserScheduleResult.Results != null && response1.AddUserScheduleResult.Results.Count > 0) ? true : false;
Assert.IsTrue(pass);
scheduleIds.Add(response1.AddUserScheduleResult.Results.Where(s => s.ID != 0).Select(s => s.ID).SingleOrDefault());
DeleteSchedules(scheduleIds);
});
RunServiceClient(actionTestLogic);
}
catch (FaultException<SoapServiceV2.ServiceException> fe)
{
Assert.Fail(fe.Detail.Message);
}
}
See Also