XWLinkField Class |
Code of field: WLink
Type of field: Link to W field that is a container for free array of series of continuous data.
Applicable to:
List of Time series, HPLC, GC, NMR data, ...
Namespace: Biolomics.BioCallback
The XWLinkField type exposes the following members.
Name | Description | |
---|---|---|
XWLinkField(XWLinkField) |
Copy ctor
| |
XWLinkField(TWLinkField, XRecord) |
Initializes a new instance of the XWLinkField class.
| |
XWLinkField(XWLinkField, XRecord) |
Copy ctor but into a new XRecord
|
Name | Description | |
---|---|---|
FieldValue |
Gets or sets the field value.
(Overrides XFieldFieldValue.) | |
IsModified |
Gets or sets a value indicating whether this instance is modified.
(Inherited from XField.) |
Name | Description | |
---|---|---|
AddLink |
Adds existing target record.
(Inherited from XLinkField.) | |
CanRead |
Determines whether current connection can read from Field.
(Inherited from XField.) | |
CanWrite |
Determines whether current connection can write from Field.
(Inherited from XField.) | |
Clear |
Clears this instance.
(Inherited from XField.) | |
Clone |
Clones this instance.
| |
CloneAsXField |
We cannot use name 'Clone' here otherwise Implements vector.TId(Of XSField) fails because XSField.Clone() returns a XField instead of a XSField !!!
(Overrides XFieldCloneAsXField(XRecord).) | |
Count |
Counts the link field items.
(Inherited from XLinkField.) | |
DataToView |
Converts field value to readable string.
(Inherited from XField.) | |
DataToView(Int32) |
Mandatory otherwise DataToView(5) returns letter 5 of string given by DataToView(), instead of the subfield value
(Inherited from XField.) | |
Equals |
Determines whether the specified Object is equal to this instance.
(Inherited from XField.) | |
Field |
each derived class embed its own TField member, which can be a TAField, TCField, TEField, etc.
this function must return that original TField
(Inherited from XLinkField.) | |
FieldDef |
Gets the Field definition.
(Inherited from XField.) | |
FieldType |
The Field type.
(Inherited from XField.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Key |
Gets Field Key.
(Inherited from XField.) | |
LinkField |
Gets the Link field.
(Overrides XLinkFieldLinkField.) | |
LoadTargetRecords |
Loads the target records.
(Inherited from XLinkField.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ParentRecord |
Gets the parent record.
(Inherited from XField.) | |
Read |
Reads the Content from source object.
(Inherited from XField.) | |
Records |
Gets the records properties as a recordmap.
(Inherited from XLinkField.) | |
Reset |
Resets this instance.
(Inherited from XField.) | |
SetDefaultValues |
Sets the default values.
(Inherited from XField.) | |
TargetSqlCo |
Gets the target connection.
(Inherited from XLinkField.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Values |
Gets the values of the Linked items.
(Inherited from XLinkField.) | |
Write |
Writes data into a TQuery
and Format it depending to field type
(Inherited from XField.) |
Imports System Imports BioloMICS.BioCallback Imports BioloMICS.SharedClasses Imports Biolomics.Utility.DatabaseConstants Public Class Program <STAThread()> Shared Sub Main() Dim c As New Program c.CheckRecords() End Sub Public Sub CheckRecords() 'get the current connection Dim SqlCo As XConnection = Run.GetCurrentConnection() If SqlCo Is Nothing Then Return End If 'get the selected table Dim CurrentLayout As XDataLayout = Run.GetCurrentLayout() Dim TableDef As XTableDef = SqlCo.GetTableDef(CurrentLayout.TableKey) If TableDef Is Nothing Then ' may happen if that table doesn't exist Return End If 'fill in a list of all fields to load from the collection table Dim FieldDefMap As New XFieldDefMap Dim SourceOfField As XFieldDef = SqlCo.GetFieldByUserNameEng("country", TableDef.key) 'Dim SourceField As XFieldDef = Sqlco.GetFieldByDbName("rlink2981", TableDef.key) 'Add fields to the map to be loaded FieldDefMap.Add(SourceOfField) 'Search for the user and get it's data Dim WhereStock As XWhere 'load record 8 WhereStock = XWhere.Eq(staticfields.id, 9) Dim RecordMapStock As XRecordMap = Run.LoadRecords(TableDef.Key, FieldDefMap, WhereStock) Run.LoadTargetRecords(RecordMapStock, 400, 7) Console.WriteLine(RecordMapStock.Count.ToString) Dim i As Integer = 0 Dim j As Integer = 0 'loop on the selected records For Each OriginalRecord As XRecord In RecordMapStock 'OriginalRecord.Name <> field 'Change the consortium name' Dim LinkedName As XRecLinkField = CType(OriginalRecord.Fields(SourceOfField.Key), XRecLinkField) Dim stockRecordMap As XRecordMap = LinkedName.Records If stockRecordMap.Count > 0 Then For Each StockRecord As XRecord In stockRecordMap 'loop and write target record name Console.WriteLine(StockRecord.Name) Next End If Next End Sub End Class