Click or drag to resize
XDataLayout Class
Class XDataLayout. It presents the view of the table to be shown in the tree.
Inheritance Hierarchy
SystemObject
  Biolomics.BioCallbackXDataLayout

Namespace:  Biolomics.BioCallback
Assembly:  Biolomics.BioCallback (in Biolomics.BioCallback.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class XDataLayout

The XDataLayout type exposes the following members.

Constructors
  NameDescription
Public methodXDataLayout
Initializes a new instance of the XDataLayout class.
Top
Methods
  NameDescription
Public methodClone
Clones this instance.
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 methodGetAllFields
Gets all fields in the layout.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodId
Gets the Layout Id.
Public methodIsNothing
Determines whether this instance is nothing.
Public methodKey
Gets the Layout Key.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodName
Gets the layout Name.
Public methodTableKey
Gets the Table key.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Implements the operator = operator.
Public operatorStatic memberInequality
Implements the operator <> operator.
Top
Examples
Each record header contains some information, like the record name, creation date, lat modification date, owner name. The last field is called "Details" and can contain any information. The example below will set the Details field.
Example VB.Net
Imports System
Imports BioloMICS.BioCallback
Imports BioloMICS.SharedClasses

Public Class Program

    <STAThread()>
    Shared Sub Main()
        Dim c As New Program
        c.ChangeRecordDetails()
    End Sub

    '    Write sub functions here
    Public Sub ChangeRecordDetails()
        '    get the current connection
        Dim SqlCo As XConnection = Run.GetCurrentConnection()
        If SqlCo Is Nothing Then
            Return
        End If

        '    get the current layout
        Dim Layout As XDataLayout = Run.GetCurrentLayout()
        If Layout Is Nothing Then  '    no current layout in a search page
            Return
        End If

        '    get the current table 
        Dim TableDef As XTableDef = SqlCo.GetTableDef(Layout.TableKey)
        If TableDef Is Nothing Then   '    should never happen
            Return
        End If
        '    load all records
        Dim Where As XWhere = XWhere.All
        '    use an empty FieldDefMap
        Dim FieldDefMap As New XFieldDefMap
        '    load the records
        Dim RecordMap As XRecordMap = Run.LoadRecords(TableDef.Key, FieldDefMap, Where)

        For Each Record As XRecord In RecordMap
            '    change the record details, located in the record header
            Record.Details = "This is record #" & Record.Id.ToString
            Record.Save(False)
        Next

        '    load the records second methode
        Dim newRecordMap As New XRecordMap
        Run.LoadRecords(newRecordMap, TableDef.Key, FieldDefMap, Where)

        For Each Record As XRecord In newRecordMap
            '    change the record details, located in the record header empty string instead of old value
            Record.Details = String.Empty
            Record.Save(False)
        Next

    End Sub

End Class
See Also