Show / Hide Table of Contents

Class ArchiveRow

This class carries the data of one archive row

Inheritance
object
ArchiveRow
ArchiveActivityRow
ArchiveCriteriaRow
ArchiveFindContactRow
ArchiveFreetextCountRow
ArchiveProjectRow
ArchiveSelectionRow
Implements
IDataRecord
IEquatable<ArchiveRow>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.ArchiveLists
Assembly: SoCore.dll
Syntax
public class ArchiveRow : IDataRecord, IEquatable<ArchiveRow>

Constructors

ArchiveRow()

Construct the object, with all blank values

Declaration
public ArchiveRow()

ArchiveRow(ArchiveRow)

This class carries the data of one archive row

Declaration
public ArchiveRow(ArchiveRow baseRow)
Parameters
Type Name Description
ArchiveRow baseRow

ArchiveRow(string, int)

Construct the object, setting the entity name and primary key.

Declaration
public ArchiveRow(string entityName, int primaryKey)
Parameters
Type Name Description
string entityName
int primaryKey

ArchiveRow(string[], ArchiveRow)

Create an ArchiveRow that contains exactly the specified columns, populated from the given row. Columns missing from the given row will have blank values in the result; columns not in the completeColumnsList will not be copied

Declaration
public ArchiveRow(string[] completeColumnsList, ArchiveRow populatedPartialRow)
Parameters
Type Name Description
string[] completeColumnsList

List of column names that should be present in the new row

ArchiveRow populatedPartialRow

Existing row object, source of data

Properties

ColumnData

The columns in the row, represented as name/value pairs. The value is a ArchiveColumnData object.

Declaration
public Dictionary<string, ArchiveColumnData> ColumnData { get; set; }
Property Value
Type Description
Dictionary<string, ArchiveColumnData>

FieldCount

This class carries the data of one archive row

Declaration
public int FieldCount { get; }
Property Value
Type Description
int

this[int]

This class carries the data of one archive row

Declaration
public object this[int i] { get; }
Parameters
Type Name Description
int i
Property Value
Type Description
object

this[string]

This class carries the data of one archive row

Declaration
public object this[string name] { get; }
Parameters
Type Name Description
string name
Property Value
Type Description
object

LinkHint

The link hint for this row

Declaration
public string LinkHint { get; set; }
Property Value
Type Description
string

Parents

This class carries the data of one archive row

Declaration
public List<ArchiveRowParent> Parents { get; set; }
Property Value
Type Description
List<ArchiveRowParent>

RowKey

The primary key of this row

Declaration
public int RowKey { get; set; }
Property Value
Type Description
int

RowRight

Table rights for the primary table of this row. The QueryProviderBase class by default sets this to be the TableRight of the Sentry handling the PrimaryTable of the query. Typically, buttons such as Add and Delete in archive bottom toolbars will be controlled by this right. Link hints on the separate cells may point to logic that makes changes (such as the toggle completed hint on the activity archive); such hints should be individually added/removed by the provider responsible for them based on Sentry information for that particular cell (or whatever is appropriate).

Declaration
public TableRight RowRight { get; set; }
Property Value
Type Description
TableRight

RowType

The entity that owns the row. Semantically this is the same as ArchiveEntityInfo.Name.

Declaration
public string RowType { get; set; }
Property Value
Type Description
string

StyleHint

The style hint for this row

Declaration
public string StyleHint { get; set; }
Property Value
Type Description
string

Methods

AddLinkHint(string)

Add a link hint; if a link hint already has been set, then add the new with an ampersand after the old.

Declaration
public void AddLinkHint(string linkHint)
Parameters
Type Name Description
string linkHint

link hint to be added

AddLinkHintToField(string, string)

This class carries the data of one archive row

Declaration
public void AddLinkHintToField(string columnName, string linkHint)
Parameters
Type Name Description
string columnName
string linkHint

AddOverlappingBoolColumn(string, bool)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingBoolColumn(string name, bool value)
Parameters
Type Name Description
string name
bool value
Returns
Type Description
ArchiveColumnData

