<%@ Page Language="vb" AutoEventWireup="true" Inherits="Scheduler.Examples.Export.DefaultVB"CodeFile="DefaultVB.aspx.vb" %>
<%@ Register TagPrefix="sds" Namespace="Telerik.Web.SessionDS" %>
<%@ 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 rel="Stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadScheduler1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadScriptBlock runat="Server" ID="RadScriptBlock1">
<script type="text/javascript">
/* <![CDATA[ */
Sys.Application.add_load(function () {
demo.ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
});
/* ]]> */
</script>
<script type="text/javascript" src="scripts.js"></script>
</telerik:RadScriptBlock>
<div class="demo-container">
<telerik:RadButton RenderMode="Lightweight" ID="ImgBtn1" runat="server" Text="Export" OnClick="ImgBtn1_Click">
<Icon PrimaryIconCssClass="export" />
</telerik:RadButton>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" InitialDelayTime="200">
</telerik:RadAjaxLoadingPanel>
<telerik:RadScheduler RenderMode="Lightweight" runat="server" ID="RadScheduler1"
SelectedDate="2012-04-16" DayStartTime="08:00:00" DayEndTime="18:00:00" DataSourceID="AppointmentsDataSource"
DataKeyField="ID" DataSubjectField="Subject" DataDescriptionField="Description"
DataStartField="Start" DataEndField="End" DataReminderField="Reminder" DataRecurrenceField="RecurrenceRule"
DataRecurrenceParentKeyField="RecurrenceParentID" OnAppointmentCommand="RadScheduler1_AppointmentCommand">
<Reminders Enabled="true"></Reminders>
<AdvancedForm Modal="true"></AdvancedForm>
<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>
<AppointmentTemplate>
<%# Eval("Subject") %>
<div style="text-align: right;">
<asp:Button runat="server" ID="Button1" CssClass="rsExportButton" ToolTip="Export to iCalendar"
CommandName="Export" OnClientClick="Export(this, event); return false;" Style="cursor: pointer; cursor: hand;"></asp:Button>
</div>
</AppointmentTemplate>
<TimelineView UserSelectable="false"></TimelineView>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
</div>
<asp:SqlDataSource ID="AppointmentsDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:TelerikConnectionString35 %>" SelectCommand="SELECT * FROM [Appointments]"
InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [UserID], [RoomID], [RecurrenceRule], [RecurrenceParentID], [Annotations], [Description], [Reminder], [LastModified]) VALUES (@Subject, @Start, @End, @UserID, @RoomID, @RecurrenceRule, @RecurrenceParentID, @Annotations, @Description, @Reminder, @LastModified)"
UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [UserID] = @UserID, [RoomID] = @RoomID, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Annotations] = @Annotations, [Description] = @Description, [Reminder] = @Reminder, [LastModified] = @LastModified WHERE [ID] = @ID"
DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @ID">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32"></asp:Parameter>
</DeleteParameters>
<UpdateParameters>
<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="UserID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="RoomID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
<asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="Annotations" Type="String"></asp:Parameter>
<asp:Parameter Name="Description" Type="String"></asp:Parameter>
<asp:Parameter Name="Reminder" Type="String"></asp:Parameter>
<asp:Parameter Name="LastModified" Type="String"></asp:Parameter>
<asp:Parameter Name="ID" 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="UserID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="RoomID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="RecurrenceRule" Type="String"></asp:Parameter>
<asp:Parameter Name="RecurrenceParentID" Type="Int32"></asp:Parameter>
<asp:Parameter Name="Annotations" Type="String"></asp:Parameter>
<asp:Parameter Name="Description" Type="String"></asp:Parameter>
<asp:Parameter Name="Reminder" Type="String"></asp:Parameter>
<asp:Parameter Name="LastModified" Type="String"></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>