Class ConflictDetector
Utility class for detecting conflicts.
Inherited Members
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public static class ConflictDetector
Methods
GetConflicts(Int32, Int32, Int32[], ConflictDetector.ConflictTime[])
Get Conflicts.
Declaration
public static List<int>[, ] GetConflicts(int excludedAppointmentId, int excludedRecurrenceRuleId, int[] associates, params ConflictDetector.ConflictTime[] conflictTimes)
Parameters
Type | Name | Description |
---|---|---|
Int32 | excludedAppointmentId | AppointmentId not to include in list of conflicting appointments. Appointment with this id as primary key or mother id will be excluded in the conflict check. |
Int32 | excludedRecurrenceRuleId | Appointment records with this id as recurrence rule id will be excluded in the conflict check. |
Int32[] | associates | Associates to find conflicts for. |
ConflictDetector.ConflictTime[] | conflictTimes | Appointment times to find conflicts for. |
Returns
Type | Description |
---|---|
List<Int32>[,] | Two dimensional array of list of conflicting appointment ids. The first dimension contains dates and the second contains associates. Hence; [date, associate] yields the list of conflicting appointment ids. |
Remarks
Conflicts are normally calculated for only one associate or only one date. If the number of dates or number of associates is 0, a correspondingly empty response is immediately returned.
GetConflicts(Int32, Int32, Int32[], TimeSpan, TimeSpan, DateTime[])
Get conflicts.
Declaration
public static List<int>[, ] GetConflicts(int excludedAppointmentId, int excludedRecurrenceRuleId, int[] associates, TimeSpan startTime, TimeSpan endTime, params DateTime[] dates)
Parameters
Type | Name | Description |
---|---|---|
Int32 | excludedAppointmentId | AppointmentId not to include in list of conflicting appointments. Appointment with this id as primary key or mother id will be excluded in the conflict check. |
Int32 | excludedRecurrenceRuleId | Appointment records with this id as recurrence rule id will be excluded in the conflict check. |
Int32[] | associates | Associates to find conflicts for. |
TimeSpan | startTime | Start time (i.e. time of day) for the appointment. |
TimeSpan | endTime | End time (i.e. time of day) for the appointment. |
DateTime[] | dates | The dates the appointment occurs. |
Returns
Type | Description |
---|---|
List<Int32>[,] | Two dimensional array of list of conflicting appointment ids. The first dimension contains dates and the second contains associates. Hence; [date, associate] yields the list of conflicting appointment ids. |
Remarks
Conflicts are normally calculated for only one associate or only one date.
UpdateConflicts(Int32, Int32, Int32[], TimeSpan, TimeSpan, RecurrenceDate[])
Update conflicts on an array of RecurrenceDates ojects.
Declaration
public static void UpdateConflicts(int excludedAppointmentId, int excludedRecurrenceRuleId, int[] associates, TimeSpan startTime, TimeSpan endTime, RecurrenceDate[] recurrenceDates)
Parameters
Type | Name | Description |
---|---|---|
Int32 | excludedAppointmentId | AppointmentId not to include in list of conflicting appointments. Appointment with this id as primary key or mother id will be excluded in the conflict check. |
Int32 | excludedRecurrenceRuleId | Appointment records with this id as recurrence rule id will be excluded in the conflict check. |
Int32[] | associates | Associates to find conflicts for. This should normally only be of length = 1. |
TimeSpan | startTime | Start time (i.e. time of day) for the appointment. |
TimeSpan | endTime | End time (i.e. time of day) for the appointment. |
RecurrenceDate[] | recurrenceDates | Objects to update conflicts on. |
Remarks
There should normally only be one provided associate.