Class Person
Persons in a company or an organization
Entity Object for table 'person'. Entity objects represent full entities with both the base table object and all related objects, such as udef, 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 Person : 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) Person Person.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(Person.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 Person are:
Index fields | Nested index class name |
---|---|
PersonId | PersonId: Primary key Nested index class: Person.IdxPersonIdStatic Get method: GetFromIdxPersonId(Int32) |
Index fields | Nested index class name |
---|---|
CategoryIdx | CategoryIdx: Category if this is a B2C person, otherwise mirror of contact.category_idx Nested index class: SuperOffice.CRM.Entities.PersonCollection.IdxCategoryIdxStatic Get method: GetFromIdxCategoryIdx(Int32) |
PersonNumber | PersonNumber: Alphanumeric user-field Nested index class: PersonCollection.IdxPersonNumberStatic Get method: GetFromIdxPersonNumber(String) |
BusinessIdx | BusinessIdx: Business if this is a B2C person, otherwise mirror of contact.business_idx Nested index class: SuperOffice.CRM.Entities.PersonCollection.IdxBusinessIdxStatic Get method: GetFromIdxBusinessIdx(Int32) |
UserdefId | UserdefId: User-defined table record 1 Nested index class: PersonCollection.IdxUserdefIdStatic Get method: GetFromIdxUserdefId(Int32) |
Kanalname | Kanalname: JPN Nested index class: PersonCollection.IdxKanalnameStatic Get method: GetFromIdxKanalname(String) |
Lastname | Lastname: Last name Nested index class: PersonCollection.IdxLastnameStatic Get method: GetFromIdxLastname(String) |
ContactId | ContactId: Owning contact ID, 0 is not allowed Nested index class: PersonCollection.IdxContactIdStatic Get method: GetFromIdxContactId(Int32) |
Userdef2Id | Userdef2Id: User-defined table record 2 Nested index class: PersonCollection.IdxUserdef2IdStatic Get method: GetFromIdxUserdef2Id(Int32) |
Firstname | Firstname: First name Nested index class: PersonCollection.IdxFirstnameStatic Get method: GetFromIdxFirstname(String) |
Source | Source: How did we get this person? For future integration requirements Nested index class: PersonCollection.IdxSourceStatic Get method: GetFromIdxSource(Int16) |
Kanafname | Kanafname: JPN Nested index class: PersonCollection.IdxKanafnameStatic Get method: GetFromIdxKanafname(String) |
ContactId, Rank | ContactId: Owning contact ID, 0 is not allowed Rank:Display sort sequence; person with rank 1 has special role in selections (rank is unique within each contact and starts on 1). Nested index class: PersonCollection.IdxContactIdRankStatic Get method: GetFromIdxContactIdRank(Int32, Int16) |
Constructors
Person(Person.PersonIdxBase)
Constructor for class Person.
This object represents a row in table 'person'.
Table contact: Persons in a company or an organisation
Declaration
protected Person(Person.PersonIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
SuperOffice.CRM.Entities.Person.PersonIdxBase | idx | ContactRowPersonRow.PersonRowIdx object that the Contact encapsulates. |
Person(PersonRow, Person.PersonIdxBase)
Declaration
protected Person(PersonRow row, Person.PersonIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
PersonRow | row | |
SuperOffice.CRM.Entities.Person.PersonIdxBase | idx |
Fields
_address
Related HDB object(s).
Declaration
protected AddressRow _address
Field Value
Type | Description |
---|---|
AddressRow |
_appointments
Related HDB object(s).
Declaration
protected AppointmentCollection _appointments
Field Value
Type | Description |
---|---|
AppointmentCollection |
_associate
Related HDB object(s).
Declaration
protected AssociateRow _associate
Field Value
Type | Description |
---|---|
AssociateRow |
_business
Related HDB object(s).
Declaration
protected BusinessRow _business
Field Value
Type | Description |
---|---|
BusinessRow |
_category
Related HDB object(s).
Declaration
protected CategoryRow _category
Field Value
Type | Description |
---|---|
CategoryRow |
_chatEmails
Declaration
protected EmailRows _chatEmails
Field Value
Type | Description |
---|---|
EmailRows |
_consentPersons
Related HDB object(s).
Declaration
protected ConsentPersonRows _consentPersons
Field Value
Type | Description |
---|---|
ConsentPersonRows |
_contact
Related HDB object(s).
Declaration
protected Contact _contact
Field Value
Type | Description |
---|---|
Contact |
_country
Related HDB object(s).
Declaration
protected CountryRow _country
Field Value
Type | Description |
---|---|
CountryRow |
_createdAssociate
Related HDB object(s).
Declaration
protected AssociateRow _createdAssociate
Field Value
Type | Description |
---|---|
AssociateRow |
_emails
Related HDB object(s).
Declaration
protected EmailRows _emails
Field Value
Type | Description |
---|---|
EmailRows |
_faxes
Related HDB object(s).
Declaration
protected PhoneRows _faxes
Field Value
Type | Description |
---|---|
PhoneRows |
_info
Related HDB object(s).
Declaration
protected TextRow _info
Field Value
Type | Description |
---|---|
TextRow |
_interests
Related HDB object(s).
Declaration
protected PersonInterestRows _interests
Field Value
Type | Description |
---|---|
PersonInterestRows |
_internetPhones
Declaration
protected EmailRows _internetPhones
Field Value
Type | Description |
---|---|
EmailRows |
_invitations
Related HDB object(s).
Declaration
protected AppointmentCollection _invitations
Field Value
Type | Description |
---|---|
AppointmentCollection |
_mobilePhones
Related HDB object(s).
Declaration
protected PhoneRows _mobilePhones
Field Value
Type | Description |
---|---|
PhoneRows |
_officePhones
Related HDB object(s).
Declaration
protected PhoneRows _officePhones
Field Value
Type | Description |
---|---|
PhoneRows |
_pagers
Related HDB object(s).
Declaration
protected PhoneRows _pagers
Field Value
Type | Description |
---|---|
PhoneRows |
_position
Related HDB object(s).
Declaration
protected PersPosRow _position
Field Value
Type | Description |
---|---|
PersPosRow |
_privatePhones
Related HDB object(s).
Declaration
protected PhoneRows _privatePhones
Field Value
Type | Description |
---|---|
PhoneRows |
_projectMemberships
Related HDB object(s).
Declaration
protected ProjectMemberCollection _projectMemberships
Field Value
Type | Description |
---|---|
ProjectMemberCollection |
_row
HDB object this entity is a facade for.
Declaration
protected PersonRow _row
Field Value
Type | Description |
---|---|
PersonRow |
_rowIdx
Declaration
protected Person.PersonIdxBase _rowIdx
Field Value
Type | Description |
---|---|
SuperOffice.CRM.Entities.Person.PersonIdxBase |
_saleHistory
Related HDB object(s).
Declaration
protected SaleHistRows _saleHistory
Field Value
Type | Description |
---|---|
SaleHistRows |
_sales
Related HDB object(s).
Declaration
protected SaleCollection _sales
Field Value
Type | Description |
---|---|
SaleCollection |
_selectionMemberships
Related HDB object(s).
Declaration
protected SelectionMemberRows _selectionMemberships
Field Value
Type | Description |
---|---|
SelectionMemberRows |
_shipmentTypeReservations
Related HDB object(s).
Declaration
protected ShipmentTypeReservationRows _shipmentTypeReservations
Field Value
Type | Description |
---|---|
ShipmentTypeReservationRows |
_udefLarge
Related HDB object(s).
Declaration
protected UDPersonLargeRow _udefLarge
Field Value
Type | Description |
---|---|
UDPersonLargeRow |
_udefSmall
Related HDB object(s).
Declaration
protected UDPersonSmallRow _udefSmall
Field Value
Type | Description |
---|---|
UDPersonSmallRow |
_updatedAssociate
Related HDB object(s).
Declaration
protected AssociateRow _updatedAssociate
Field Value
Type | Description |
---|---|
AssociateRow |
_urls
Related HDB object(s).
Declaration
protected URLRows _urls
Field Value
Type | Description |
---|---|
URLRows |
Properties
ActiveInterests
"Number of records in pintr table; select count(*) from pintr pi where pi.person_id = this.person_id == activeInterests is always true"
Declaration
public short ActiveInterests { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Address
Related object AddressRow: Contact and Person addresses
Declaration
public AddressRow Address { get; set; }
Property Value
Type | Description |
---|---|
AddressRow |
Appointments
Related object AppointmentCollection: "Tasks, appointments, followups, phone calls; and documents"
Declaration
public AppointmentCollection Appointments { get; }
Property Value
Type | Description |
---|---|
AppointmentCollection |
Associate
Related object AssociateRow: Employees, resources and other users - except for External persons
Declaration
public AssociateRow Associate { get; set; }
Property Value
Type | Description |
---|---|
AssociateRow |
Business
Related object BusinessRow: Business list table
Declaration
public BusinessRow Business { get; set; }
Property Value
Type | Description |
---|---|
BusinessRow |
Category
Related object CategoryRow: Category list table
Declaration
public CategoryRow Category { get; set; }
Property Value
Type | Description |
---|---|
CategoryRow |
ChatEmails
Declaration
public EmailRows ChatEmails { get; }
Property Value
Type | Description |
---|---|
EmailRows |
ConsentPersons
Related object ConsentPersonRows: Link table between person and ConsentPerson
Declaration
public ConsentPersonRows ConsentPersons { get; }
Property Value
Type | Description |
---|---|
ConsentPersonRows |
Contact
Related object Contact: Companies and Organisations
Declaration
public Contact Contact { get; set; }
Property Value
Type | Description |
---|---|
Contact |
Country
Related object CountryRow: Country information
Declaration
public CountryRow Country { get; set; }
Property Value
Type | Description |
---|---|
CountryRow |
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 |
DayOfBirth
Birth date (day of month)
Declaration
public short DayOfBirth { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Department
Internal department address
Declaration
public string Department { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Emails
Related object EmailRows: Email addresses
Declaration
public EmailRows Emails { get; }
Property Value
Type | Description |
---|---|
EmailRows |
ExtraFields
Declaration
public EntityExtraFieldsHelper ExtraFields { get; }
Property Value
Type | Description |
---|---|
EntityExtraFieldsHelper |
Faxes
Related object PhoneRows: Contact and Person phonenumbers (+fax)
Declaration
public PhoneRows Faxes { get; }
Property Value
Type | Description |
---|---|
PhoneRows |
Firstname
First name
Declaration
public string Firstname { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Gender
Male/female. No jokes please. To be used for selecting correct salutations & grammar. 0 = unknown, 1 = female, 2 = male
Declaration
public short Gender { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
GroupId
Our contact's original group, if this is a B2C person, otherwise mirror of contact.group_id
Declaration
public int GroupId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Info
Related object TextRow: Long text fields from all over the system
Declaration
public TextRow Info { get; set; }
Property Value
Type | Description |
---|---|
TextRow |
Initials
Where Pierre van Mever becomes P. van Mever. Actually, initials to be used in formal addresses, mostly in the Ducth market
Declaration
public string Initials { get; set; }
Property Value
Type | Description |
---|---|
System.String |
InterestHelper
Interest helper. The helpers provide functionality that combines MDO list and 'what is actually selected', i.e., they combine entity subcollections with mdo lists. See the base class InterestHelper for more information!
Declaration
public PersonInterestHelper InterestHelper { get; }
Property Value
Type | Description |
---|---|
PersonInterestHelper |
Interests
Related object PersonInterestRows: Link table between person and person interest
Declaration
public PersonInterestRows Interests { get; }
Property Value
Type | Description |
---|---|
PersonInterestRows |
InternetPhones
Declaration
public EmailRows InternetPhones { get; }
Property Value
Type | Description |
---|---|
EmailRows |
Invitations
Related object AppointmentCollection: "Tasks, appointments, followups, phone calls; and documents"
Declaration
public AppointmentCollection Invitations { get; }
Property Value
Type | Description |
---|---|
AppointmentCollection |
IsDeleted
Is the row deleted?
Declaration
public override bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.Boolean |
Overrides
Kanafname
Kana last name, used in Japanese versions only
Declaration
public string Kanafname { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Kanalname
Kana last name, used in Japanese versions only
Declaration
public string Kanalname { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Lastname
Last name
Declaration
public string Lastname { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MainRow
Return the main row for the Entity.
Declaration
protected override TableRowBase MainRow { get; }
Property Value
Type | Description |
---|---|
TableRowBase |
Overrides
MiddleName
Middle name or 'van' etc.
Declaration
public string MiddleName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MobilePhones
Related object PhoneRows: Contact and Person phonenumbers (+fax)
Declaration
public PhoneRows MobilePhones { get; }
Property Value
Type | Description |
---|---|
PhoneRows |
MonthOfBirth
Birth month
Declaration
public short MonthOfBirth { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Mrmrs
e.g. Mrs sex_title
Declaration
public string Mrmrs { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Nomailing
Do not send DM's to this person
Declaration
public short Nomailing { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
OfficePhones
Related object PhoneRows: Contact and Person phonenumbers (+fax)
Declaration
public PhoneRows OfficePhones { get; }
Property Value
Type | Description |
---|---|
PhoneRows |
Pagers
Related object PhoneRows: Contact and Person phonenumbers (+fax)
Declaration
public PhoneRows Pagers { get; }
Property Value
Type | Description |
---|---|
PhoneRows |
PersonId
Primary key
Declaration
public int PersonId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PersonNumber
Alphanumeric user field
Declaration
public string PersonNumber { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PhonePresent
flag to show there are phone registrations
Declaration
public short PhonePresent { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Position
Related object PersPosRow: PersPos list table
Declaration
public PersPosRow Position { get; set; }
Property Value
Type | Description |
---|---|
PersPosRow |
Post1
Postal address, used in Japanese versions only
Declaration
public string Post1 { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Post2
Postal address, used in Japanese versions only
Declaration
public string Post2 { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Post3
Postal address, used in Japanese versions only
Declaration
public string Post3 { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PrivatePhones
Related object PhoneRows: Contact and Person phonenumbers (+fax)
Declaration
public PhoneRows PrivatePhones { get; }
Property Value
Type | Description |
---|---|
PhoneRows |
ProjectMemberships
Related object ProjectMemberCollection: Project members
Declaration
public ProjectMemberCollection ProjectMemberships { get; }
Property Value
Type | Description |
---|---|
ProjectMemberCollection |
Rank
Display sort sequence for default sort order
Declaration
public short Rank { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Registered
Registered date
Declaration
public DateTime Registered { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime |
Retired
1 = the user is retired and should have no rights, not appear in lists, etc.
Declaration
public short Retired { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Row
The encapsulated object PersonRow.
Declaration
public PersonRow Row { get; }
Property Value
Type | Description |
---|---|
PersonRow |
SaleHistory
Related object SaleHistRows: Mirror image of the Sale table, providing a full transaction history
Declaration
public SaleHistRows SaleHistory { get; }
Property Value
Type | Description |
---|---|
SaleHistRows |
Sales
Related object SaleCollection: Sales
Declaration
public SaleCollection Sales { get; }
Property Value
Type | Description |
---|---|
SaleCollection |
Salutation
Academic title, populated from Salutation list but can be overwritten with anything at all
Declaration
public string Salutation { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SelectionMemberships
Related object SelectionMemberRows: Selection members
Declaration
public SelectionMemberRows SelectionMemberships { get; }
Property Value
Type | Description |
---|---|
SelectionMemberRows |
ShipmentTypeReservations
Related object ShipmentTypeReservationRows: Link table between person and ShipmentTypeReservation
Declaration
public ShipmentTypeReservationRows ShipmentTypeReservations { get; }
Property Value
Type | Description |
---|---|
ShipmentTypeReservationRows |
Source
How did we get this person? For future integration needs
Declaration
public short Source { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
TableInfo
Get a TableInfo object for the person table.
Declaration
public PersonTableInfo TableInfo { get; }
Property Value
Type | Description |
---|---|
PersonTableInfo |
Title
Title
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String |
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 UDPersonLargeRow: User-defined fields
Declaration
public UDPersonLargeRow UdefLarge { get; set; }
Property Value
Type | Description |
---|---|
UDPersonLargeRow |
UdefSmall
Related object UDPersonSmallRow: User-defined fields
Declaration
public UDPersonSmallRow UdefSmall { get; set; }
Property Value
Type | Description |
---|---|
UDPersonSmallRow |
Updated
Last updated date
Declaration
public DateTime Updated { get; set; }
Property Value
Type | Description |
---|---|
System.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 times updated
Declaration
public short UpdatedCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Urls
Related object URLRows: Unified Resource Locators
Declaration
public URLRows Urls { get; }
Property Value
Type | Description |
---|---|
URLRows |
Usepersonaddress
If 1, use person's address for mailing instead of company address
Declaration
public short Usepersonaddress { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
YearOfBirth
Birth year (4 digit)
Declaration
public short YearOfBirth { get; set; }
Property Value
Type | Description |
---|---|
System.Int16 |
Methods
CreateNew()
Create a new instance of the Person entity.
Declaration
public static Person CreateNew()
Returns
Type | Description |
---|---|
Person | A new instance of the Person entity. |
CreateNew(Person.PersonIdxBase)
Create a new instance of the Person entity, by reading from the database using the specified index (represented by a nested index class).
Declaration
public static Person CreateNew(Person.PersonIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
SuperOffice.CRM.Entities.Person.PersonIdxBase | idx | Index search, represented by a subclass if the SuperOffice.CRM.Entities.Person.PersonIdxBase nested index class |
Returns
Type | Description |
---|---|
Person | A new instance of the Person 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
FromPersonRow(PersonRow)
Operator asigning a Person from a PersonRow.
Declaration
public static Person FromPersonRow(PersonRow row)
Parameters
Type | Name | Description |
---|---|---|
PersonRow | row | PersonRow object |
Returns
Type | Description |
---|---|
Person | Person Entity |
FromPersonRow(PersonRow, Person.PersonIdxBase)
Declaration
public static Person FromPersonRow(PersonRow row, Person.PersonIdxBase idx)
Parameters
Type | Name | Description |
---|---|---|
PersonRow | row | |
SuperOffice.CRM.Entities.Person.PersonIdxBase | idx |
Returns
Type | Description |
---|---|
Person |
GetFromCustomSearch(Person.CustomSearch)
Create a new instance of the Person 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 Person object representing the first row will be returned. Any further rows in the result will be ignored.
Declaration
public static Person GetFromCustomSearch(Person.CustomSearch query)
Parameters
Type | Name | Description |
---|---|---|
Person.CustomSearch | query | The custom search to execute against the database |
Returns
Type | Description |
---|---|
Person | A new instance of the Person object, reflecting the result of the query. |
GetFromIdxPersonId(Int32)
Create a new instance of the Person object, by querying the database table via the index 'IDXPersId'. This method is intended to make it easy to use efficient queries that match a database index.
Declaration
public static Person GetFromIdxPersonId(int personId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | personId | Primary key |
Returns
Type | Description |
---|---|
Person | 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 Person table. Non-unique indexes have corresponding inner classes and methods in the PersonCollection 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 |
---|---|---|
System.Collections.Generic.List<INestedPersist> | relatedObjects | List to append related objects to. |
System.Boolean | lacyFetchIfNeeded |
Overrides
IsNumberValid()
Validate number2 field - is it unique/blank according to numbering rules?
Declaration
public bool IsNumberValid()
Returns
Type | Description |
---|---|
System.Boolean | true if Number2 is ok |
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
OnIdUpdateImplementation()
Declaration
protected override void OnIdUpdateImplementation()
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.
OnPreIdUpdateImplementation()
Declaration
protected override void OnPreIdUpdateImplementation()
Overrides
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
OnSave(BatchSave)
Update the number of active interests so it reflects the current state
Declaration
protected override void OnSave(BatchSave batchSave)
Parameters
Type | Name | Description |
---|---|---|
BatchSave | batchSave |
Overrides
OnSaved(Boolean)
Declaration
protected override void OnSaved(bool succeeded)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | succeeded |
Overrides
SetDefaults()
Set default values for the entity.
Declaration
public void SetDefaults()
SetDefaults(DefaulterStrategy)
Declaration
public void SetDefaults(DefaulterStrategy strategy)
Parameters
Type | Name | Description |
---|---|---|
DefaulterStrategy | strategy |
SetDefaults(Int32)
Set default values for the entity.
Declaration
public void SetDefaults(int contactId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | contactId | Id of the contact the person belongs to. |
SetDefaults(Int32, DefaulterStrategy)
Set default values for the entity.
Declaration
public void SetDefaults(int contactId, DefaulterStrategy strategy)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | contactId | Id of the contact the person belongs to. |
DefaulterStrategy | strategy | Strategy used when appliying default values. |
Undelete()
Declaration
public void Undelete()
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 |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | Field names and error messages |
Overrides
Operators
Explicit(PersonRow to Person)
Operator assigning a Person from a PersonRow.
Declaration
public static explicit operator Person(PersonRow row)
Parameters
Type | Name | Description |
---|---|---|
PersonRow | row | PersonRow object |
Returns
Type | Description |
---|---|
Person | Person 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 |