New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

The WebServiceAppointmentController provides a facade over a SchedulerProviderBase object and is used to call your provider from web services.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
public class WebServiceAppointmentController : IDisposable

Inheritance: objectWebServiceAppointmentController

Implements: IDisposable

Inherited Members object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

Instantiates a new WebServiceAppointmentController based on the default provider configured in web.config.

C#
public WebServiceAppointmentController()
Exceptions: ConfigurationException

If there is no provider configured in the web.config file a ConfigurationException will be thrown.

Instantiates a new WebServiceAppointmentController based on the supplied SchedulerProviderBase

C#
public WebServiceAppointmentController(SchedulerProviderBase provider)
Parameters:providerSchedulerProviderBase

The provider which will be used

Example:
cs-api-definition
XmlSchedulerProvider provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/data.xml"), true);
WebServiceAppointmentController controller = new WebServiceAppointmentController(provider);

Instantiates a new WebServiceAppointmentController by using the specified provider name.

C#
public WebServiceAppointmentController(string providerName)
Parameters:providerNamestring

The name of the provider configured in web.config

Properties

Gets or sets the comparer instance used to determine the appointment ordering within the same slot. By default, appointments are ordered by start time and duration.

C#
public IComparer<Appointment> AppointmentComparer { get; set; }

You need to implement an appointment comparer only if you've overriden the client-side Telerik.Web.UI.Appointment.prototype.compare(appointment) function. In this case both the server-side and client-side implementation must work in the same manner.

A factory for appointment instances.

C#
public IAppointmentFactory AppointmentFactory { get; set; }

The default factory returns instances of the Appointment class.

WebServiceAppointmentController needs to create appointment instances before passing them to the provider. You can use custom appointment classes by implementing an IAppointmentFactory and setting this property.

Methods

Creates a recurrence exception with the specified appointment data and returns the available appointments.

C#
public IEnumerable<AppointmentData> CreateRecurrenceException(ISchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData)
Parameters:schedulerInfoISchedulerInfo

A ISchedulerInfo object which contains the current time period.

recurrenceExceptionDataAppointmentData

A AppointmentData object which contains the exception properties.

Returns:

IEnumerable<AppointmentData>

Example:
cs-api-definition
[WebMethod]
public IEnumerable&lt;AppointmentData&gt; CreateRecurrenceException(SchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData)
{
return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData);
}

Creates the recurrence exception.

C#
public IEnumerable<T> CreateRecurrenceException<T>(ISchedulerInfo schedulerInfo, T recurrenceExceptionData) where T : IAppointmentData, new()
Parameters:schedulerInfoISchedulerInfo

The scheduler info.

recurrenceExceptionDataT

The recurrence exception data.

Returns:

IEnumerable<T>

Deletes the specified appointment and returns the available appointments.

C#
public IEnumerable<AppointmentData> DeleteAppointment(ISchedulerInfo schedulerInfo, AppointmentData appointmentData, bool deleteSeries)
Parameters:schedulerInfoISchedulerInfo

A ISchedulerInfo object which contains the current time period.

appointmentDataAppointmentData

A AppointmentData which represents the apointment that shoud be deleted.

deleteSeriesbool

Specified wether to delete the recurring series if the specified appointment is recurrence master.

Returns:

IEnumerable<AppointmentData>

Example:
cs-api-definition
[WebMethod]
public IEnumerable&lt;AppointmentData&gt; DeleteAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData, bool deleteSeries)
{
return Controller.DeleteAppointment(schedulerInfo, masterAppointmentData, deleteSeries);
}

Deletes the appointment.

C#
public IEnumerable<T> DeleteAppointment<T>(ISchedulerInfo schedulerInfo, T appointmentData, bool deleteSeries) where T : IAppointmentData, new()
Parameters:schedulerInfoISchedulerInfo

The scheduler info.

appointmentDataT

The appointment data.

deleteSeriesbool

The delete series.

Returns:

IEnumerable<T>

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

C#
public void Dispose()

Implements: IDisposable.Dispose()

C#
protected virtual void Dispose(bool disposing)
Parameters:disposingbool
C#
public IEnumerable<T> GetAppointment<T>(ISchedulerInfo schedulerInfo, Appointment appointment) where T : IAppointmentData, new()
Parameters:schedulerInfoISchedulerInfoappointmentAppointmentReturns:

IEnumerable<T>

