Click or drag to resize
XRecord Class
Class XRecord.
Inheritance Hierarchy
SystemObject
  Biolomics.BioCallbackXRecord

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

The XRecord type exposes the following members.

Properties
  NameDescription
Public propertyChangeHeaderGroup
Changes The changeHeader group.
Public propertyDeleteGroup
Gets or sets the delete group.
Public propertyDetails
Gets or sets the record details.
Public propertyId
Gets or sets the record Id.
Public propertyName
Gets or sets the record name.
Public propertyReadGroup
Gets or sets the read group.
Public propertyUsedForWebIdentification
Gets or sets a value indicating whether the record is used for web identification.
Public propertyWriteGroup
Gets or sets the write group.
Top
Methods
  NameDescription
Public methodAddChangeHeaderGroup
Adds the change header group.
Public methodAddDeleteGroup
Adds the delete group.
Public methodAddReadGroup
Adds a group to read group.
Public methodAddWriteGroup
Adds the write group.
Public methodCheckPrivileges
Controls the consistancy of the record privileges
Public methodClone
Clones this instance.
Public methodCreationDate
Gets the creation date.
Public methodDateToExport
Format record data for export.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodFields
return the field map loaded for the record.
Public methodFields(Int64)
return one specific field Gets Field by Field key
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 methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsAnyLocked
Determines whether the record Is Locked .
Public methodIsAnyUnlocked
Determines whether [is any unlocked].
Public methodLastChangeDate
Gets the Last change date.
Public methodLastChangeUserEmail
Gets the last change user Email.
Public methodLoad
Loads the record with the specified field definition map.
Public methodLock
Locks this instance.
Public methodLocked
Gets Locked state of the Record.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOwnerEmail
Gets The owner Email.
Public methodReload
Reloads this instance.
Public methodReload(Int32)
Reloads this record. This function is non-readable-fields safe.
Public methodRemoveChangeHeaderGroup
Removes the change header group.
Public methodRemoveDeleteGroup
Removes the delete group.
Public methodRemoveReadGroup
Removes a group from the read group.
Public methodRemoveWriteGroup
Removes the write group.
Public methodSave
Saves this record, without any undo. This function is safe for non-writable-fields WARNING: There is no undo!
Public methodSqlCo
Gets the Sql connection of the record.
Public methodSummaryOrName
Gets the summary or the name of the record.By default it returns the record name but if the record is nothing.
Public methodTableKey
Gets the record table key.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUnlock
Unlocks this instance.
Public methodUnlocked
Gets UnLocked state of the Record.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Implements the operator = operator.
Public operatorStatic memberInequality
Implements the operator <> operator.
Top
Examples
This is an example of use of XRecord class and change some record properties.
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