Class SaleGuideSubProviderBase<RootExtender>
Common base class for the Appointment and Document providers for Sale Guide items
Implements
Inherited Members
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoDataBase.dll
Syntax
public abstract class SaleGuideSubProviderBase<RootExtender> : TypedQueryProviderBase<ArchiveRow, RootExtender>, IArchiveProviderQueryMapping, IArchiveQueryProvider, IArchiveProviderExtensible, IArchiveTypedProvider<ArchiveRow>, IArchiveTypedProviderBase, IArchiveProvider, IArchiveProviderHasRows, IArchiveProviderHasColumns, IArchiveProviderHasEntities where RootExtender : IArchiveExtender, new()
Type Parameters
Name | Description |
---|---|
RootExtender |
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.Constructors
SaleGuideSubProviderBase(ArchiveRowTypeInfo)
Common base class for the Appointment and Document providers for Sale Guide items
Declaration
public SaleGuideSubProviderBase(ArchiveRowTypeInfo rowType)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRowTypeInfo | rowType |
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.Fields
_colId
Common base class for the Appointment and Document providers for Sale Guide items
Declaration
protected ArchiveColumnInfo _colId
Field Value
Type | Description |
---|---|
ArchiveColumnInfo |
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.Properties
InhibitDistinctPrimaryKeys
We change entities on the fly and should not really need to do this??
Declaration
public override bool InhibitDistinctPrimaryKeys { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.InstanceTable
Get the specific instance table - either appointment or document
Declaration
protected abstract TableInfo InstanceTable { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.TableToExtend
The primary table of this archive provider
Declaration
public override TableInfo TableToExtend { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Overrides
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.Methods
AcceptRow(SoDataReader)
Override: Filter out rows where the stagelinkinfo.deleted != 0, provided they have no instance
Declaration
protected override bool AcceptRow(SoDataReader reader)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader |
Returns
Type | Description |
---|---|
bool |
Overrides
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.GetInsertRight(int)
Get the Insert right, based on the current sale owner
Declaration
protected abstract TableRight GetInsertRight(int ownerAssociate)
Parameters
Type | Name | Description |
---|---|---|
int | ownerAssociate | owner associate to use |
Returns
Type | Description |
---|---|
TableRight |
Remarks
The business rules state that new instances are created on behalf of the user who owns the sale, not the current user. We therefore need to determine if the current user is allowed to insert something owned by the sale owner.
GetInstanceAppointment()
Get the appointment instance table
Declaration
protected AppointmentTableInfo GetInstanceAppointment()
Returns
Type | Description |
---|---|
AppointmentTableInfo |
Remarks
This method is placed here because both the appointment and the document subclasses use it (remember appointment->document)
InnerMapFields()
Override: Make sure we have the sale associate ID field, and map the sale id
Declaration
public override void InnerMapFields()
Overrides
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.InnerPopulateRowFromReader(SoDataReader, ArchiveRow)
Override: Use the instance table and insert rights from the subclass to calculate the correct table rights.
Declaration
protected override void InnerPopulateRowFromReader(SoDataReader reader, ArchiveRow row)
Parameters
Type | Name | Description |
---|---|---|
SoDataReader | reader | |
ArchiveRow | row |
Overrides
Remarks
The Insert part of the table right is based on the relationship between the current user and the sale owner. The Read/Update/Delete part is based on the actual instance, if any. New-instance rights are cached per sale owner to make it go faster.
PostProcessQuery()
This method is called after ModifyQuery has been called on all extenders, but before the query is executed. It is used for processing that needs the query to be 'complete' from the extenders, and gives the opportunity to tweak it, for instance by adding return fields needed for some particular functionality.
Declaration
public override void PostProcessQuery()
Overrides
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.RequiredPhaseOneFields()
Make sure the fields we need in AcceptRow are alway present in the phase-one version of the query
Declaration
protected override FieldInfo[] RequiredPhaseOneFields()
Returns
Type | Description |
---|---|
FieldInfo[] |
Overrides
Remarks
Most of the actual processing is done by the extenders, which have common base classes for Appointment and Document, and are further subdivided into sale and (in the future?) project as the ultimate parent entity. This provider handles the sentry processing, which does not really fit anywhere else.
Part of the sentry processing consists of getting hold of the correct tableinfos that represent the instance information, and then using it to derive the correct rights. Subclasses supply the instances, and this base class then uses it in the calculations.