Show / Hide Table of Contents

Class EntityVisibleForHelper

Helper class for working with visible for on enteties.

Inheritance
Object
EntityVisibleForHelper
Implements
ITableRowLoadHandler
INestedPersist
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public sealed class EntityVisibleForHelper : Object, ITableRowLoadHandler, INestedPersist

Constructors

EntityVisibleForHelper(VisibleForTableInfo, EntityBase, TableRowBase)

Default constructor for the visible for helper.

Declaration
public EntityVisibleForHelper(VisibleForTableInfo visibleForTableInfo, EntityBase entity, TableRowBase mainRow)
Parameters
Type Name Description
VisibleForTableInfo visibleForTableInfo

for the visible for row.

EntityBase entity

Entity the visible for is part of

TableRowBase mainRow

The main row of the entity.

Properties

AssociateFullName

Get the associate full name of the user the entity is visible for.

Declaration
public string AssociateFullName { get; }
Property Value
Type Description
String

AssociateId

Get or set the user the entity is visible for.

Declaration
public int AssociateId { get; set; }
Property Value
Type Description
Int32
Remarks

Setting this value will force the visibillity to be for the associate.

GroupId

Get or set group the entity is visible for.

Declaration
public int GroupId { get; set; }
Property Value
Type Description
Int32
Remarks

Setting the group id will for the visibillity to be for this group.

GroupName

Get the name of the group.

Declaration
public string GroupName { get; }
Property Value
Type Description
String

IsDeleted

Get if the visible for row is deleted.

Declaration
public bool IsDeleted { get; }
Property Value
Type Description
Boolean

IsMarkedForDelete

Get or set the IsMarkedForDelete flag on the visible for row.

Declaration
public bool IsMarkedForDelete { get; set; }
Property Value
Type Description
Boolean

Row

The actual visible for row that is being worked on.

Declaration
public VisibleForRow Row { get; }
Property Value
Type Description
VisibleForRow

Sentries

Get sentries governing the visible for row

Declaration
public SentryCollection Sentries { get; }
Property Value
Type Description
SentryCollection

VisibleFor

Get or set the type of visibility for the entity.

Declaration
public Visibility VisibleFor { get; set; }
Property Value
Type Description
Visibility

VisibleForId

Get the visible for id for used on the visible for row.

Declaration
public int VisibleForId { get; set; }
Property Value
Type Description
Int32
Remarks

If Visibility is All, 1 is allways returned. GroupId and AssociateId will be returned for corresponding values on the VisibleFor property.

VisibleForTableInfo

Get the for the visible for row.

Declaration
public VisibleForTableInfo VisibleForTableInfo { get; }
Property Value
Type Description
VisibleForTableInfo

Methods

CopyVisibilityTo(VisibleForRow)

Copy visibility from the helper to a visible for row.

Declaration
public void CopyVisibilityTo(VisibleForRow visibleForRow)
Parameters
Type Name Description
VisibleForRow visibleForRow

Visible for row to set visibility on.

ModifyQuery(IdxBase)

Modify a query to join in visible for using inner join.

Declaration
public static VisibleForTableInfo ModifyQuery(IdxBase query)
Parameters
Type Name Description
IdxBase query

Query to modify.

Returns
Type Description
VisibleForTableInfo

for the visible for table used in the query.

OnRowLoad(SoDataReader, TableRowBase)

Called by the entity when it is loaded from the database so the underlying VisibleForRow object can be fetched.

Declaration
public void OnRowLoad(SoDataReader reader, TableRowBase row)
Parameters
Type Name Description
SoDataReader reader

Reader to read publish information from

TableRowBase row

The main row of the query.

OnRowLoaded()

Called by the entity when it has been loaded successfully.

Declaration
public void OnRowLoaded()

SetVisibleForTypeOnRow(VisibleForRow, Visibility)

Set a visible for type on a visible for row.

Declaration
public static void SetVisibleForTypeOnRow(VisibleForRow visibleForRow, Visibility visibleForType)
Parameters
Type Name Description
VisibleForRow visibleForRow

Row to set visible for on.

Visibility visibleForType

Type of visibility.

SetVisibleForTypeOnRow(VisibleForRow, Visibility, Int32)

Set a visible for type on a visible for row.

Declaration
public static void SetVisibleForTypeOnRow(VisibleForRow visibleForRow, Visibility visibleForType, int id)
Parameters
Type Name Description
VisibleForRow visibleForRow

Row to set visible for on.

Visibility visibleForType

Type of visibility.

Int32 id

Value of group or associate if one of these are chosen.

Explicit Interface Implementations

INestedPersist.add_OnElementIdUpdate(OnIdUpdate)

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.add_OnElementIdUpdate(OnIdUpdate value)
Parameters
Type Name Description
OnIdUpdate value

INestedPersist.IsDirty

Helper class for working with visible for on enteties.

Declaration
bool INestedPersist.IsDirty { get; }
Returns
Type Description
Boolean

INestedPersist.IsSaving

Helper class for working with visible for on enteties.

Declaration
bool INestedPersist.IsSaving { get; }
Returns
Type Description
Boolean

INestedPersist.OnIdUpdate()

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.OnIdUpdate()

INestedPersist.OnPreIdUpdate()

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.OnPreIdUpdate()

INestedPersist.OnPrimaryKeyRequest(PKContainer)

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.OnPrimaryKeyRequest(PKContainer pkContainer)
Parameters
Type Name Description
PKContainer pkContainer

INestedPersist.OnPrimaryKeyUpdate(PKContainer)

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.OnPrimaryKeyUpdate(PKContainer pkContainer)
Parameters
Type Name Description
PKContainer pkContainer

INestedPersist.OnSave(BatchSave)

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.OnSave(BatchSave batchSave)
Parameters
Type Name Description
BatchSave batchSave

INestedPersist.OnSaved(Boolean)

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.OnSaved(bool bSucceeded)
Parameters
Type Name Description
Boolean bSucceeded

INestedPersist.remove_OnElementIdUpdate(OnIdUpdate)

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.remove_OnElementIdUpdate(OnIdUpdate value)
Parameters
Type Name Description
OnIdUpdate value

INestedPersist.Save()

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.Save()

INestedPersist.SetSaveOwner(INestedPersist)

Helper class for working with visible for on enteties.

Declaration
void INestedPersist.SetSaveOwner(INestedPersist saveOwner)
Parameters
Type Name Description
INestedPersist saveOwner

Implements

ITableRowLoadHandler
INestedPersist

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top