<%@ Page Language="vb" AutoEventWireup="true" Inherits="Scheduler.Examples.Resources.DefaultVB"CodeFile="DefaultVB.aspx.vb" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>
<%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<div class="demo-container">
<telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
<telerik:RadButton RenderMode="Lightweight" ID="AlexCheckBox" runat="server" ToggleType="CheckBox" CssClass="alex" ButtonType="LinkButton" Checked="true" OnClick="btnToggle_Click">
<ToggleStates>
<telerik:RadButtonToggleState Text="Alex" Selected="true" PrimaryIconCssClass="rbToggleCheckboxChecked p-i-checkbox-checked" />
<telerik:RadButtonToggleState Text="Alex" PrimaryIconCssClass="rbToggleCheckbox p-i-checkbox" />
</ToggleStates>
</telerik:RadButton>
<telerik:RadButton RenderMode="Lightweight" ID="BobCheckBox" runat="server" ToggleType="CheckBox" CssClass="bob" ButtonType="LinkButton" Checked="true" OnClick="btnToggle_Click">
<ToggleStates>
<telerik:RadButtonToggleState Text="Bob" Selected="true" PrimaryIconCssClass="rbToggleCheckboxChecked p-i-checkbox-checked" />
<telerik:RadButtonToggleState Text="Bob" PrimaryIconCssClass="rbToggleCheckbox p-i-checkbox" />
</ToggleStates>
</telerik:RadButton>
<telerik:RadButton RenderMode="Lightweight" ID="CharlieCheckBox" runat="server" ToggleType="CheckBox" CssClass="charlie" ButtonType="LinkButton" Checked="false" OnClick="btnToggle_Click">
<ToggleStates>
<telerik:RadButtonToggleState Text="Charlie" Selected="true" PrimaryIconCssClass="rbToggleCheckboxChecked p-i-checkbox-checked" />
<telerik:RadButtonToggleState Text="Charlie" PrimaryIconCssClass="rbToggleCheckbox p-i-checkbox" />
</ToggleStates>
</telerik:RadButton>
<telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1" SelectedDate="2012-04-16"
Height="500px" DataSourceID="AppointmentsDataSource"
DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" OverflowBehavior="Auto">
<AdvancedForm Modal="true"></AdvancedForm>
<AgendaView UserSelectable="true" ResourceMarkerType="Block" />
<ResourceTypes>
<telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID"
DataSourceID="RoomsDataSource"></telerik:ResourceType>
<telerik:ResourceType KeyField="ID" Name="User" TextField="UserName" ForeignKeyField="UserID"
DataSourceID="UsersDataSource"></telerik:ResourceType>
</ResourceTypes>
<ResourceStyles>
<telerik:ResourceStyleMapping Type="User" Text="Alex" ApplyCssClass="rsCategoryBlue"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="User" Text="Bob" ApplyCssClass="rsCategoryOrange"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="User" Text="Charlie" ApplyCssClass="rsCategoryGreen"></telerik:ResourceStyleMapping>
</ResourceStyles>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
</telerik:RadAjaxPanel>
</div>
<asp:SqlDataSource ID="AppointmentsDataSource" runat="server"
ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
SelectCommand="SELECT * FROM [Appointments]" InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [RoomID], [UserID], [RecurrenceRule], [RecurrenceParentID]) VALUES (@Subject, @Start, @End , @RoomID, @UserID, @RecurrenceRule, @RecurrenceParentID)"
UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [RoomID] = @RoomID, [UserID] = @UserID, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID WHERE (ID = @ID)"
DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @ID">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="Subject" Type="String"></asp:Parameter>
<asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="RoomID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="UserID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
<asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Subject" Type="String"></asp:Parameter>
<asp:Parameter Name="Start" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="End" Type="DateTime"></asp:Parameter>
<asp:Parameter Name="RoomID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="UserID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
<asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
</InsertParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="RoomsDataSource" runat="server"
ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
SelectCommand="SELECT * FROM [Rooms]"></asp:SqlDataSource>
<asp:SqlDataSource ID="UsersDataSource" runat="server"
ProviderName="System.Data.SqlClient" ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>"
SelectCommand="SELECT * FROM [Users]"></asp:SqlDataSource>
</form>
</body>
</html>