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, IPlugin 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)
Declaration
public SaleGuideSubProviderBase(ArchiveRowTypeInfo rowType)
Parameters
Type | Name | Description |
---|---|---|
ArchiveRowTypeInfo | rowType |
Fields
_colId
Declaration
protected ArchiveColumnInfo _colId
Field Value
Type | Description |
---|---|
ArchiveColumnInfo |
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 |
---|---|
Boolean |
Overrides
InstanceTable
Get the specific instance table - either appointment or document
Declaration
protected abstract TableInfo InstanceTable { get; }
Property Value
Type | Description |
---|---|
TableInfo |
TableToExtend
Declaration
public override TableInfo TableToExtend { get; }
Property Value
Type | Description |
---|---|
TableInfo |
Overrides
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 |
---|---|
Boolean |
Overrides
GetInsertRight(Int32)
Get the Insert right, based on the current sale owner
Declaration
protected abstract TableRight GetInsertRight(int ownerAssociate)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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
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()
Declaration
public override void PostProcessQuery()
Overrides
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[] |