Class EntityVisibleForHelper
Helper class for working with visible for on enteties.
Inheritance
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 | |
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 |
---|---|
System.String |
AssociateId
Get or set the user the entity is visible for.
Declaration
public int AssociateId { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.String |
IsDeleted
Get if the visible for row is deleted.
Declaration
public bool IsDeleted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMarkedForDelete
Get or set the IsMarkedForDelete flag on the visible for row.
Declaration
public bool IsMarkedForDelete { get; set; }
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.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
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 |
---|---|---|
SuperOffice.CRM.Rows.IdxBase | query | Query to modify. |
Returns
Type | Description |
---|---|
VisibleForTableInfo |
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. |
System.Int32 | id | Value of group or associate if one of these are chosen. |
Explicit Interface Implementations
INestedPersist.add_OnElementIdUpdate(OnIdUpdate)
Declaration
void INestedPersist.add_OnElementIdUpdate(OnIdUpdate value)
Parameters
Type | Name | Description |
---|---|---|
OnIdUpdate | value |
INestedPersist.IsDirty
Declaration
bool INestedPersist.IsDirty { get; }
Returns
Type | Description |
---|---|
System.Boolean |
INestedPersist.IsSaving
Declaration
bool INestedPersist.IsSaving { get; }
Returns
Type | Description |
---|---|
System.Boolean |
INestedPersist.OnIdUpdate()
Declaration
void INestedPersist.OnIdUpdate()
INestedPersist.OnPreIdUpdate()
Declaration
void INestedPersist.OnPreIdUpdate()
INestedPersist.OnPrimaryKeyRequest(PKContainer)
Declaration
void INestedPersist.OnPrimaryKeyRequest(PKContainer pkContainer)
Parameters
Type | Name | Description |
---|---|---|
PKContainer | pkContainer |
INestedPersist.OnPrimaryKeyUpdate(PKContainer)
Declaration
void INestedPersist.OnPrimaryKeyUpdate(PKContainer pkContainer)
Parameters
Type | Name | Description |
---|---|---|
PKContainer | pkContainer |
INestedPersist.OnSave(BatchSave)
Declaration
void INestedPersist.OnSave(BatchSave batchSave)
Parameters
Type | Name | Description |
---|---|---|
BatchSave | batchSave |
INestedPersist.OnSaved(Boolean)
Declaration
void INestedPersist.OnSaved(bool bSucceeded)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | bSucceeded |
INestedPersist.remove_OnElementIdUpdate(OnIdUpdate)
Declaration
void INestedPersist.remove_OnElementIdUpdate(OnIdUpdate value)
Parameters
Type | Name | Description |
---|---|---|
OnIdUpdate | value |
INestedPersist.Save()
Declaration
void INestedPersist.Save()
INestedPersist.SetSaveOwner(INestedPersist)
Declaration
void INestedPersist.SetSaveOwner(INestedPersist saveOwner)
Parameters
Type | Name | Description |
---|---|---|
INestedPersist | saveOwner |