Class AppointmentUtility
Utility functions for Appointment services
Inheritance
AppointmentUtility
Assembly: SoDataBase.dll
Syntax
public static class AppointmentUtility
Methods
CleanSynchronizerValuesFromDescription(string)
Cleaning function for stripping out prefix and dividing line InfoBridge added to their appointments
Declaration
public static string CleanSynchronizerValuesFromDescription(string description)
Parameters
Type |
Name |
Description |
string |
description |
|
Returns
GetAgenda(string, bool)
Utility functions for Appointment services
Declaration
public static string GetAgenda(string description, bool cleanDescription = false)
Parameters
Type |
Name |
Description |
string |
description |
|
bool |
cleanDescription |
|
Returns
GetAgendaHtml(string, bool)
Utility functions for Appointment services
Declaration
public static string GetAgendaHtml(string description, bool cleanDescription = false)
Parameters
Type |
Name |
Description |
string |
description |
|
bool |
cleanDescription |
|
Returns
GetAllAppointmentRowsOfRecurrenceRuleID(int, bool)
Utility functions for Appointment services
Declaration
public static AppointmentRow[] GetAllAppointmentRowsOfRecurrenceRuleID(int recurrenceRuleId, bool motherAppointmentsOnly = false)
Parameters
Type |
Name |
Description |
int |
recurrenceRuleId |
|
bool |
motherAppointmentsOnly |
|
Returns
GetAppointmentIdFromRecurringId(int)
Utility functions for Appointment services
Declaration
public static int GetAppointmentIdFromRecurringId(int recurringId)
Parameters
Type |
Name |
Description |
int |
recurringId |
|
Returns
GetAppointmentIdFromUID(string)
Utility functions for Appointment services
Declaration
public static int GetAppointmentIdFromUID(string uid)
Parameters
Type |
Name |
Description |
string |
uid |
|
Returns
GetConnectionInfo()
Utility functions for Appointment services
Declaration
public static (ServiceAuthRecordData imap, ServiceAuthRecordData smtp, string sentFolder) GetConnectionInfo()
Returns
GetDescription(string, string)
Utility functions for Appointment services
Declaration
public static string GetDescription(string title, string agenda)
Parameters
Returns
GetExistingInvitationIdFromUID(string)
Utility functions for Appointment services
Declaration
public static int GetExistingInvitationIdFromUID(string uid)
Parameters
Type |
Name |
Description |
string |
uid |
|
Returns
GetInvitationRecordData(int)
Utility functions for Appointment services
Declaration
public static InvitationRecordData GetInvitationRecordData(int appointmentId)
Parameters
Type |
Name |
Description |
int |
appointmentId |
|
Returns
GetInvitationRecordDataFromUid(string)
Utility functions for Appointment services
Declaration
public static InvitationRecordData GetInvitationRecordDataFromUid(string uid)
Parameters
Type |
Name |
Description |
string |
uid |
|
Returns
GetInvitationRowFromUid(string)
Utility functions for Appointment services
Declaration
public static InvitationRow GetInvitationRowFromUid(string uid)
Parameters
Type |
Name |
Description |
string |
uid |
|
Returns
GetLastModifiedDateOfAppointment(AppointmentRow)
Returns the newest of the row's Registered and Updated fields.
The fields are stored as UTC in the DB, but are converted to DB-TZ when retrieved by the system, so we don't have to do any conversion.
Declaration
public static DateTime GetLastModifiedDateOfAppointment(this AppointmentRow row)
Parameters
Returns
GetOrCreateInvitationIdFromUID(string, out bool)
Utility functions for Appointment services
Declaration
public static int GetOrCreateInvitationIdFromUID(string uid, out bool rowCreated)
Parameters
Returns
GetOrCreateUidOfAppointment(int, string, DateTime, DateTime?, DateTime?, string, out int)
Utility functions for Appointment services
Declaration
public static string GetOrCreateUidOfAppointment(int appointmentId, string from, DateTime lastModified, DateTime? recurringStartDate, DateTime? recurringEndDate, string templateLanguage, out int sequence)
Parameters
Returns
GetOrganizerEmail(int)
Utility functions for Appointment services
Declaration
public static string GetOrganizerEmail(int appointmentId)
Parameters
Type |
Name |
Description |
int |
appointmentId |
|
Returns
GetOrganizerInfo(int)
Utility functions for Appointment services
Declaration
public static (string email, string fullname) GetOrganizerInfo(int appointmentId)
Parameters
Type |
Name |
Description |
int |
appointmentId |
|
Returns
GetRecurrenceRuleIdOfAppointmentId(int)
Utility functions for Appointment services
Declaration
public static int GetRecurrenceRuleIdOfAppointmentId(int appointmentId)
Parameters
Type |
Name |
Description |
int |
appointmentId |
|
Returns
GetRecurringSeriesForInvitedEmailAttendee(int, int)
Returns a RecurringSeries object containing recurring subseries that are related to the given recurrenceRuleId
. The returned array is sorted by DoBy, ascending. I.e. the earliest subseries is the first item in the list.
Declaration
public static RecurringSeries GetRecurringSeriesForInvitedEmailAttendee(int recurrenceRuleId, int invitedEmailId)
Parameters
Type |
Name |
Description |
int |
recurrenceRuleId |
|
int |
invitedEmailId |
|
Returns
GetRecurringSeriesForInvitedPerson(int, int)
Returns a RecurringSeries object containing recurring subseries that are related to the given recurrenceRuleId
. The returned array is sorted by DoBy, ascending. I.e. the earliest subseries is the first item in the list.
Declaration
public static RecurringSeries GetRecurringSeriesForInvitedPerson(int recurrenceRuleId, int invitedPersonId)
Parameters
Type |
Name |
Description |
int |
recurrenceRuleId |
|
int |
invitedPersonId |
|
Returns
GetRecurringSeriesOnlyMotherAppointments(int)
Returns a RecurringSeries object containing recurring subseries that are related to the given recurrenceRuleId
. The returned array is sorted by DoBy, ascending. I.e. the earliest subseries is the first item in the list.
Declaration
public static RecurringSeries GetRecurringSeriesOnlyMotherAppointments(int recurrenceRuleId)
Parameters
Type |
Name |
Description |
int |
recurrenceRuleId |
|
Returns
GetTemplateLanguage(int)
SO Language code used for e-mail invites for this appointment.
Declaration
public static string GetTemplateLanguage(int appointmentId)
Parameters
Type |
Name |
Description |
int |
appointmentId |
|
Returns
Type |
Description |
string |
SO Language code ("US", "SW" or "GE") or NULL if appointment not found.
|
GetTitle(string, bool)
Utility functions for Appointment services
Declaration
public static string GetTitle(string description, bool cleanDescription = false)
Parameters
Type |
Name |
Description |
string |
description |
|
bool |
cleanDescription |
|
Returns
HasCalendarAccess(int, int)
Checks whether the active person has access to see someones calendar.
Declaration
public static bool HasCalendarAccess(int activePersonId, int calendarOwnerId)
Parameters
Type |
Name |
Description |
int |
activePersonId |
Person id of the active person (the one logged on).
|
int |
calendarOwnerId |
The id of the person whose calendar the logged on user wants to see
|
Returns
Type |
Description |
bool |
True if access is allowed, false otherwise.
|
HaveChanged(string, string)
Utility functions for Appointment services
Declaration
public static bool HaveChanged(string dataContainerValue, string carrierValue)
Parameters
Type |
Name |
Description |
string |
dataContainerValue |
|
string |
carrierValue |
|
Returns
TryGetNearestUidOfAppointmentId(int, int, out string, out int)
Utility functions for Appointment services
Declaration
public static bool TryGetNearestUidOfAppointmentId(int recurrenceRuleId, int appointmentId, out string uid, out int sequence)
Parameters
Type |
Name |
Description |
int |
recurrenceRuleId |
|
int |
appointmentId |
|
string |
uid |
|
int |
sequence |
|
Returns
TryGetOfAppointmentIdFromRecurrenceId(int)
Attempts to match the appointment id to a recurring id from the Invitation table.
Declaration
public static int TryGetOfAppointmentIdFromRecurrenceId(int recurrenceRuleId)
Parameters
Type |
Name |
Description |
int |
recurrenceRuleId |
|
Returns
Attempts to match the appointment id to a Uid in the Invitation table. If the appointment id refers to a child, the mother id is used.
Declaration
public static bool TryGetRelatedUidOfAppointmentId(int appointmentId, out string uid)
Parameters
Type |
Name |
Description |
int |
appointmentId |
|
string |
uid |
|
Returns
TryGetUidFromRecurringAppointmentChild(int, out string)
Recurring chilren are not directly connected to the mother appointment listed in the invitation table
Declaration
public static bool TryGetUidFromRecurringAppointmentChild(int appointmentId, out string uid)
Parameters
Type |
Name |
Description |
int |
appointmentId |
|
string |
uid |
|
Returns
TryGetUidOfAppointmentId(int, out string, out int, out string)
Attempts to match the appointment id to a Uid in the Invitation table.
Declaration
public static bool TryGetUidOfAppointmentId(int appointmentId, out string uid, out int sequence, out string organizerEmail)
Parameters
Returns
Type |
Description |
bool |
First Uid found, sorted by invitationId ascending.
|
TryGetUidOfRecurrenceId(int, out string)
Attempts to match the appointment id to a Uid in the Invitation table.
Declaration
public static bool TryGetUidOfRecurrenceId(int recurrenceRuleId, out string uid)
Parameters
Type |
Name |
Description |
int |
recurrenceRuleId |
|
string |
uid |
|
Returns
UpdateLastModifiedAndIncrementSequence(int, DateTime, out string, DateTime?, DateTime?)
Utility functions for Appointment services
Declaration
public static int UpdateLastModifiedAndIncrementSequence(int invitationId, DateTime lastModified, out string organizerEmail, DateTime? recurringStartDate = null, DateTime? recurringEndDate = null)
Parameters
Returns
UpdateLastModifiedAndIncrementSequenceOfRow(InvitationRow, DateTime, out string, DateTime?, DateTime?)
Utility functions for Appointment services
Declaration
public static int UpdateLastModifiedAndIncrementSequenceOfRow(InvitationRow row, DateTime lastModified, out string organizerEmail, DateTime? recurringStartDate = null, DateTime? recurringEndDate = null)
Parameters
Returns
UpdateLastModifiedAndIncrementSequenceOfUid(string, DateTime, out string, DateTime?, DateTime?)
Updates the last modified value, and increments the sequence number of the uid in the Invitation table. Returns the new sequence number.
Declaration
public static int UpdateLastModifiedAndIncrementSequenceOfUid(string uid, DateTime lastModified, out string organizerEmail, DateTime? recurringStartDate = null, DateTime? recurringEndDate = null)
Parameters
Returns
Type |
Description |
int |
The new sequence number. -1 if failed.
|