XFieldDefMap Class |
Namespace: Biolomics.BioCallback
The XFieldDefMap type exposes the following members.
Name | Description | |
---|---|---|
XFieldDefMap |
Initializes a new instance of the XFieldDefMap class.
| |
XFieldDefMap(TFieldDefMap) |
Initializes a new instance of the XFieldDefMap class.
|
Name | Description | |
---|---|---|
Comparer | Gets the generic equality comparer that is used to determine equality of keys in the collection. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
Count | Gets the number of elements actually contained in the CollectionT. (Inherited from CollectionXFieldDef.) | |
Dictionary | Gets the lookup dictionary of the KeyedCollectionTKey, TItem. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
ItemTKey | Gets the element with the specified key. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
ItemInt32 | Gets or sets the element at the specified index. (Inherited from CollectionXFieldDef.) | |
Items | Gets a IListT wrapper around the CollectionT. (Inherited from CollectionXFieldDef.) |
Name | Description | |
---|---|---|
Add | Adds an object to the end of the CollectionT. (Inherited from CollectionXFieldDef.) | |
ChangeItemKey | Changes the key associated with the specified element in the lookup dictionary. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
Clear | Removes all elements from the CollectionT. (Inherited from CollectionXFieldDef.) | |
ClearItems | Removes all elements from the KeyedCollectionTKey, TItem. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
Clone |
Clones this instance.
| |
Contains(TKey) | Determines whether the collection contains an element with the specified key. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
Contains(T) | Determines whether an element is in the CollectionT. (Inherited from CollectionXFieldDef.) | |
CopyTo | Copies the entire CollectionT to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from CollectionXFieldDef.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetEnumerator | Returns an enumerator that iterates through the CollectionT. (Inherited from CollectionXFieldDef.) | |
GetFieldByDBName |
Gets the field by the name of the field in database.
| |
GetFieldByUserName |
Gets the name of the field by user.
| |
GetFieldByUserNameEng |
Gets the field by user name eng.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetItemByIdx |
Gets the XFieldDef by index.
| |
GetKeyForItem |
When implemented in a derived class, extracts the key from the specified element.
(Overrides KeyedCollectionTKey, TItemGetKeyForItem(TItem).) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IndexOf | Searches for the specified object and returns the zero-based index of the first occurrence within the entire CollectionT. (Inherited from CollectionXFieldDef.) | |
Insert | Inserts an element into the CollectionT at the specified index. (Inherited from CollectionXFieldDef.) | |
InsertItem | Inserts an element into the KeyedCollectionTKey, TItem at the specified index. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Remove(Int64) |
Removes the specified field by key.
| |
Remove(T) | Removes the first occurrence of a specific object from the CollectionT. (Inherited from CollectionXFieldDef.) | |
RemoveAt | Removes the element at the specified index of the CollectionT. (Inherited from CollectionXFieldDef.) | |
RemoveItem | Removes the element at the specified index of the KeyedCollectionTKey, TItem. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
SetItem | Replaces the item at the specified index with the specified item. (Inherited from KeyedCollectionInt64, XFieldDef.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
Equality |
Implements the operator = operator.
| |
Inequality |
Implements the operator <> operator.
|
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