Class ConflictDetector
Utility class for detecting conflicts.
Inherited Members
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public static class ConflictDetector
Methods
GetConflictTimes(int, int, int[], params ConflictTime[])
Utility class for detecting conflicts.
Declaration
public static List<ConflictDetector.ConflictTime>[,] GetConflictTimes(int excludedAppointmentId, int excludedRecurrenceRuleId, int[] associates, params ConflictDetector.ConflictTime[] conflictTimes)
Parameters
Type | Name | Description |
---|---|---|
int | excludedAppointmentId | |
int | excludedRecurrenceRuleId | |
int[] | associates | |
ConflictTime[] | conflictTimes |
Returns
Type | Description |
---|---|
List<ConflictTime>[,] |
GetConflictTimes(int, int, int[], TimeSpan, TimeSpan, params DateTime[])
Get conflicts.
Declaration
public static List<ConflictDetector.ConflictTime>[,] GetConflictTimes(int excludedAppointmentId, int excludedRecurrenceRuleId, int[] associates, TimeSpan startTime, TimeSpan endTime, params DateTime[] dates)
Parameters
Type | Name | Description |
---|---|---|
int | 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. |
int | excludedRecurrenceRuleId | Appointment records with this id as recurrence rule id will be excluded in the conflict check. |
int[] | 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<ConflictTime>[,] | 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.
GetConflicts(int, int, int[], params ConflictTime[])
Get Conflicts.
Declaration
public static List<int>[,] GetConflicts(int excludedAppointmentId, int excludedRecurrenceRuleId, int[] associates, params ConflictDetector.ConflictTime[] conflictTimes)
Parameters
Type | Name | Description |
---|---|---|
int | 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. |
int | excludedRecurrenceRuleId | Appointment records with this id as recurrence rule id will be excluded in the conflict check. |
int[] | associates | Associates to find conflicts for. |
ConflictTime[] | conflictTimes | Appointment times to find conflicts for. |
Returns
Type | Description |
---|---|
List<int>[,] | 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(int, int, int[], TimeSpan, TimeSpan, params 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 |
---|---|---|
int | 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. |
int | excludedRecurrenceRuleId | Appointment records with this id as recurrence rule id will be excluded in the conflict check. |
int[] | 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<int>[,] | 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(int, int, int[], 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 |
---|---|---|
int | 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. |
int | excludedRecurrenceRuleId | Appointment records with this id as recurrence rule id will be excluded in the conflict check. |
int[] | 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.