1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="CalendarNavigation.aspx.cs" Inherits="C1Schedule_CalendarNavigation" %> <%@ Register Assembly="C1.Web.UI.Controls.2" Namespace="C1.Web.UI.Controls.C1Calendar" TagPrefix="cal" %> <%@ Register Assembly="C1.Web.UI.Controls.2" Namespace="C1.Web.UI.Controls.C1Schedule" TagPrefix="sch" %> <asp:Content ID="Content1" ContentPlaceHolderID="DescriptionPlaceHolder1" Runat="Server"> Use C1Calendar in combination with C1Schedule to provide Outlook-style navigation for appointments. </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div style="clear:both;overflow:hidden;height:10px;width:100%;"> </div> <div style="height:550px;width:678px;background-color:#E3EFFF;border:solid 1px #8CAEDE;padding:5px;"> <div style="float:left;"> <cal:C1Calendar runat="server" ID="C1Calendar1" Width="185px" Height="138px" UseEmbeddedVisualStyles="true" VisualStyle="Office2007Blue" WebSchedule="C1Schedule1" /> </div> <div style="float:right;"> <sch:C1Schedule runat="server" ID="C1Schedule1" Width="487px" Height="547px" ShowViewSelectionBar="false" UseEmbeddedVisualStyles="true" VisualStyle="Office2007Blue" ViewType="DayView"> <DataStorage> <AppointmentStorage DataSourceID="AppointmentDS" DataMember="DefaultView"> <Mappings> <SubjectMapping MappingName="Subject" /> <LocationMapping MappingName="Location" /> <StartMapping MappingName="Start" /> <EndMapping MappingName="End" /> <IdMapping MappingName="Id" /> <BodyMapping MappingName="Body" /> <AppointmentProperties MappingName="Properties" /> </Mappings> </AppointmentStorage> </DataStorage> </sch:C1Schedule> </div> </div> <div style="clear:both;overflow:hidden;height:10px;width:100%;"> </div> <asp:ObjectDataSource ID="AppointmentDS" runat="server" DeleteMethod="DeleteAppointment" InsertMethod="InsertAppointment" SelectMethod="GetAppointments" TypeName="AppointmentSessionDataProvider" UpdateMethod="UpdateAppointment"> <UpdateParameters> <asp:Parameter DbType="Guid" Name="id" /> <asp:Parameter Name="body" Type="String" /> <asp:Parameter Name="end" Type="DateTime" /> <asp:Parameter Name="location" Type="String" /> <asp:Parameter Name="start" Type="DateTime" /> <asp:Parameter Name="subject" Type="String" /> <asp:Parameter Name="properties" Type="String" /> </UpdateParameters> <InsertParameters> <asp:Parameter DbType="Guid" Name="id" /> <asp:Parameter Name="body" Type="String" /> <asp:Parameter Name="end" Type="DateTime" /> <asp:Parameter Name="location" Type="String" /> <asp:Parameter Name="start" Type="DateTime" /> <asp:Parameter Name="subject" Type="String" /> <asp:Parameter Name="properties" Type="String" /> </InsertParameters> </asp:ObjectDataSource> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="ControlOptionsHolder1" Runat="Server"> </asp:Content>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class C1Schedule_CalendarNavigation : System.Web.UI.Page { protected void Page_Init(object sender, EventArgs e) { if (!Page.IsPostBack && !Page.IsCallback) AppointmentSessionDataProvider.ClearAppointments(); } protected void Page_Load(object sender, EventArgs e) { this.Culture = "en-US"; this.UICulture = "en-US"; } }