Click or drag to resize

ServiceRouterDeleteUserSchedule Method

Deletes a list of user schedules by its IDList and returns a list of DeleteResult status structures

Namespace: AppOne.Services.V2
Assembly: AppOne.Web.Service (in AppOne.Web.Service.dll) Version: 1.0.141
Syntax
public DeleteUserScheduleOut DeleteUserSchedule(
	DeleteUserScheduleIn input
)

Parameters

input  DeleteUserScheduleIn
A new DeleteUserScheduleIn object

Return Value

DeleteUserScheduleOut
A list of DeleteResult status structures
Remarks
Deletes a list of user schedules by its IDList and returns a list of DeleteResult status structures.
The structures give a status for each of the IDList passed in.

Caution note  Caution
Removing a schedule will also remove all of its schedule details.
Example
JSON Request
{
    "AuthToken":"QWcvOVRCZ0NMNmhQUU5Odnk5ZlQ1QT09LUJpN3lkL1FWbDFjMm1mOFN3YWtKVnlGMW54UmVocmUxandzQw==",
    "IDList":[3400,3444]
}
JSON Response
{
    "Report": {
        "APIVersion": "2.0",
        "ProcessTime": "0.0179143",
        "RequestTime": "/Date(1446145632919+0000)/",
        "ResponseTime": "/Date(1446145632937+0000)/",
        "Results": 2
    },
    "Results": [
        {
            "ID": 3400,
            "IsDeleted": true,
            "Message": "Schedule successfully deleted",
            "Status": 1
        },
        {
            "ID": 3444,
            "IsDeleted": false,
            "Message": "No schedule with ID:3444 found",
            "Status": 2
        }
    ]
}
SOAP: C# WCF Sample
private void DeleteSchedules(List<int> ids)
{
    try
    {
        var actionTestLogic = new Action<SoapServiceV2.ServiceRouterClient>((client) =>
        {
            // ==================================
            //Delete Schedule
            bool pass = true;
            SoapServiceV2.DeleteUserScheduleRequest request1 = new SoapServiceV2.DeleteUserScheduleRequest();
            request1.input = new SoapServiceV2.DeleteUserScheduleIn
            {
                AuthToken = AuthToken,
                IDList = ids
            };
            SoapServiceV2.DeleteUserScheduleResponse response1 = client.DeleteUserSchedule(request1);
            pass = (response1.DeleteUserScheduleResult.Results != null && response1.DeleteUserScheduleResult.Results.Count > 0) ? true : false;
            Assert.IsTrue(pass);

        });

        RunServiceClient(actionTestLogic);
    }
    catch (FaultException<SoapServiceV2.ServiceException> fe)
    {
        Assert.Fail(fe.Detail.Message);
    }
}
See Also