Class RecurrenceManager
Inheritance
RecurrenceManager
Assembly: SoDataBase.dll
Syntax
public class RecurrenceManager
Constructors
RecurrenceManager()
Declaration
public RecurrenceManager()
RecurrenceManager(Appointment, IEnumerable<Appointment>)
Declaration
public RecurrenceManager(Appointment bookingMaster, IEnumerable<Appointment> repetitions)
Parameters
RecurrenceManager(RecurrenceInfo)
Instantiate a RecurrenceManager providing a new recurrence pattern.
Declaration
public RecurrenceManager(RecurrenceInfo recurrenceInfo)
Parameters
Type |
Name |
Description |
RecurrenceInfo |
recurrenceInfo |
Information about the recurrence pattern.
|
RecurrenceManager(DateTime)
Declaration
public RecurrenceManager(DateTime date)
Parameters
Properties
Dates
Get or set the dates of the recurring appointments.
Declaration
public RecurrenceDate[] Dates { get; set; }
Property Value
IsRecurrencePatternChanged
Get if the recurrence pattern has been changed from the currently saved pattern.
This value will allways be false if the recurrence pattern has not yet been
insterted in the database.
Declaration
public bool IsRecurrencePatternChanged { get; }
Property Value
RecurrenceInfo
Get or set the current recurrence pattern.
Declaration
public RecurrenceInfo RecurrenceInfo { get; set; }
Property Value
Methods
ApplyLinks(ActivityLinksHelper, ActivityLinksHelper)
Declaration
[Obsolete("Not in use. Links are only added to the first appointment")]
public static void ApplyLinks(ActivityLinksHelper source, ActivityLinksHelper target)
Parameters
ApplyUdefValues(EntityUdefHelper, EntityUdefHelper)
Declaration
public static void ApplyUdefValues(EntityUdefHelper source, EntityUdefHelper target)
Parameters
BreakRecurrence()
Declaration
public void BreakRecurrence()
ConvertFromTimeZone(DateTime, Int32)
Declaration
public static DateTime ConvertFromTimeZone(DateTime date, int timeZoneID)
Parameters
Returns
CreateAppointmentForDate(Appointment, RecurrenceDate)
Declaration
public static Appointment CreateAppointmentForDate(Appointment originalAppointment, RecurrenceDate date)
Parameters
Type |
Name |
Description |
Appointment |
originalAppointment |
Original appointment to create a copy of with new date information.
|
RecurrenceDate |
date |
New date information to apply on the newly created appointment record.
|
Returns
GetDayInMonth(Int32, DateTime)
Get the date for a day in a month.
Declaration
public static DateTime GetDayInMonth(int day, DateTime month)
Parameters
Type |
Name |
Description |
Int32 |
day |
The day in the month.
|
DateTime |
month |
Month
|
Returns
Type |
Description |
DateTime |
Date of the day in the month.
|
GetDaysToMatchInPattern(DateTime)
Declaration
public int GetDaysToMatchInPattern(DateTime date)
Parameters
Returns
GetDaysToMatchInPattern(DayOfWeek)
Declaration
public int GetDaysToMatchInPattern(DayOfWeek dayOfWeek)
Parameters
Returns
GetDaysToMatchInPattern(DayOfWeek, Weekday)
Get Number of days until a match in the week pattern. Matching today is '0'.
Declaration
public static int GetDaysToMatchInPattern(DayOfWeek dayOfWeek, Weekday weekPattern)
Parameters
Type |
Name |
Description |
DayOfWeek |
dayOfWeek |
Current day of week as used by DateTime.
|
Weekday |
weekPattern |
Weekday pattern describing days in the week for recurrence.
|
Returns
Type |
Description |
Int32 |
Number of days until Match [0-6]. Today is 0.
|
GetDefaultRecurrenceInfo()
Declaration
public static RecurrenceInfo GetDefaultRecurrenceInfo()
Returns
GetDefaultRecurrenceInfo(DateTime)
Declaration
public static RecurrenceInfo GetDefaultRecurrenceInfo(DateTime date)
Parameters
Returns
GetEstimatedCount()
Declaration
public int GetEstimatedCount()
Returns
GetFirstDate(DateTime)
Get the first date of a recurrence. The first date can be the same as the date provided.
Declaration
public DateTime GetFirstDate(DateTime date)
Parameters
Type |
Name |
Description |
DateTime |
date |
First candidate for a date in a recurrence.
|
Returns
Type |
Description |
DateTime |
First valid date in a recurrence
|
GetNextDate(DateTime)
Declaration
public DateTime GetNextDate(DateTime date)
Parameters
Type |
Name |
Description |
DateTime |
date |
The previous date in recurrence.
|
Returns
Type |
Description |
DateTime |
The next date. The day after the provided date is the earliest date that will be returned.
|
GetRecurrenceDate(Appointment)
Declaration
public static RecurrenceDate GetRecurrenceDate(Appointment appointment)
Parameters
Returns
GetRecurrenceDate(AppointmentRow)
Declaration
public static RecurrenceDate GetRecurrenceDate(AppointmentRow appointment)
Parameters
Returns
GetRecurrenceDate(DateTime)
Declaration
public static RecurrenceDate GetRecurrenceDate(DateTime date)
Parameters
Returns
GetRecurrenceInfo(Appointment)
Get RecurrenceInfo from an appointment.
Declaration
public static RecurrenceInfo GetRecurrenceInfo(Appointment bookingMaster)
Parameters
Returns
GetRecurrenceInfo(RecurrenceRuleRow, DateTime)
Get a recurrence info from a recurrence rule row in the database with corresponding doby
Declaration
public static RecurrenceInfo GetRecurrenceInfo(RecurrenceRuleRow ruleRow, DateTime doBy)
Parameters
Returns
GetWeekDayInMonth(Weekday, Int32, DateTime)
Declaration
public static DateTime GetWeekDayInMonth(Weekday weekday, int week, DateTime month)
Parameters
Returns
OnAppointmentRowValueChanged(Appointment, TableRowBase, FieldInfo, Object, Object, Object)
Declaration
public void OnAppointmentRowValueChanged(Appointment app, TableRowBase fieldOwner, FieldInfo field, object persistedValue, object currentValue, object newValue)
Parameters
OnLinksAdded(Appointment, ActivityLinksHelper, AppointmentRow, RelationsRow)
Declaration
public void OnLinksAdded(Appointment app, ActivityLinksHelper linksHelper, AppointmentRow parent, RelationsRow item)
Parameters
OnLinksRemoved(Appointment, ActivityLinksHelper, AppointmentRow, RelationsRow)
Declaration
public void OnLinksRemoved(Appointment app, ActivityLinksHelper linksHelper, AppointmentRow parent, RelationsRow item)
Parameters
OnSaved(Boolean, Boolean)
Declaration
public void OnSaved(bool bSucceeded, bool isRecurring)
Parameters
OnTextChange(Appointment, String, String, String)
Declaration
public void OnTextChange(Appointment app, string persistedValue, string currentValue, string newValue)
Parameters
OnUdefValueChange(Appointment, String, Object, Object)
Declaration
public void OnUdefValueChange(Appointment app, string progId, object oldValue, object newValue)
Parameters
PrepareForSave(Boolean, Boolean)
Declaration
public void PrepareForSave(bool isRecurring, bool updateStartDate)
Parameters
RecalculateDays()
Declaration
public void RecalculateDays()
Examples
// Make some modifications to the RecurrenceInfo object.
recurrenceManager.RecalculateDays();
RecurrenceDate[] newDates = recurrenceManager.Days;
UpdateAppointmentWithDate(Appointment, RecurrenceDate)
Apply new date information on an appointment based on the provided date information.
Declaration
public static void UpdateAppointmentWithDate(Appointment appointment, RecurrenceDate date)
Parameters
Type |
Name |
Description |
Appointment |
appointment |
Appointment record to modify.
|
RecurrenceDate |
date |
Date information to apply on the appointment record.
|
UpdateConflicts(Int32, Int32, TimeSpan, TimeSpan, ParticipantInfo[])
Update the recurrence dates with conflict and letter day information, based on a list of participants.
Declaration
public void UpdateConflicts(int excludedAppointmentId, int excludedRecurrenceRuleId, TimeSpan startTime, TimeSpan endTime, params ParticipantInfo[] participants)
Parameters
Extension Methods
EnumUtil.MapEnums<From, To>(From)