Class Appointment
Appointments, documents (document_id != 0).
Entity Object for table 'appointment'. Entity objects represent full entities with both the base table object and all related objects, such as udef, publish, visiblefor, and things like owner associate and whatever else is logically related to the base object.Inherited Members
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public class Appointment : EntityBase, INestedPersist, ISoItem, ITableRowLoadHandler, IEntityUdefHelperContainer
Remarks
Entity objects can be created in several ways.
- Use the static CreateNew() method to create a new, empty object. After populating it with values,
you call the
method and corresponding row(s) in the database are created, and the objects' primary key field updated. This is the preferred way to insert new entities into the database. - You can create a (nested) Appointment Appointment.CustomSearch object to obtain a query pre-populated with the correct tableinfo and return fields. This query can be modified with restrictions, etc. Then, use the static GetFromCustomSearch(Appointment.CustomSearch) method to apply the query to the database and obtain the result as an Entity object. This is how you select existing entities from the database when you have a query that does not correspond to any of the existing database indexes.
- For each unique index defined for the table, there is a corresponding GetFromIdx method to make retrieving data via the indexes easy.
Note that if you try to fetch a row that does not exist (for instance, by using the primary key index and specifying a primary key that does
not exist in the database), you will get a Row object with the
and properties set to true. Such an Entity object is called a 'ghost' and cannot be updated, saved or deleted. You can also get a ghost if the row does exist in the database, but the Sentry system denies Select rights to the row.
Unique indexes on Appointment are:
Index fields | Nested index class name |
---|---|
AppointmentId | AppointmentId: Primary key Nested index class: Appointment.IdxAppointmentIdStatic Get method: GetFromIdxAppointmentId(Int32) |
ActiveDate, MotherId, Type, DocumentId, AppointmentId, AssignedBy, AssociateId, ProjectId, GroupIdx, Registered, RegisteredAssociateId | ActiveDate: The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status MotherId:ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment Type:See note. DocumentId:Points to document record; 0 for non-document appointments! AppointmentId:Primary key AssignedBy:Who (last) assigned this appointment to associate_id? AssociateId:ID of associate whose diary the appointment is in, REQUIRED ProjectId:ID of project referred to, may be 0 GroupIdx:Group of owning associate at the time the appnt was created Registered:Registered on RegisteredAssociateId:Registered by Nested index class: Appointment.IdxActiveDateMotherIdTypeDocumentIdAppointmentIdAssignedByAssociateIdProjectIdGroupIdxRegisteredRegisteredAssociateId |
ActiveDate, AssociateId, AppointmentId, MotherId | ActiveDate: The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status AssociateId:ID of associate whose diary the appointment is in, REQUIRED AppointmentId:Primary key MotherId:ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment Nested index class: Appointment.IdxActiveDateAssociateIdAppointmentIdMotherIdStatic Get method: GetFromIdxActiveDateAssociateIdAppointmentIdMotherId(DateTime, Int32, Int32, Int32) |
AssociateId, GroupIdx, ActiveDate, Type, Registered, MotherId, AppointmentId, AssignedBy, Status, RegisteredAssociateId | AssociateId: ID of associate whose diary the appointment is in, REQUIRED GroupIdx:Group of owning associate at the time the appnt was created ActiveDate:The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status Type:See note. Registered:Registered on MotherId:ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment AppointmentId:Primary key AssignedBy:Who (last) assigned this appointment to associate_id? Status:See note. RegisteredAssociateId:Registered by Nested index class: Appointment.IdxAssociateIdGroupIdxActiveDateTypeRegisteredMotherIdAppointmentIdAssignedByStatusRegisteredAssociateId |
Index fields | Nested index class name |
---|---|
ActiveDate, Status, Type, AssociateId | ActiveDate: The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status Status:See note. Type:See note. AssociateId:ID of associate whose diary the appointment is in, REQUIRED Nested index class: AppointmentCollection.IdxActiveDateStatusTypeAssociateIdStatic Get method: GetFromIdxActiveDateStatusTypeAssociateId(DateTime, AppointmentStatus, AppointmentType, Int32) |
ContactId, Type | ContactId: Contact ID of owning contact, may be 0 Type:See note. Nested index class: AppointmentCollection.IdxContactIdTypeStatic Get method: GetFromIdxContactIdType(Int32, AppointmentType) |
ProjectId, Type | ProjectId: ID of project referred to, may be 0 Type:See note. Nested index class: AppointmentCollection.IdxProjectIdTypeStatic Get method: GetFromIdxProjectIdType(Int32, AppointmentType) |
MotherId | MotherId: ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment Nested index class: AppointmentCollection.IdxMotherIdStatic Get method: GetFromIdxMotherId(Int32) |
DoBy, Type, EndDate, AssociateId | DoBy: Date + start time planned Type:See note. EndDate:Date + end time planned AssociateId:ID of associate whose diary the appointment is in, REQUIRED Nested index class: AppointmentCollection.IdxDoByTypeEndDateAssociateIdStatic Get method: GetFromIdxDoByTypeEndDateAssociateId(DateTime, AppointmentType, DateTime, Int32) |
ActiveDate | ActiveDate: The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status Nested index class: AppointmentCollection.IdxActiveDateStatic Get method: GetFromIdxActiveDate(DateTime) |
AssociateId, DoBy, Status, Type | AssociateId: ID of associate whose diary the appointment is in, REQUIRED DoBy:Date + start time planned Status:See note. Type:See note. Nested index class: AppointmentCollection.IdxAssociateIdDoByStatusTypeStatic Get method: GetFromIdxAssociateIdDoByStatusType(Int32, DateTime, AppointmentStatus, AppointmentType) |
ActiveDate, MotherId, RecurrenceRuleId | ActiveDate: The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status MotherId:ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment RecurrenceRuleId:Pointer to recurrence rule, for recurring appointments, otherwise 0 Nested index class: AppointmentCollection.IdxActiveDateMotherIdRecurrenceRuleIdStatic Get method: GetFromIdxActiveDateMotherIdRecurrenceRuleId(DateTime, Int32, Int32) |
Source | Source: For future integration use; source of record Nested index class: AppointmentCollection.IdxSourceStatic Get method: GetFromIdxSource(Int16) |
ContactId | ContactId: Contact ID of owning contact, may be 0 Nested index class: AppointmentCollection.IdxContactIdStatic Get method: GetFromIdxContactId(Int32) |
ProjectId | ProjectId: ID of project referred to, may be 0 Nested index class: AppointmentCollection.IdxProjectIdStatic Get method: GetFromIdxProjectId(Int32) |
DocumentId | DocumentId: Points to document record; 0 for non-document appointments! Nested index class: AppointmentCollection.IdxDocumentIdStatic Get method: GetFromIdxDocumentId(Int32) |
AssociateId, Status, Done, Type | AssociateId: ID of associate whose diary the appointment is in, REQUIRED Status:See note. Done:Date + start time this task was actually performed Type:See note. Nested index class: AppointmentCollection.IdxAssociateIdStatusDoneTypeStatic Get method: GetFromIdxAssociateIdStatusDoneType(Int32, AppointmentStatus, DateTime, AppointmentType) |
PersonId | PersonId: Person ID of person the appointment is with, may be 0; if nonzero, must match the contact_id (which must then also be nonzero). Nested index class: AppointmentCollection.IdxPersonIdStatic Get method: GetFromIdxPersonId(Int32) |
AssociateId, RecurrenceRuleId, ActiveDate | AssociateId: ID of associate whose diary the appointment is in, REQUIRED RecurrenceRuleId:Pointer to recurrence rule, for recurring appointments, otherwise 0 ActiveDate:The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status Nested index class: AppointmentCollection.IdxAssociateIdRecurrenceRuleIdActiveDateStatic Get method: GetFromIdxAssociateIdRecurrenceRuleIdActiveDate(Int32, Int32, DateTime) |
GroupIdx | GroupIdx: Group of owning associate at the time the appnt was created Nested index class: AppointmentCollection.IdxGroupIdxStatic Get method: GetFromIdxGroupIdx(Int32) |
UserdefId | UserdefId: User-defined table record 1 (for future use) Nested index class: AppointmentCollection.IdxUserdefIdStatic Get method: GetFromIdxUserdefId(Int32) |
DoBy | DoBy: Date + start time planned Nested index class: AppointmentCollection.IdxDoByStatic Get method: GetFromIdxDoBy(DateTime) |
TextId | TextId: ID of record containing appointment text, may be 0 for no text; note that bookings share a common text record Nested index class: AppointmentCollection.IdxTextIdStatic Get method: GetFromIdxTextId(Int32) |
Userdef2Id | Userdef2Id: User-defined table record 2 (for future use) Nested index class: AppointmentCollection.IdxUserdef2IdStatic Get method: GetFromIdxUserdef2Id(Int32) |
Done | Done: Date + start time this task was actually performed Nested index class: AppointmentCollection.IdxDoneStatic Get method: GetFromIdxDone(DateTime) |
Constructors
Appointment(Appointment.AppointmentIdxBase)
Constructor for class Appointment.
This object represents a row in table 'appointment'.
Table contact: "Tasks, appointments, followups, phone calls; and documents"
Declaration
protected Appointment(Appointment.AppointmentIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
Appointment.AppointmentIdxBase | idx | ContactRowAppointmentRow.AppointmentRowIdx object that the Contact encapsulates. |
Appointment(AppointmentRow, Appointment.AppointmentIdxBase)
Declaration
protected Appointment(AppointmentRow row, Appointment.AppointmentIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
AppointmentRow | row | |
Appointment.AppointmentIdxBase | idx |
Fields
_appointmentText
Related HDB object(s).
Declaration
protected TextRow _appointmentText
Field Value
Type | Description |
---|---|
TextRow |
_assignedBy
Related HDB object(s).
Declaration
protected AssociateRow _assignedBy
Field Value
Type | Description |
---|---|
AssociateRow |
_associate
Related HDB object(s).
Declaration
protected AssociateRow _associate
Field Value
Type | Description |
---|---|
AssociateRow |
_bookingMaster
Related HDB object(s).
Declaration
protected AppointmentCollection _bookingMaster
Field Value
Type | Description |
---|---|
AppointmentCollection |
_contact
Related HDB object(s).
Declaration
protected Contact _contact
Field Value
Type | Description |
---|---|
Contact |
_createdAssociate
Related HDB object(s).
Declaration
protected AssociateRow _createdAssociate
Field Value
Type | Description |
---|---|
AssociateRow |
_docTmpl
Related HDB object(s).
Declaration
protected DocTmplRow _docTmpl
Field Value
Type | Description |
---|---|
DocTmplRow |
_invitedPerson
Related HDB object(s).
Declaration
protected Person _invitedPerson
Field Value
Type | Description |
---|---|
Person |
_person
Related HDB object(s).
Declaration
protected Person _person
Field Value
Type | Description |
---|---|
Person |
_priority
Related HDB object(s).
Declaration
protected PriorityRow _priority
Field Value
Type | Description |
---|---|
PriorityRow |
_project
Related HDB object(s).
Declaration
protected Project _project
Field Value
Type | Description |
---|---|
Project |
_recurrenceRule
Related HDB object(s).
Declaration
protected RecurrenceRuleRow _recurrenceRule
Field Value
Type | Description |
---|---|
RecurrenceRuleRow |
_row
HDB object this entity is a facade for.
Declaration
protected AppointmentRow _row
Field Value
Type | Description |
---|---|
AppointmentRow |
_rowIdx
Declaration
protected Appointment.AppointmentIdxBase _rowIdx
Field Value
Type | Description |
---|---|
Appointment.AppointmentIdxBase |
_task
Related HDB object(s).
Declaration
protected TaskRow _task
Field Value
Type | Description |
---|---|
TaskRow |
_udefLarge
Related HDB object(s).
Declaration
protected UDAppntLargeRow _udefLarge
Field Value
Type | Description |
---|---|
UDAppntLargeRow |
_udefSmall
Related HDB object(s).
Declaration
protected UDAppntSmallRow _udefSmall
Field Value
Type | Description |
---|---|
UDAppntSmallRow |
_updatedAssociate
Related HDB object(s).
Declaration
protected AssociateRow _updatedAssociate
Field Value
Type | Description |
---|---|
AssociateRow |
_userGroup
Related HDB object(s).
Declaration
protected UserGroupRow _userGroup
Field Value
Type | Description |
---|---|
UserGroupRow |
Properties
ActiveDate
The date to be used for searching & showing
Declaration
public DateTime ActiveDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
ActiveLinks
Number of active links to documents, other appointments, and such
Declaration
public uint ActiveLinks { get; set; }
Property Value
Type | Description |
---|---|
UInt32 |
Alarm
Alarm leadtime, the alarm flag has moved to hasAlarm
Declaration
public short Alarm { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
AlldayEvent
Is this an all day event: 0 = No, 1 = Yes
Declaration
public AllDayEvent AlldayEvent { get; set; }
Property Value
Type | Description |
---|---|
AllDayEvent |
AppointmentId
Primary key
Declaration
public int AppointmentId { get; }
Property Value
Type | Description |
---|---|
Int32 |
AppointmentText
Related object TextRow: Long text fields from all over the system
Declaration
public TextRow AppointmentText { get; set; }
Property Value
Type | Description |
---|---|
TextRow |
AssignedBy
Related object AssociateRow: Employees, resources and other users - except for External persons
Declaration
public AssociateRow AssignedBy { get; set; }
Property Value
Type | Description |
---|---|
AssociateRow |
Associate
Related object AssociateRow: Employees, resources and other users - except for External persons
Declaration
public AssociateRow Associate { get; set; }
Property Value
Type | Description |
---|---|
AssociateRow |
BookingMaster
Related object AppointmentCollection: "Tasks, appointments, followups, phone calls; and documents"
Declaration
public AppointmentCollection BookingMaster { get; }
Property Value
Type | Description |
---|---|
AppointmentCollection |
BookingType
Declaration
public BookingType BookingType { get; }
Property Value
Type | Description |
---|---|
BookingType |
ColorIndex
Appointment colour, used only in Japanese versions. Western versions take colour from Task
Declaration
public short ColorIndex { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Contact
Related object Contact: Companies and Organisations
Declaration
public Contact Contact { get; set; }
Property Value
Type | Description |
---|---|
Contact |
CreatedAssociate
Related object AssociateRow: Employees, resources and other users - except for External persons
Declaration
public AssociateRow CreatedAssociate { get; set; }
Property Value
Type | Description |
---|---|
AssociateRow |
CustomFields
Declaration
public EntityCustomFieldsHelper CustomFields { get; }
Property Value
Type | Description |
---|---|
EntityCustomFieldsHelper |
DoBy
date + start time planned
Declaration
public DateTime DoBy { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
DocTmpl
Related object DocTmplRow: Document template list table, valid where appointment is actually a document
Declaration
public DocTmplRow DocTmpl { get; set; }
Property Value
Type | Description |
---|---|
DocTmplRow |
Done
date + start time this task was done
Declaration
public DateTime Done { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
EndDate
Date + end time planned
Declaration
public DateTime EndDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
ExtraFields
Declaration
public EntityExtraFieldsHelper ExtraFields { get; }
Property Value
Type | Description |
---|---|
EntityExtraFieldsHelper |
FreeBusy
What kind of time is this: 0 = Busy, 1 = Free
Declaration
public FreeBusy FreeBusy { get; set; }
Property Value
Type | Description |
---|---|
FreeBusy |
HasAlarm
Does this appointment have an alarm
Declaration
public short HasAlarm { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
InvitedPerson
Related object Person: Persons in a company or an organisation
Declaration
public Person InvitedPerson { get; set; }
Property Value
Type | Description |
---|---|
Person |
IsDeleted
Is the row deleted?
Declaration
public override bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
IsMarkedForDelete
Gets or sets a value indicating whether this instance is marked for delete.
Declaration
public override bool IsMarkedForDelete { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
|
Overrides
IsNew
Is the row new, e.g. not been inserted to the database?
Declaration
public override bool IsNew { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
JoinVideoMeetUrl
Gets or sets the URL to the video meeting, if meeting has video-meeting.
Declaration
public string JoinVideoMeetUrl { get; set; }
Property Value
Type | Description |
---|---|
String |
LagTime
as leadtime, but after the end - time blocked for travel etc.
Declaration
public short LagTime { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Leadtime
Time blocked (minutes) BEFORE starttime
Declaration
public short Leadtime { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
LinksHelper
Links helper The helper manages the links belonging to the appointment. Helper updates the appointment's ActiveLinks property
Declaration
public ActivityLinksHelper LinksHelper { get; }
Property Value
Type | Description |
---|---|
ActivityLinksHelper |
Location
Location for appointment, defaulted from invited resource of type place and other rules, but you can write anything you want here
Declaration
public string Location { get; set; }
Property Value
Type | Description |
---|---|
String |
MainRow
Return the main row for the Entity.
Declaration
protected override TableRowBase MainRow { get; }
Property Value
Type | Description |
---|---|
TableRowBase |
Overrides
MotherId
"ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment. However, if 0 and assoc_id != reg_id then this is an assigned appointment, indicated vt type = kBooking"
Declaration
public int MotherId { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
OriginalStartDate
Declaration
public DateTime OriginalStartDate { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
Person
Related object Person: Persons in a company or an organisation
Declaration
public Person Person { get; set; }
Property Value
Type | Description |
---|---|
Person |
PreferredTZLocation
Temporary hardcoding
Declaration
public int PreferredTZLocation { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Priority
Related object PriorityRow: Priority list table
Declaration
public PriorityRow Priority { get; set; }
Property Value
Type | Description |
---|---|
PriorityRow |
Private
OBSOLETE - the VisibleFor table is used instead
Declaration
public AppointmentPrivate Private { get; set; }
Property Value
Type | Description |
---|---|
AppointmentPrivate |
Project
Related object Project: Projects
Declaration
public Project Project { get; set; }
Property Value
Type | Description |
---|---|
Project |
PublishHelper
Get the helper class for working with the publish-state of the entity.
Published means that it is available for external persons in applications
like SuperOffice Audience.
Declaration
public EntityPublishHelper PublishHelper { get; }
Property Value
Type | Description |
---|---|
EntityPublishHelper |
RecurrenceRule
Related object RecurrenceRuleRow: Link table, connects a BinaryObject with one or more owners
Declaration
public RecurrenceRuleRow RecurrenceRule { get; set; }
Property Value
Type | Description |
---|---|
RecurrenceRuleRow |
Registered
Registered date
Declaration
public DateTime Registered { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
RejectCounter
How many invitees have rejected this appointment
Declaration
public short RejectCounter { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
RejectReason
Why was this booking or assignment rejected, the RejectReason list is a source of suggestions but you can write anything here
Declaration
public string RejectReason { get; set; }
Property Value
Type | Description |
---|---|
String |
Row
The encapsulated object AppointmentRow.
Declaration
public AppointmentRow Row { get; }
Property Value
Type | Description |
---|---|
AppointmentRow |
Source
"For future integration use; source of record"
Declaration
public short Source { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
Status
status=done,started, not started, hidden
Declaration
public AppointmentStatus Status { get; set; }
Property Value
Type | Description |
---|---|
AppointmentStatus |
TableInfo
Get a TableInfo object for the appointment table.
Declaration
public AppointmentTableInfo TableInfo { get; }
Property Value
Type | Description |
---|---|
AppointmentTableInfo |
Task
Related object TaskRow: Task list table
Declaration
public TaskRow Task { get; set; }
Property Value
Type | Description |
---|---|
TaskRow |
Type
where=no start time,note,docin, docout
Declaration
public AppointmentType Type { get; set; }
Property Value
Type | Description |
---|---|
AppointmentType |
UdefHelper
Get the Udef class of EntityUdefHelper for working with udef fields
Declaration
public EntityUdefHelper UdefHelper { get; }
Property Value
Type | Description |
---|---|
EntityUdefHelper |
UdefLarge
Related object UDAppntLargeRow: User-defined fields
Declaration
public UDAppntLargeRow UdefLarge { get; set; }
Property Value
Type | Description |
---|---|
UDAppntLargeRow |
UdefSmall
Related object UDAppntSmallRow: User-defined fields
Declaration
public UDAppntSmallRow UdefSmall { get; set; }
Property Value
Type | Description |
---|---|
UDAppntSmallRow |
Updated
Updated date
Declaration
public DateTime Updated { get; set; }
Property Value
Type | Description |
---|---|
DateTime |
UpdatedAssociate
Related object AssociateRow: Employees, resources and other users - except for External persons
Declaration
public AssociateRow UpdatedAssociate { get; set; }
Property Value
Type | Description |
---|---|
AssociateRow |
UpdatedCount
Number of updates made to this record
Declaration
public short UpdatedCount { get; set; }
Property Value
Type | Description |
---|---|
Int16 |
UserGroup
Related object UserGroupRow: Secondary user groups
Declaration
public UserGroupRow UserGroup { get; set; }
Property Value
Type | Description |
---|---|
UserGroupRow |
VisibleForHelper
Get the helper class for working with the visible-for of the entity.
Declaration
public EntityVisibleForHelper VisibleForHelper { get; }
Property Value
Type | Description |
---|---|
EntityVisibleForHelper |
Methods
CreateNew()
Create a new instance of the Appointment entity.
Declaration
public static Appointment CreateNew()
Returns
Type | Description |
---|---|
Appointment | A new instance of the Appointment entity. |
CreateNew(Appointment.AppointmentIdxBase)
Create a new instance of the Appointment entity, by reading from the database using the specified index (represented by a nested index class).
Declaration
public static Appointment CreateNew(Appointment.AppointmentIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
Appointment.AppointmentIdxBase | idx | Index search, represented by a subclass if the Appointment.AppointmentIdxBase nested index class |
Returns
Type | Description |
---|---|
Appointment | A new instance of the Appointment entity. |
Delete()
Delete the row.
Declaration
public override void Delete()
Overrides
ForceEntityUpdate()
Force Updated and UpdatedAssociate to be updated with current time and Currently logged in associate. This will again be overridden in the Database update operation by a query processor.
Declaration
protected override void ForceEntityUpdate()
Overrides
FromAppointmentRow(AppointmentRow)
Operator asigning a Appointment from a AppointmentRow.
Declaration
public static Appointment FromAppointmentRow(AppointmentRow row)
Parameters
Type | Name | Description |
---|---|---|
AppointmentRow | row | AppointmentRow object |
Returns
Type | Description |
---|---|
Appointment | Appointment Entity |
FromAppointmentRow(AppointmentRow, Appointment.AppointmentIdxBase)
Declaration
public static Appointment FromAppointmentRow(AppointmentRow row, Appointment.AppointmentIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
AppointmentRow | row | |
Appointment.AppointmentIdxBase | idx |
Returns
Type | Description |
---|---|
Appointment |
GetAdditionalRelatedNestedPersist(List<INestedPersist>, Boolean)
Add the Links Helper to the list of related nestedpersist objects, to ensure it gets a chance to do its save operations
Declaration
protected override void GetAdditionalRelatedNestedPersist(List<INestedPersist> relatedObjects, bool lacyFetchIfNeeded)
Parameters
Type | Name | Description |
---|---|---|
List<INestedPersist> | relatedObjects | |
Boolean | lacyFetchIfNeeded |
Overrides
GetFromCustomSearch(Appointment.CustomSearch)
Create a new instance of the Appointment object, and populate it with data from a custom search. If the search returns no results, an empty entity will be returned; if the result contains rows, one Appointment object representing the first row will be returned. Any further rows in the result will be ignored.
Declaration
public static Appointment GetFromCustomSearch(Appointment.CustomSearch query)
Parameters
Type | Name | Description |
---|---|---|
Appointment.CustomSearch | query | The custom search to execute against the database |
Returns
Type | Description |
---|---|
Appointment | A new instance of the Appointment object, reflecting the result of the query. |
GetFromIdxActiveDateAssociateIdAppointmentIdMotherId(DateTime, Int32, Int32, Int32)
Create a new instance of the Appointment object, by querying the database table via the index 'IAssoc_idActiveDateMother_idId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Appointment GetFromIdxActiveDateAssociateIdAppointmentIdMotherId(DateTime activeDate, int associateId, int appointmentId, int motherId)
Parameters
Type | Name | Description |
---|---|---|
DateTime | activeDate | The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status |
Int32 | associateId | ID of associate whose diary the appointment is in, REQUIRED |
Int32 | appointmentId | Primary key |
Int32 | motherId | ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment |
Returns
Type | Description |
---|---|
Appointment | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the Appointment table. Non-unique indexes have corresponding inner classes and methods in the AppointmentCollection collection, since they may return more than one row.
GetFromIdxActiveDateMotherIdTypeDocumentIdAppointmentIdAssignedByAssociateIdProjectIdGroupIdxRegisteredRegisteredAssociateId(DateTime, Int32, AppointmentType, Int32, Int32, Int32, Int32, Int32, Int32, DateTime, Int32)
Create a new instance of the Appointment object, by querying the database table via the index 'IProj_idTypeActiveDateDoc_idAssoc_idGrp_idxMother_idAssignedByIdRegReg_id'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Appointment GetFromIdxActiveDateMotherIdTypeDocumentIdAppointmentIdAssignedByAssociateIdProjectIdGroupIdxRegisteredRegisteredAssociateId(DateTime activeDate, int motherId, AppointmentType type, int documentId, int appointmentId, int assignedBy, int associateId, int projectId, int groupIdx, DateTime registered, int registeredAssociateId)
Parameters
Type | Name | Description |
---|---|---|
DateTime | activeDate | The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status |
Int32 | motherId | ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment |
AppointmentType | type | See note. |
Int32 | documentId | Points to document record; 0 for non-document appointments! |
Int32 | appointmentId | Primary key |
Int32 | assignedBy | Who (last) assigned this appointment to associate_id? |
Int32 | associateId | ID of associate whose diary the appointment is in, REQUIRED |
Int32 | projectId | ID of project referred to, may be 0 |
Int32 | groupIdx | Group of owning associate at the time the appnt was created |
DateTime | registered | Registered on |
Int32 | registeredAssociateId | Registered by |
Returns
Type | Description |
---|---|
Appointment | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the Appointment table. Non-unique indexes have corresponding inner classes and methods in the AppointmentCollection collection, since they may return more than one row.
GetFromIdxAppointmentId(Int32)
Create a new instance of the Appointment object, by querying the database table via the index 'IDXAppntId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Appointment GetFromIdxAppointmentId(int appointmentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | appointmentId | Primary key |
Returns
Type | Description |
---|---|
Appointment | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the Appointment table. Non-unique indexes have corresponding inner classes and methods in the AppointmentCollection collection, since they may return more than one row.
GetFromIdxAssociateIdGroupIdxActiveDateTypeRegisteredMotherIdAppointmentIdAssignedByStatusRegisteredAssociateId(Int32, Int32, DateTime, AppointmentType, DateTime, Int32, Int32, Int32, AppointmentStatus, Int32)
Create a new instance of the Appointment object, by querying the database table via the index 'IMother_idStatusActiveDateReg_idRegAssignedByGrp_idxTypeAssoc_idId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Appointment GetFromIdxAssociateIdGroupIdxActiveDateTypeRegisteredMotherIdAppointmentIdAssignedByStatusRegisteredAssociateId(int associateId, int groupIdx, DateTime activeDate, AppointmentType type, DateTime registered, int motherId, int appointmentId, int assignedBy, AppointmentStatus status, int registeredAssociateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | associateId | ID of associate whose diary the appointment is in, REQUIRED |
Int32 | groupIdx | Group of owning associate at the time the appnt was created |
DateTime | activeDate | The date to be used for searching & showing, is either the same as the done or do_by dates depending on type and status |
AppointmentType | type | See note. |
DateTime | registered | Registered on |
Int32 | motherId | ID of mother appointment; self if booking master, master ID if booking slave, 0 if normal appointment |
Int32 | appointmentId | Primary key |
Int32 | assignedBy | Who (last) assigned this appointment to associate_id? |
AppointmentStatus | status | See note. |
Int32 | registeredAssociateId | Registered by |
Returns
Type | Description |
---|---|
Appointment | Row object that represents the result of the search. IsNew will be true if the query did not match any row in the table |
Remarks
This method represents one of the unique indexes on the Appointment table. Non-unique indexes have corresponding inner classes and methods in the AppointmentCollection collection, since they may return more than one row.
GetRelatedNestedPersist(List<INestedPersist>, Boolean)
Append all the related objects to a list of INestedPersist.
Declaration
protected override void GetRelatedNestedPersist(List<INestedPersist> relatedObjects, bool lacyFetchIfNeeded)
Parameters
Type | Name | Description |
---|---|---|
List<INestedPersist> | relatedObjects | List to append related objects to. |
Boolean | lacyFetchIfNeeded |
Overrides
InitBookingMaster()
Declaration
public void InitBookingMaster()
OnIdUpdate()
Update related objects with correct id's to make sure that relations are consistent before saving to the database.
Declaration
protected override void OnIdUpdate()
Overrides
OnPostSaveMe()
Handle actions needed to be taken after this object has been saved, but before saving objects depending upon this one.
Declaration
protected virtual void OnPostSaveMe()
OnPreIdUpdate()
Allow for "fake id's" to be forced upon related objects.
Declaration
protected override void OnPreIdUpdate()
Overrides
Remarks
In order to figure out which objects taking part of the nested save operation that actually needs to be saved, this method allows for "fake id's" to be forced upon related objects. Upon receiving the "fake id", the objects receiving such an id can determine if they needs to be persisted (e.g. saved) to the database. However, the fake id's forced upon related objects must be set to correct id's in the OnIdUpdate method taking place later in the save operation.
OnPreSaveMe()
Handle actions needed to be taken after objects this object depends on have been saved, but before this object is saved.
Declaration
protected virtual void OnPreSaveMe()
OnRowLoad(SoDataReader, TableRowBase)
Event raised when the row is loaded from the database
Declaration
protected override void OnRowLoad(SoDataReader reader, TableRowBase row)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | |
TableRowBase | row |
Overrides
OnRowLoaded()
Declaration
protected override void OnRowLoaded()
Overrides
SetDefaults()
Set default values for the entity.
Declaration
public void SetDefaults()
SetDefaults(DefaulterStrategy)
Set default values for the entity.
Declaration
public void SetDefaults(DefaulterStrategy strategy)
Parameters
Type | Name | Description |
---|---|---|
DefaulterStrategy | strategy | Strategy used when appliying default values. |
SetDefaults(TaskType)
Set default values for the entity based on the type of appointment.
Declaration
public void SetDefaults(TaskType type)
Parameters
Type | Name | Description |
---|---|---|
TaskType | type | The type of appointment |
SetDefaults(TaskType, DefaulterStrategy)
Set default values for the entity based on the type of appointment.
Declaration
public void SetDefaults(TaskType type, DefaulterStrategy strategy)
Parameters
Type | Name | Description |
---|---|---|
TaskType | type | The type of appointment |
DefaulterStrategy | strategy | Strategy used when appliying default values. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Validate()
Check the entity and related objects for consistency and required fields, and return fields and error messages.
Declaration
public override Dictionary<string, string> Validate()
Returns
Type | Description |
---|---|
Dictionary<String, String> | Field names and error messages |
Overrides
Operators
Explicit(AppointmentRow to Appointment)
Operator assigning a Appointment from a AppointmentRow.
Declaration
public static explicit operator Appointment(AppointmentRow row)
Parameters
Type | Name | Description |
---|---|---|
AppointmentRow | row | AppointmentRow object |
Returns
Type | Description |
---|---|
Appointment | Appointment Entity |
Explicit Interface Implementations
IEntityUdefHelperContainer.UDefLarge
Declaration
TableRowBase IEntityUdefHelperContainer.UDefLarge { get; }
Returns
Type | Description |
---|---|
TableRowBase |
IEntityUdefHelperContainer.UDefSmall
Declaration
TableRowBase IEntityUdefHelperContainer.UDefSmall { get; }
Returns
Type | Description |
---|---|
TableRowBase |