RunGetSelRecordIdList Method |
Namespace: Biolomics.BioCallback
public static int GetSelRecordIdList( ref List<int> p_RecIdList, RunGetRecordIdListEnum p_What )
Imports System Imports BioloMICS.BioCallback Imports BioloMICS.SharedClasses Imports System.Collections Public Class Program <STAThread()> Shared Sub Main() Dim program As New Program program.RunQuery() End Sub Public Sub RunQuery() ' ***** Get selected record IDs ***** Dim RecordIdList As New Generic.List(Of Integer) Dim ErrorCode As Integer = Run.GetSelRecordIdList(RecordIdList, Run.GetRecordIdListEnum.Selected) Console.Write(vbCrLf & "There is " & RecordIdList.Count().ToString() & " record(s) selected") ' ***** Get all record IDs of the current table ***** ErrorCode = Run.GetSelRecordIdList(RecordIdList, Run.GetRecordIdListEnum.All) Console.Write(vbCrLf & "There is " & RecordIdList.Count().ToString() & " record(s) in the current table") ' ***** Get the ID list of all records displayed in the current table ***** ErrorCode = Run.GetSelRecordIdList(RecordIdList, Run.GetRecordIdListEnum.Displayed) If ErrorCode <> 0 Then Console.Write(vbCrLf & "Could not read the currently selected record ID list") Return End If Console.Write(vbCrLf & "There is " & RecordIdList.Count().ToString() & " record(s) displayed") End Sub ' display all recent error messages Public Sub DrawMessages() Dim ErrorList As Generic.List(Of String) = Run.GetLastErrorMessage() For Each errorMsg As String In ErrorList Console.Write(vbcrlf & errorMsg) Next End Sub End Class