using System;
using System.Web.UI;

public partial class _Default : Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
    }

    protected void RadScheduler1_AppointmentInsert(object sender, Telerik.Web.UI.SchedulerCancelEventArgs e)
    {
        if (e.Appointment.Resources.Count < 1)
        {
            e.Appointment.Resources.Add(RadScheduler1.Resources.GetResource("rooms", 2));
            e.Appointment.Resources.Add(RadScheduler1.Resources.GetResource("types", 1));
        }

        if ((e.Appointment.Resources.GetResourceByType("types") != null) && (e.Appointment.Resources.GetResourceByType("rooms") == null))
        {
            e.Appointment.Resources.Add(RadScheduler1.Resources.GetResource("rooms", 2));
        }
    }
}
