Show / Hide Table of Contents

Class ArchiveColumnData

Data carrier class for an item (cell) in an archive. This class contains properties and members for three distinct values: The (visible) display value; the tooltip hint, and the link hint.

Inheritance
Object
ArchiveColumnData
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 ArchiveColumnData
Remarks

The raw value and Order By Value are not used outside the service layer. They are only used by the windows client and the internal NetServer code.

Constructors

ArchiveColumnData()

Constructor used for serialization.

Declaration
public ArchiveColumnData()

ArchiveColumnData(String)

Construct the object and just set the display value

Declaration
public ArchiveColumnData(string displayValue)
Parameters
Type Name Description
String displayValue

Display value; non-string values should be converted to string using the invariant culture format provider

ArchiveColumnData(String, String)

Construct the object and set the display value and tooltip hint

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

Display value; non-string values should be converted to string using the invariant culture format provider

String tooltipHint

Tooltip hint, either a text to be shown or a parseable tooltip key to be handed to the tooltip provider system

ArchiveColumnData(String, String, String)

Construct the object and set the display value and tooltip hint

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

Display value; non-string values should be converted to string using the invariant culture format provider

String tooltipHint

Tooltip hint, either a text to be shown or a parseable tooltip key to be handed to the tooltip provider system

String linkHint

Link hint, as string

ArchiveColumnData(String, String, String, Object)

Construct the object and set the display value, tooltip hint, link hint and raw value

Declaration
public ArchiveColumnData(string displayValue, string tooltipHint, string linkHint, object rawValue)
Parameters
Type Name Description
String displayValue

Display value; non-string values should be converted to string using the invariant culture format provider

String tooltipHint

Tooltip hint, either a text to be shown or a parseable tooltip key to be handed to the tooltip provider system

String linkHint

Link hint, as string

Object rawValue

Raw value, an object

Fields

__dbFieldId

For Windows Client: (tablenumber << 8) + fieldnumber, or (negative) algorithm id for complex fields

Declaration
public int __dbFieldId
Field Value
Type Description
Int32

__dbFieldPrimaryKey

For Windows Client: primary key of table that __dbFieldId comes from

Declaration
public int __dbFieldPrimaryKey
Field Value
Type Description
Int32

__dbParentPrimaryKey

For Windows Client: parent's primary key (let's hope we're able to cough up all this info)

Declaration
public int __dbParentPrimaryKey
Field Value
Type Description
Int32

__dbParentTableNumber

For Windows Client: tablenumber of the logical parent (for instance, appointment if we're dealing with a text field from the text table)

Declaration
public int __dbParentTableNumber
Field Value
Type Description
Int32

Properties

DisplayValue

The visible display value for an archive cell. It is always a string, and other data types are converted to string according to the invariant culture. Further conversion to the local culture is the responsibility of the client.

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

LinkHint

The link hint consists of information to construct an actual link; additional information (such as a view context) must be provided by the client, who is also responsible for building the link. The content of the link will generally be one or more ids, such as contact_id=123.

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

OrderByValue

For Windows Client: This property contains an object to be used for order comparisons. It may be the same as the display value, but it may also be different, as with fields that are built up from separate components but are ordered ny one of the components (or the Japanese case, where Kanji name fields are ordered according to their Kana equivalents)

Declaration
public object OrderByValue { get; set; }
Property Value
Type Description
Object

RawValue

For Windows Client: This property contains the 'raw' value. A raw value is a strongly typed object that represents the raw data used to derive the display value. For instance, a list column will have the list item name in the display value, and the ID in the raw value; numeric columns will have an Int32 or Double raw value, datetime columns will have a DateTime, and columns that represent enumerations or statuses - where the display value is typically an icon hint - will have the raw numeric value. Not available outside service layer.

Declaration
public object RawValue { get; set; }
Property Value
Type Description
Object

TooltipHint

The tooltip hint is either a text to be shown (after resource tag substitution), or a tooltip key to be given to the tooltip provider system in order to asynchronoously retrieve the actual tooltip.

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

Methods

CheckAndSetOrderByValue()

Check the OrderBy property of the archive column data, and set it if it is null. We first let CultureDataFormatter try parsing, and accept its result if it is non-string. If that fails, we try to parse date, int and double in that order to get correct sorting comparisons. null value is allowed for the parameter, nothing happens then.

Declaration
public void CheckAndSetOrderByValue()

Clone()

Declaration
public ArchiveColumnData Clone()
Returns
Type Description
ArchiveColumnData

GetDateTimeValue()

Get a datetime value from archive column data

Declaration
public DateTime GetDateTimeValue()
Returns
Type Description
DateTime
Remarks

If a non-null RawValues is available and of type DateTime, then that is returned without further parsing. Otherwise, try to parse the display value. If that fails, return DateTime.MinValue.

GetNumericValue(out Boolean)

Get the numeric value of an ArchiveColumnData item - tolerantly

Declaration
public double GetNumericValue(out bool isDouble)
Parameters
Type Name Description
Boolean isDouble
Returns
Type Description
Double
Remarks

This method does its best to get the int or double value from the input, which the client is asserting to be a numeric value (otherwise the client should not call this method...).

It will always return a double, but has an OUT bool that tells the client whether the original looked like an int or not. RawValue is used if possible, otherwise several levels of tolerant parsing and guesswork are applied. Non-numeric values are classified as (int)0.

SetAlgorithmInfo(Int32)

Set the algorithm information into the __dbFieldId, for use by the Live Update system. Note: Not available outside service layer. Primarily for windows client.

Declaration
public ArchiveColumnData SetAlgorithmInfo(int infoConstant)
Parameters
Type Name Description
Int32 infoConstant

Algorithm number, preferable taken from

Returns
Type Description
ArchiveColumnData

The current instance, so calls can be chained with for instance SetRawValue(Object)

SetRawValue(Object)

Set the raw value. This method duplicates the property setter, but looks more consistent in a chained usage such as ... AddOverlappingColumn( --- ).SetRawValue( ... ) Note: Not available outside service layer. Primarily for windows client.

Declaration
public ArchiveColumnData SetRawValue(object rawValue)
Parameters
Type Name Description
Object rawValue

The raw value to be set

Returns
Type Description
ArchiveColumnData

The current instance, so calls can be chained with for instance SetAlgorithmInfo(Int32)

ToString()

ToString method intended for debugging

Declaration
public override string ToString()
Returns
Type Description
String

String representation of the data object

Overrides
Object.ToString()

TransferDbInfo(ArchiveColumnData)

Declaration
public void TransferDbInfo(ArchiveColumnData source)
Parameters
Type Name Description
ArchiveColumnData source

Extension Methods

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