WeekDays Enum
Lists days and groups of days for recurrence patterns.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v18.1.Core.dll
Declaration
Members
Name | Description |
---|---|
Sunday
|
Specifies Sunday. |
Monday
|
Specifies Monday. |
Tuesday
|
Specifies Tuesday. |
Wednesday
|
Specifies Wednesday. |
Thursday
|
Specifies Thursday. |
Friday
|
Specifies Friday. |
Saturday
|
Specifies Saturday. |
WeekendDays
|
Specifies Saturday and Sunday. |
WorkDays
|
Specifies work days (Monday, Tuesday, Wednesday, Thursday and Friday). |
EveryDay
|
Specifies every day of the week. |
Remarks
Use this enumeration’s members to specify the days for recurrence patterns. This enumeration’s values are used by the RecurrenceInfo.WeekDays property.
Enumeration members are defined as follows:
- Sunday = 1,
- Monday = 2,
- Tuesday = 4,
- Wednesday = 8,
- Thursday = 16,
- Friday = 32,
- Saturday = 64,
- WeekendDays = Sunday | Saturday,
- WorkDays = Monday | Tuesday | Wednesday | Thursday | Friday,
- EveryDay = WeekendDays | WorkDays
A combination of weekdays can be shifted one day up or down using the following code:
Note
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-handle-a-weekly-recurrence-rule-in-different-time-zones-e1923
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="DefaultDataSources.ascx.cs" Inherits="DefaultDataSources" %>
<asp:AccessDataSource ID="dbAppointmentDataSource" runat="server" DataFile="~/App_Data/CarsDB.mdb"
DeleteCommand="DELETE FROM [CarScheduling] WHERE [ID] = ?"
InsertCommand="INSERT INTO [CarScheduling] ([CarId], [Status], [Subject], [Description], [Label], [StartTime], [EndTime], [Location], [AllDay], [EventType], [RecurrenceInfo], [ReminderInfo], [Price], [ContactInfo]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
SelectCommand="SELECT [ID], [CarId], [Status], [Subject], [Description], [Label], [StartTime], [EndTime], [Location], [AllDay], [EventType], [RecurrenceInfo], [ReminderInfo], [Price], [ContactInfo] FROM [CarScheduling]"
UpdateCommand="UPDATE [CarScheduling] SET [CarId] = ?, [Status] = ?, [Subject] = ?, [Description] = ?, [Label] = ?, [StartTime] = ?, [EndTime] = ?, [Location] = ?, [AllDay] = ?, [EventType] = ?, [RecurrenceInfo] = ?, [ReminderInfo] = ?, [Price] = ?, [ContactInfo] = ? WHERE [ID] = ?">
<DeleteParameters>
<asp:Parameter Name="ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="CarId" Type="Int32" />
<asp:Parameter Name="Status" Type="Int32" />
<asp:Parameter Name="Subject" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Label" Type="Int32" />
<asp:Parameter Name="StartTime" Type="DateTime" />
<asp:Parameter Name="EndTime" Type="DateTime" />
<asp:Parameter Name="Location" Type="String" />
<asp:Parameter Name="AllDay" Type="Boolean" />
<asp:Parameter Name="EventType" Type="Int32" />
<asp:Parameter Name="RecurrenceInfo" Type="String" />
<asp:Parameter Name="ReminderInfo" Type="String" />
<asp:Parameter Name="Price" Type="Double"/>
<asp:Parameter Name="ContactInfo" Type="String"/>
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="CarId" Type="Int32" />
<asp:Parameter Name="Status" Type="Int32" />
<asp:Parameter Name="Subject" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Label" Type="Int32" />
<asp:Parameter Name="StartTime" Type="DateTime" />
<asp:Parameter Name="EndTime" Type="DateTime" />
<asp:Parameter Name="Location" Type="String" />
<asp:Parameter Name="AllDay" Type="Boolean" />
<asp:Parameter Name="EventType" Type="Int32" />
<asp:Parameter Name="RecurrenceInfo" Type="String" />
<asp:Parameter Name="ReminderInfo" Type="String" />
<asp:Parameter Name="Price" Type="Double"/>
<asp:Parameter Name="ContactInfo" Type="String"/>
</InsertParameters>
</asp:AccessDataSource>
<asp:AccessDataSource ID="dbResourceDataSource" runat="server" DataFile="~/App_Data/CarsDB.mdb"
SelectCommand="SELECT [ID], [Model] FROM [Cars] WHERE ID < 6">
</asp:AccessDataSource>
<asp:AccessDataSource ID="dbUsageTypeDataSource" runat="server" DataFile="~/App_Data/CarsDB.mdb"
SelectCommand="SELECT [Name], [Color] FROM [UsageType]">
</asp:AccessDataSource>
<asp:ObjectDataSource ID="temporaryAppointmentDataSource" runat="server" DataObjectTypeName="CustomEvent" TypeName="CustomEventDataSource" DeleteMethod="DeleteMethodHandler" SelectMethod="SelectMethodHandler" InsertMethod="InsertMethodHandler" OnObjectCreated="temporaryAppointmentDataSource_ObjectCreated" UpdateMethod="UpdateMethodHandler">
</asp:ObjectDataSource>
<asp:ObjectDataSource ID="temporaryResourceDataSource" runat="server" DataObjectTypeName="CustomResource" TypeName="CustomResourceDataSource" DeleteMethod="DeleteMethodHandler" SelectMethod="SelectMethodHandler" InsertMethod="InsertMethodHandler" OnObjectCreated="temporaryResourceDataSource_ObjectCreated" UpdateMethod="UpdateMethodHandler">
</asp:ObjectDataSource>
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the WeekDays enum.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.