Click or drag to resize

RelAttrTableTRow Class

A wrapper class that provides access to relationship-based table attributes of an object.
Inheritance Hierarchy
SystemObject
  PDTec.IceNet.Sdk.UtilsRelAttrTableTRow

Namespace:  PDTec.IceNet.Sdk.Utils
Assembly:  PDTec.IceNet.Sdk (in PDTec.IceNet.Sdk.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax
C#
public class RelAttrTable<TRow>
where TRow : new()

Type Parameters

TRow
The row datatype.

The RelAttrTableTRow type exposes the following members.

Constructors
Methods
  NameDescription
Public methodAppendRow
Public methodDeleteRow
Deletes a single row from the relationship table.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetRows
Gets all rows of the relationship table.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInsertRowAt
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodReorderRows
Reorders the table rows by the given row ID sequence.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdateRow
Top
Examples

The example shows how to use the RelAttrTableTRow class.

public class RequestItem
{
    public string Id;
    public string Description;
    public string ItemName;
    public string AcceptanceStatus;
    public string AcceptanceComment;
    public string ApprovalStatus;
    public string ApprovalComment;
}
var rt = new RelAttrTable<RequestItem>(Repository.GetObject("42"), "PDTec.TDM.RequestItem");

var rows = rt.GetRows();

foreach (var row in rows)
{
    Console.WriteLine(row.Id + "|" + row.ItemName + "|" + row.ApprovalStatus + "|" + row.ApprovalComment);      
}

string rowId = null;

Repository.ExecuteTransaction(() =>
{
    rows[0].Description = "Blubb";
    rows[0].AcceptanceComment = "Blarb";
    rowId = rt.AppendRow(rows[0]);
});

Console.WriteLine(rowId);      

Repository.ExecuteTransaction(() =>
{
    rt.DeleteRow(rowId);
});
See Also