﻿Type.registerNamespace("ITICClients");

ITICClients.eventServiceClient = function() {
}

ITICClients.eventServiceClient.prototype = {
    getLatestEvents: function(callback, errorCallback, showwaitscreen, controlid) {
        showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.GetLatestEvents(callback, errorCallback);
    },
    getAllEvents: function(callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        try {
            ITIC.SERVICES.ICalendarofEventsService.GetAllEvents(callback, errorCallback);
        }
        catch (e) {
            alert(e.message);
        }
    },

    getAllEventsPublic: function(callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.GetAllEventsPublic(callback, errorCallback);
    },

    getUpcomingEvents: function(callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.GetLatestEvents(callback, errorCallback);
    },

    AddCalenderEvent: function(calendarEvent, callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.AddCalenderEvent(calendarEvent, callback, errorCallback);
    },
    GetAnEvent: function(id, callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.GetAnEvent(id, callback, errorCallback);
    },
    UpdateEvent: function(calendarEvent, callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.UpdateCalenderEvent(calendarEvent, callback, errorCallback);
    },

    UpdateUpcominEventMonthSetting: function(month, callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.UpdateUpcomingEventSettings(month, callback, errorCallback);
    },
    GetUpcominEventMonthSetting: function(callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.GetUpcomingEventSetting(callback, errorCallback);
    },
    RemoveEvent: function(id, callback, errorCallback, showwaitscreen, controlid) {
        //showwaitscreen(controlid);
        ITIC.SERVICES.ICalendarofEventsService.DeleteCalenderEvent(id, callback, errorCallback);
    },
    dispose: function() {
        //disposed
    }
}

ITICClients.eventServiceClient.registerClass('ITICClients.eventServiceClient', null, Sys.IDisposable)


if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();