Telerik RadScheduler Bind to SQL Server With Different Resource
来源:互联网 发布:vmware linux上网设置 编辑:程序博客网 时间:2024/04/19 14:23
Code Overview:
<telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Forward" /> <telerik:RadPane runat="Server" ID="rightPane" Scrolling="None" Width="615px"> <telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Windows7" Height="551px" ShowFooter="False" SelectedDate="2009-02-02" TimeZoneOffset="00:00:00" DayEndTime="21:00:00" FirstDayOfWeek="Monday" LastDayOfWeek="Friday" AppointmentStyleMode="Default" OnNavigationComplete="RadScheduler1_NavigationComplete" OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" OnAppointmentInsert="RadScheduler1_AppointmentInsert" DataEndField="End" DataKeyField="Id" DataSourceID="EntityDataSource1" DataStartField="Start" DataSubjectField="Subject"> <AdvancedForm Modal="true" /> <TimelineView UserSelectable="false" /> <ResourceTypes> <telerik:ResourceType KeyField="Id" Name="Room" TextField="Description" ForeignKeyField="TestResourceId" DataSourceID="EntityDataSource2" /> </ResourceTypes> <ResourceStyles> <telerik:ResourceStyleMapping Type="Room" Text="resource A" BackColor="Blue" /> <telerik:ResourceStyleMapping Type="Room" Text="resource B" BackColor="Orange" /> <telerik:ResourceStyleMapping Type="Room" Text="resource A" ApplyCssClass="rsCategoryGreen" /> </ResourceStyles> <AppointmentTemplate> <div class="rsAptSubject"> <%# Eval("Subject") %> </div> <%# Eval("Description") %> </AppointmentTemplate> <TimeSlotContextMenuSettings EnableDefault="true" /> <AppointmentContextMenuSettings EnableDefault="true" /> </telerik:RadScheduler> <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=IAppointmentEntities" DefaultContainerName="IAppointmentEntities" EnableFlattening="False" EntitySetName="Appointments"> </asp:EntityDataSource> <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=IAppointmentEntities" DefaultContainerName="IAppointmentEntities" EnableFlattening="False" EntitySetName="TestResources"> </asp:EntityDataSource> </telerik:RadPane> </telerik:RadSplitter>
Two Tables Structure
Sample Data
Appointments
ID Subject Description StartEndRecurrenceRuleRecurrenceParentIDReminderAnnotationsTestResourceId
1 .NET User Group MeetingNULL2011-11-14 12:00:00.0002011-11-15 12:00:00.000NULLNULLNULLNULL1
2 Scrum TrainingNULL2011-11-13 12:00:00.0002011-11-15 12:00:00.000NULLNULLNULLNULL1
3 Integration Partners Conference CallNULL2011-11-12 12:00:00.0002011-11-15 12:00:00.000NULLNULLNULLNULL2
4 DevConnect conferenceNULL2011-11-11 12:00:00.0002011-11-15 12:00:00.000NULLNULLNULLNULL2
5 DevMedia conferenceNULL2011-11-10 12:00:00.0002011-11-15 12:00:00.000NULLNULLNULLNULL1
TestResources
Id Description
1 resource A
2 resource B
3 resource C
4 resource D
5 resource E
Note (Enhancement): here is sample data for RecurrenceRule
DTSTART:20070330T063000Z DTEND:20070330T073000Z RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20070406T210000Z;BYDAY=MO,TU,WE,TH,FR;
DTSTART:20080218T000000Z
DTEND:20080219T000000Z
RRULE:FREQ=MONTHLY;INTERVAL=12;BYDAY=-2MO;COUNT=3;
This rule says: "The event starts at midnight on 18th of February 2008, lasts one day and repeats each year, for 3 years, on the second to last Monday of February". Now say this three times fast.
RecurrencePattern - This is the pattern that the appointment recurs by, whether it's on an hourly, daily, etc. basis (frequency), the day(s) of the week to recur on (DayOfWeekMask), the number of times to separate recurrence appointments by (every 2 weeks, every 5 days, etc.,which is the Interval), and several more factors.
RadScheduler currently uses either the DaysOfWeekMask or the Interval property of the DailyRecurrenceRule,e.g: .DaysOfWeekMask = Telerik.Web.UI.RecurrenceDay.WeekDays
Good Resource: http://dotnetslackers.com/articles/aspnet/Using-Teleriks-Scheduler-Component.aspx
http://dotnetslackers.com/articles/aspnet/Understanding-Teleriks-Scheduler-Recurrence.aspx
http://blogs.telerik.com/aspnet-ajax/posts/08-08-04/working-with-radscheduler-recurring-appointments-on-sql-server.aspx
Resource Style:
http://www.telerik.com/help/aspnet-ajax/scheduler-appearance-setting-appointment-style.html
- Telerik RadScheduler Bind to SQL Server With Different Resource
- Telerik RadScheduler With Database CRUD Internal
- Telerik RadScheduler - Zero Code to Support DataBase Source CRUD + reminder
- Android -- the project was not built due to a resource exists with a different case...
- Restore SQL Server database in same SQL server with different name
- Handling workloads on SQL Server 2008 with Resource Governor
- Android积累 the project was not built due to "a resource exists with a different case问题
- the project was not built due to "a resource exists with a different case'项目位置'的错误
- android出现the project was not built due to "a resource exists with a different case问题
- android出现the project was not built due to "a resource exists with a different case问题
- 【安卓学习问题日志】The project was not built due to "A resource exists with a different case
- 报错The project was not built due to "A resource exists with a different case: '/xxx/bin/classes/com
- Unable to load SQL Server OLEDB provide resource DLL错误
- Unable to load SQL Server OLEDB provide resource DLL错误
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- failed to load resource the server responded with a status of 500 (internal server error)
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- vc++建立service application
- SQL SERVER – 2005 – Find Database Status Using sys.databases or DATABASEPROPERTYEX
- JavaScript 隐藏控件(用于交换)
- linux设备驱动学习笔记7------led流水灯的驱动编写
- linux设备驱动学习笔记6------AD驱动的编写入门
- Telerik RadScheduler Bind to SQL Server With Different Resource
- 传智博客教育课程(转)
- 生成像VIM帮助一样能跳转的文档
- CronExpression_CronExpression 规则
- CronExpression_cronExpression中问号(?)的解释
- xcode4.2 中tabBar的模板的一些理解和体会
- 解决Linux系统、Vi、SQLPlus、PuTTY“中文乱码”问题
- s5pv210 方案出来了
- 去掉字符串中重复的字符