AddOverlappingBoolColumn(string, bool, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingBoolColumn(string name, bool value, string tooltipHint)
Parameters
Type Name Description
string name
bool value
string tooltipHint
Returns
Type Description
ArchiveColumnData

AddOverlappingBoolColumn(string, bool, string, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingBoolColumn(string name, bool value, string tooltipHint, string linkHint)
Parameters
Type Name Description
string name
bool value
string tooltipHint
string linkHint
Returns
Type Description
ArchiveColumnData

AddOverlappingColumn(string)

Add a column, overwriting an existing column of the same name with the new value; this overload sets a null value

Declaration
public ArchiveColumnData AddOverlappingColumn(string name)
Parameters
Type Name Description
string name

Programmatic name

Returns
Type Description
ArchiveColumnData

AddOverlappingColumn(string, ArchiveColumnData)

Add a column, overwriting an existing column of the same name with the new value - but only if the previous value is blank or null

Declaration
public ArchiveColumnData AddOverlappingColumn(string name, ArchiveColumnData data)
Parameters
Type Name Description
string name

Programmatic name

ArchiveColumnData data

Data value

Returns
Type Description
ArchiveColumnData

AddOverlappingColumn(string, string)

Add a column, overwriting an existing column of the same name with the new value; this overload takes just a string display value

Declaration
public ArchiveColumnData AddOverlappingColumn(string name, string displayValue)
Parameters
Type Name Description
string name

Programmatic name

string displayValue

Display value, as string

Returns
Type Description
ArchiveColumnData

AddOverlappingColumn(string, string, string)

Add a column, overwriting an existing column of the same name with the new value; this overload takes a string display value and a string tooltip hint

Declaration
public ArchiveColumnData AddOverlappingColumn(string name, string displayValue, string tooltipHint)
Parameters
Type Name Description
string name

Programmatic name

string displayValue

Display value, as string

string tooltipHint

Tooltip hint, as string

Returns
Type Description
ArchiveColumnData

AddOverlappingColumn(string, string, string, string)

Add a column, overwriting an existing column of the same name with the new value; this overload takes a string display value and a string tooltip hint

Declaration
public ArchiveColumnData AddOverlappingColumn(string name, string displayValue, string tooltipHint, string linkHint)
Parameters
Type Name Description
string name

Programmatic name

string displayValue

Display value, as string

string tooltipHint

Tooltip hint, as string

string linkHint

Link hint, as string

Returns
Type Description
ArchiveColumnData

AddOverlappingDateTimeColumn(string, DateTime)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingDateTimeColumn(string name, DateTime value)
Parameters
Type Name Description
string name
DateTime value
Returns
Type Description
ArchiveColumnData

AddOverlappingDateTimeColumn(string, DateTime, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingDateTimeColumn(string name, DateTime value, string tooltipHint)
Parameters
Type Name Description
string name
DateTime value
string tooltipHint
Returns
Type Description
ArchiveColumnData

AddOverlappingDateTimeColumn(string, DateTime, string, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingDateTimeColumn(string name, DateTime value, string tooltipHint, string linkHint)
Parameters
Type Name Description
string name
DateTime value
string tooltipHint
string linkHint
Returns
Type Description
ArchiveColumnData

AddOverlappingDoubleColumn(string, double)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingDoubleColumn(string name, double value)
Parameters
Type Name Description
string name
double value
Returns
Type Description
ArchiveColumnData

AddOverlappingDoubleColumn(string, double, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingDoubleColumn(string name, double value, string tooltipHint)
Parameters
Type Name Description
string name
double value
string tooltipHint
Returns
Type Description
ArchiveColumnData

AddOverlappingDoubleColumn(string, double, string, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingDoubleColumn(string name, double value, string tooltipHint, string linkHint)
Parameters
Type Name Description
string name
double value
string tooltipHint
string linkHint
Returns
Type Description
ArchiveColumnData

AddOverlappingIntColumn(string, int)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingIntColumn(string name, int value)
Parameters
Type Name Description
string name
int value
Returns
Type Description
ArchiveColumnData

AddOverlappingIntColumn(string, int, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingIntColumn(string name, int value, string tooltipHint)
Parameters
Type Name Description
string name
int value
string tooltipHint
Returns
Type Description
ArchiveColumnData

AddOverlappingIntColumn(string, int, string, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingIntColumn(string name, int value, string tooltipHint, string linkHint)
Parameters
Type Name Description
string name
int value
string tooltipHint
string linkHint
Returns
Type Description
ArchiveColumnData

AddOverlappingTimeSpanColumn(string, TimeSpan, string, string)

This class carries the data of one archive row

Declaration
public ArchiveColumnData AddOverlappingTimeSpanColumn(string name, TimeSpan value, string tooltipHint = "", string linkHint = "")
Parameters
Type Name Description
string name
TimeSpan value
string tooltipHint
string linkHint
Returns
Type Description
ArchiveColumnData

AddParent(string, int)

This class carries the data of one archive row

Declaration
public void AddParent(string tableName, int primaryKey)
Parameters
Type Name Description
string tableName
int primaryKey

AddStyleHint(string)

Add a style hint; if a style hint already has been set, then add the new with an ampersand after the old. Always make sure the style hints are in alphabetical order; a predictable order is needed to be sure we can correctly match combinations in the style sheet.

Declaration
public void AddStyleHint(string styleHint)
Parameters
Type Name Description
string styleHint

Style hint to be added

AddTooltipToField(string, string)

Add a tooltip to a field in an archive row. The tooltip can be a literal and/or a {} style hint. It will be added to the given column if that column either lacks a tooltip or has one of the same type. If the column is missing, nothing bad happens. The added tooltip may be null or empty, causing nothing to happen.

Declaration
public void AddTooltipToField(string columnName, string tooltip)
Parameters
Type Name Description
string columnName

Name of column to add a tooltip to

string tooltip

tooltip to add, may be null, empty, literal or a hint

AlignToTargetColumnSet(string[])

Align the content of this ArchiveRow with the given list of columns. Surplus columns are removed, while missing columns are added with null data.

Declaration
public void AlignToTargetColumnSet(string[] completeColumnsList)
Parameters
Type Name Description
string[] completeColumnsList

List of columns the row is to contain

Clone()

This class carries the data of one archive row

Declaration
public ArchiveRow Clone()
Returns
Type Description
ArchiveRow

Equals(ArchiveRow)

Checks if two archive rows are the same row. This will only do a simple check on row type and row key, as doing extensive checks on all the data contained within the row would be too expensive, performance-wise.

Declaration
public bool Equals(ArchiveRow other)
Parameters
Type Name Description
ArchiveRow other

The other ArchiveRow instance to compare with.

Returns
Type Description
bool

True if input is not null and matches row type and key, false if not.

GetBoolean(int)

This class carries the data of one archive row

Declaration
public bool GetBoolean(int i)
Parameters
Type Name Description
int i
Returns
Type Description
bool

GetByte(int)

This class carries the data of one archive row

Declaration
public byte GetByte(int i)
Parameters
Type Name Description
int i
Returns
Type Description
byte

GetBytes(int, long, byte[], int, int)

This class carries the data of one archive row

Declaration
public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length)
Parameters
Type Name Description
int i
long fieldOffset
byte[] buffer
int bufferoffset
int length
Returns
Type Description
long

GetChar(int)

This class carries the data of one archive row

Declaration
public char GetChar(int i)
Parameters
Type Name Description
int i
Returns
Type Description
char

GetChars(int, long, char[], int, int)

This class carries the data of one archive row

Declaration
public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length)
Parameters
Type Name Description
int i
long fieldoffset
char[] buffer
int bufferoffset
int length
Returns
Type Description
long

GetData(int)

This class carries the data of one archive row

Declaration
public IDataReader GetData(int i)
Parameters
Type Name Description
int i
Returns
Type Description
IDataReader

GetDataTypeName(int)

This class carries the data of one archive row

Declaration
public string GetDataTypeName(int i)
Parameters
Type Name Description
int i
Returns
Type Description
string

GetDateTime(int)

This class carries the data of one archive row

Declaration
public DateTime GetDateTime(int i)
Parameters
Type Name Description
int i
Returns
Type Description
DateTime

GetDecimal(int)

This class carries the data of one archive row

Declaration
public decimal GetDecimal(int i)
Parameters
Type Name Description
int i
Returns
Type Description
decimal

GetDisplayValue(string)

Get the display value for a given column ID. If the column does not exist, an empty string (not null) is returned

Declaration
public string GetDisplayValue(string columnName)
Parameters
Type Name Description
string columnName

Column name, case-sensitive and must include any prefixes

Returns
Type Description
string

Display value if found, or an empty string

GetDouble(int)

This class carries the data of one archive row

Declaration
public double GetDouble(int i)
Parameters
Type Name Description
int i
Returns
Type Description
double

GetFieldType(int)

This class carries the data of one archive row

Declaration
public Type GetFieldType(int i)
Parameters
Type Name Description
int i
Returns
Type Description
Type

GetFloat(int)

This class carries the data of one archive row

Declaration
public float GetFloat(int i)
Parameters
Type Name Description
int i
Returns
Type Description
float

GetGuid(int)

This class carries the data of one archive row

Declaration
public Guid GetGuid(int i)
Parameters
Type Name Description
int i
Returns
Type Description
Guid

GetInt16(int)

This class carries the data of one archive row

Declaration
public short GetInt16(int i)
Parameters
Type Name Description
int i
Returns
Type Description
short

GetInt32(int)

This class carries the data of one archive row

Declaration
public int GetInt32(int i)
Parameters
Type Name Description
int i
Returns
Type Description
int

GetInt64(int)

This class carries the data of one archive row

Declaration
public long GetInt64(int i)
Parameters
Type Name Description
int i
Returns
Type Description
long

GetLinkHintValue(string)

Return a link hint by name

Declaration
public string GetLinkHintValue(string hintName)
Parameters
Type Name Description
string hintName
Returns
Type Description
string

GetName(int)

This class carries the data of one archive row

Declaration
public string GetName(int i)
Parameters
Type Name Description
int i
Returns
Type Description
string

GetOrdinal(string)

This class carries the data of one archive row

Declaration
public int GetOrdinal(string name)
Parameters
Type Name Description
string name
Returns
Type Description
int

GetString(int)

This class carries the data of one archive row

Declaration
public string GetString(int i)
Parameters
Type Name Description
int i
Returns
Type Description
string

GetValue(int)

This class carries the data of one archive row

Declaration
public object GetValue(int i)
Parameters
Type Name Description
int i
Returns
Type Description
object

GetValues(object[])

This class carries the data of one archive row

Declaration
public int GetValues(object[] values)
Parameters
Type Name Description
object[] values
Returns
Type Description
int

HasLinkHint(string)

Check if link hint exists

Declaration
public bool HasLinkHint(string hintName)
Parameters
Type Name Description
string hintName
Returns
Type Description
bool

IsDBNull(int)

This class carries the data of one archive row

Declaration
public bool IsDBNull(int i)
Parameters
Type Name Description
int i
Returns
Type Description
bool

OverwriteColumn(string, ArchiveColumnData)

Add a column, overwriting an existing column of the same name with the new value.

Declaration
public ArchiveColumnData OverwriteColumn(string name, ArchiveColumnData data)
Parameters
Type Name Description
string name

Programmatic name

ArchiveColumnData data

Data value

Returns
Type Description
ArchiveColumnData

PopulateFromBase(ArchiveRow, bool)

This class carries the data of one archive row

Declaration
public void PopulateFromBase(ArchiveRow baseRow, bool includeData)
Parameters
Type Name Description
ArchiveRow baseRow
bool includeData

RemoveLinkHint(string)

Remove occurances of key from the linkHint.

Declaration
public void RemoveLinkHint(string key)
Parameters
Type Name Description
string key

The key to remove

RemoveStyleHint(string)

Remove a style hint if it was present, otherwise do nothing

Declaration
public void RemoveStyleHint(string removeHint)
Parameters
Type Name Description
string removeHint

Hint to remove

ReplaceLinkHint(string, string)

This class carries the data of one archive row

Declaration
public void ReplaceLinkHint(string linkKey, string linkValue)
Parameters
Type Name Description
string linkKey
string linkValue

ToIdDictionary(ArchiveRow[])

Create a lookup dictionary of rows, based on their primary key. Note that there is no built-in guarantee that an arbitrary collection/array of rows will have unique primary keys; if there are multiple entities then each one might have its own key range.

Declaration
public static Dictionary<int, ArchiveRow> ToIdDictionary(ArchiveRow[] rows)
Parameters
Type Name Description
ArchiveRow[] rows

Rows to be converted to a dictionary

Returns
Type Description
Dictionary<int, ArchiveRow>

Dictionary indexed by primary key

ToIdDictionary(ICollection<ArchiveRow>)

Create a lookup dictionary of rows, based on their primary key. Note that there is no built-in guarantee that an arbitrary collection/array of rows will have unique primary keys; if there are multiple entities then each one might have its own key range.

Declaration
public static Dictionary<int, ArchiveRow> ToIdDictionary(ICollection<ArchiveRow> rows)
Parameters
Type Name Description
ICollection<ArchiveRow> rows

Rows to be converted to a dictionary

Returns
Type Description
Dictionary<int, ArchiveRow>

Dictionary indexed by primary key

ToString()

Returns a string representation of the values of this row, intended for debug display purposes (this is not a complete serialization)

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
object.ToString()

Implements

IDataRecord
IEquatable<T>

Extension Methods

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