问题描述:如何数据绑定到 C1EventsCalendar
问题解答:本文中介绍用C1EventsCalendar控件来创建一个全功能的日程安排应用程序。它可以从天、周、工作周或每月视图来显示共享日历或私人日历,并从一个绑定德数据源或内置数据源来保存和加载数据。
关键代码:
- DeleteCommand="DELETE FROM [Appointments] WHERE [AppointmentId] = ?"
- InsertCommand="INSERT INTO [Appointments] ([AppointmentId], [Description], [End],
- [Location], [Start], [Subject], [Properties], [Color], [Calendar], [Tag]) VALUES
- (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
- SelectCommand="SELECT * FROM [Appointments]"
- UpdateCommand="UPDATE [Appointments] SET [Description] = ?, [End] = ?,
- [Location] = ?, [Start] = ?, [Subject] = ?, [Properties] = ?, [Color] = ?,
- [Calendar] = ?, [Tag] = ? WHERE [AppointmentId] = ?"
复制代码
- EventStorage DataSourceID="AccessDataSource_Events">
- <Mappings>
- <IdMapping MappingName="AppointmentId" />
- <StartMapping MappingName="Start" />
- <EndMapping MappingName="End" />
- <SubjectMapping MappingName="Subject" />
- <LocationMapping MappingName="Location" />
- <DescriptionMapping MappingName="Description" />
- <ColorMapping MappingName="Color" />
- </Mappings>
- </EventStorage>
复制代码
效果截图:
源码下载:C1EventsCalendar-Databinding.7z (3.92 mb) (下载次数: 27) |
|