Show / Hide Table of Contents

Class AppointmentUtility

Utility functions for Appointment services

Inheritance
Object
AppointmentUtility
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoDataBase.dll
Syntax
public static class AppointmentUtility

Methods

GetAllAppointmentRowsOfRecurrenceRuleID(Int32, Boolean)

Declaration
public static AppointmentRow[] GetAllAppointmentRowsOfRecurrenceRuleID(int recurrenceRuleId, bool motherAppointmentsOnly = false)
Parameters
Type Name Description
Int32 recurrenceRuleId
Boolean motherAppointmentsOnly
Returns
Type Description
AppointmentRow[]

GetAppointmentIdFromRecurringId(Int32)

Declaration
public static int GetAppointmentIdFromRecurringId(int recurringId)
Parameters
Type Name Description
Int32 recurringId
Returns
Type Description
Int32

GetAppointmentIdFromUID(String)

Declaration
public static int GetAppointmentIdFromUID(string uid)
Parameters
Type Name Description
String uid
Returns
Type Description
Int32

GetConnectionInfo()

Declaration
public static (ServiceAuthRecordData imap, ServiceAuthRecordData smtp, string sentFolder) GetConnectionInfo()
Returns
Type Description
ValueTuple<ServiceAuthRecordData, ServiceAuthRecordData, String>

GetExistingInvitationIdFromUID(String)

Declaration
public static int GetExistingInvitationIdFromUID(string uid)
Parameters
Type Name Description
String uid
Returns
Type Description
Int32

GetInvitationRecordData(Int32)

Declaration
public static InvitationRecordData GetInvitationRecordData(int appointmentId)
Parameters
Type Name Description
Int32 appointmentId
Returns
Type Description
InvitationRecordData

GetInvitationRecordDataFromUid(String)

Declaration
public static InvitationRecordData GetInvitationRecordDataFromUid(string uid)
Parameters
Type Name Description
String uid
Returns
Type Description
InvitationRecordData

GetInvitationRowFromUid(String)

Declaration
public static InvitationRow GetInvitationRowFromUid(string uid)
Parameters
Type Name Description
String uid
Returns
Type Description
InvitationRow

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
Type Name Description
AppointmentRow row
Returns
Type Description
DateTime

GetOrCreateInvitationIdFromUID(String, out Boolean)

Declaration
public static int GetOrCreateInvitationIdFromUID(string uid, out bool rowCreated)
Parameters
Type Name Description
String uid
Boolean rowCreated
Returns
Type Description
Int32

GetOrCreateUidOfAppointment(Int32, String, DateTime, Nullable<DateTime>, Nullable<DateTime>, out Int32)

Declaration
public static string GetOrCreateUidOfAppointment(int appointmentId, string from, DateTime lastModified, DateTime? recurringStartDate, DateTime? recurringEndDate, out int sequence)
Parameters
Type Name Description
Int32 appointmentId
String from
DateTime lastModified
Nullable<DateTime> recurringStartDate
Nullable<DateTime> recurringEndDate
Int32 sequence
Returns
Type Description
String

GetOrganizerEmail(Int32)

Declaration
public static string GetOrganizerEmail(int appointmentId)
Parameters
Type Name Description
Int32 appointmentId
Returns
Type Description
String

GetOrganizerInfo(Int32)

Declaration
public static (string email, string fullname) GetOrganizerInfo(int appointmentId)
Parameters
Type Name Description
Int32 appointmentId
Returns
Type Description
ValueTuple<String, String>

GetRecurrenceRuleIdOfAppointmentId(Int32)

Declaration
public static int GetRecurrenceRuleIdOfAppointmentId(int appointmentId)
Parameters
Type Name Description
Int32 appointmentId
Returns
Type Description
Int32

GetRecurringSeriesForInvitedPerson(Int32, Int32)

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
Int32 recurrenceRuleId
Int32 invitedPersonId
Returns
Type Description
RecurringSeries

GetRecurringSeriesOnlyMotherAppointments(Int32)

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
Int32 recurrenceRuleId
Returns
Type Description
RecurringSeries

HasCalendarAccess(Int32, Int32)

Checks whether the active person has access to see someones calendar.

Declaration
public static bool HasCalendarAccess(int activePersonId, int calendarOwnerId)
Parameters
Type Name Description
Int32 activePersonId

Person id of the active person (the one logged on).

Int32 calendarOwnerId

The id of the person whose calendar the logged on user wants to see

Returns
Type Description
Boolean

True if access is allowed, false otherwise.

TryGetNearestUidOfAppointmentId(Int32, Int32, out String, out Int32)

Declaration
public static bool TryGetNearestUidOfAppointmentId(int recurrenceRuleId, int appointmentId, out string uid, out int sequence)
Parameters
Type Name Description
Int32 recurrenceRuleId
Int32 appointmentId
String uid
Int32 sequence
Returns
Type Description
Boolean

TryGetOfAppointmentIdFromRecurrenceId(Int32)

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
Int32 recurrenceRuleId
Returns
Type Description
Int32

TryGetRelatedUidOfAppointmentId(Int32, out String)

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
Int32 appointmentId
String uid
Returns
Type Description
Boolean

TryGetUidFromRecurringAppointmentChild(Int32, 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
Int32 appointmentId
String uid
Returns
Type Description
Boolean

TryGetUidOfAppointmentId(Int32, out String, out Int32, 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
Type Name Description
Int32 appointmentId
String uid
Int32 sequence
String organizerEmail
Returns
Type Description
Boolean

First Uid found, sorted by invitationId ascending.

TryGetUidOfRecurrenceId(Int32, 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
Int32 recurrenceRuleId
String uid
Returns
Type Description
Boolean

UpdateLastModifiedAndIncrementSequence(Int32, DateTime, out String, Nullable<DateTime>, Nullable<DateTime>)

Declaration
public static int UpdateLastModifiedAndIncrementSequence(int invitationId, DateTime lastModified, out string organizerEmail, DateTime? recurringStartDate = default(DateTime? ), DateTime? recurringEndDate = default(DateTime? ))
Parameters
Type Name Description
Int32 invitationId
DateTime lastModified
String organizerEmail
Nullable<DateTime> recurringStartDate
Nullable<DateTime> recurringEndDate
Returns
Type Description
Int32

UpdateLastModifiedAndIncrementSequenceOfRow(InvitationRow, DateTime, out String, Nullable<DateTime>, Nullable<DateTime>)

Declaration
public static int UpdateLastModifiedAndIncrementSequenceOfRow(InvitationRow row, DateTime lastModified, out string organizerEmail, DateTime? recurringStartDate = default(DateTime? ), DateTime? recurringEndDate = default(DateTime? ))
Parameters
Type Name Description
InvitationRow row
DateTime lastModified
String organizerEmail
Nullable<DateTime> recurringStartDate
Nullable<DateTime> recurringEndDate
Returns
Type Description
Int32

UpdateLastModifiedAndIncrementSequenceOfUid(String, DateTime, out String, Nullable<DateTime>, Nullable<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 = default(DateTime? ), DateTime? recurringEndDate = default(DateTime? ))
Parameters
Type Name Description
String uid
DateTime lastModified
String organizerEmail
Nullable<DateTime> recurringStartDate
Nullable<DateTime> recurringEndDate
Returns
Type Description
Int32

The new sequence number. -1 if failed.

© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Back to top