Gets the appointments corresponding to specified time period

C#
public IEnumerable<AppointmentData> GetAppointments(ISchedulerInfo schedulerInfo)
Parameters:schedulerInfoISchedulerInfo

Contains the current time period

Returns:

IEnumerable<AppointmentData>

Example:
cs-api-definition
[WebMethod]
public IEnumerable&lt;AppointmentData&gt; GetAppointments(SchedulerInfo schedulerInfo)
{
return Controller.GetAppointments(schedulerInfo);
}

Gets the appointments.

C#
public IEnumerable<T> GetAppointments<T>(ISchedulerInfo schedulerInfo) where T : IAppointmentData, new()
Parameters:schedulerInfoISchedulerInfo

The scheduler info.

Returns:

IEnumerable<T>

Returns the resources of all appointments within the specified time period.

C#
public IEnumerable<ResourceData> GetResources(ISchedulerInfo schedulerInfo)
Parameters:schedulerInfoISchedulerInfo

The time period

Returns:

IEnumerable<ResourceData>

Gets the resources.

C#
public IEnumerable<T> GetResources<T>(ISchedulerInfo schedulerInfo) where T : IResourceData, new()
Parameters:schedulerInfoISchedulerInfo

The scheduler info.

Returns:

IEnumerable<T>

Inserts the specified appointment and returns the available appointments.

C#
public IEnumerable<AppointmentData> InsertAppointment(ISchedulerInfo schedulerInfo, AppointmentData appointmentData)
Parameters:schedulerInfoISchedulerInfo

A ISchedulerInfo object which contains the current time period.

appointmentDataAppointmentData

A AppointmentData object which contains the appointment properties.

Returns:

IEnumerable<AppointmentData>

Example:
cs-api-definition
[WebMethod]
public IEnumerable&lt;AppointmentData&gt; InsertAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData)
{
return Controller.InsertAppointment(schedulerInfo, appointmentData);
}

Inserts the appointment.

C#
public IEnumerable<T> InsertAppointment<T>(ISchedulerInfo schedulerInfo, T appointmentData) where T : IAppointmentData, new()
Parameters:schedulerInfoISchedulerInfo

The scheduler info.

appointmentDataT

The appointment data.

Returns:

IEnumerable<T>

Removes all recurrence exceptions of the specified recurrence master and returns the available appointments.

C#
public IEnumerable<AppointmentData> RemoveRecurrenceExceptions(ISchedulerInfo schedulerInfo, AppointmentData masterAppointmentData)
Parameters:schedulerInfoISchedulerInfo

A ISchedulerInfo object which contains the current time period.

masterAppointmentDataAppointmentData

A AppointmentData object which is the recurrence master.

Returns:

IEnumerable<AppointmentData>

Example:
cs-api-definition
[WebMethod]
public IEnumerable&lt;AppointmentData&gt; RemoveRecurrenceExceptions(SchedulerInfo schedulerInfo, AppointmentData masterAppointmentData)
{
return Controller.RemoveRecurrenceExceptions(schedulerInfo, masterAppointmentData);
}

Removes the recurrence exceptions.

C#
public IEnumerable<T> RemoveRecurrenceExceptions<T>(ISchedulerInfo schedulerInfo, T masterAppointmentData) where T : IAppointmentData, new()
Parameters:schedulerInfoISchedulerInfo

The scheduler info.

masterAppointmentDataT

The master appointment data.

Returns:

IEnumerable<T>

Updates the specified appointment and returns the available appointments.

C#
public IEnumerable<AppointmentData> UpdateAppointment(ISchedulerInfo schedulerInfo, AppointmentData appointmentData)
Parameters:schedulerInfoISchedulerInfo

A ISchedulerInfo object which contains the current time period.

appointmentDataAppointmentData

A AppointmentData object which contains the appointment properties.

Returns:

IEnumerable<AppointmentData>

Example:
cs-api-definition
[WebMethod]
public IEnumerable&lt;AppointmentData&gt; UpdateAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData)
{
return Controller.UpdateAppointment(schedulerInfo, appointmentData);
}

Updates the appointment.

C#
public IEnumerable<T> UpdateAppointment<T>(ISchedulerInfo schedulerInfo, T appointmentData) where T : IAppointmentData, new()
Parameters:schedulerInfoISchedulerInfo

The scheduler info.

appointmentDataT

The appointment data.

Returns:

IEnumerable<T>