.Net Code Examples

Sys.Appframe3.Utils

Appframe R4 has a Sys.Appframe3.Utils assembly which allows the system to redirect access layer connections to the corresponding access layer, to afAccessLayer for WinForm applications and to ConnectionContext.Current for requests from web.

Sys.Appframe3.Utils.AccessLayerHelper exposes the following methods:

ExecuteProcedure(pProcedure As afProcedureCall) As DataSet ExecuteProcedures(ParamArray pProcedures() As afProcedureCall) As DataSet GetData(pRecordSource As afRecordSource) As DataTable GetData(pRecordSources As afReportRecordSourceCollection, pRecordSourceID As String) As DataTable GetDataScalar(pRecordSource As afRecordSource) As Object GetRecordCount(pRecordSource As afRecordSource) As Integer BulkInsert(pData As DataTable, pDestinationTable As String, Timeout As Integer) BulkInsert(pData As DataTable, pDestinationTable As String) GetSchema(pViewName As String) As DataTable GetReportData(pRecordSource As afReportRecordSourceCollection, pRSID As String) As DataTable AddData(pViewName As String, pFieldsAndValues As Dictionary(Of String, Object), pSelectColumns As Columns.afSelectColumnCollection, pUniqueViewName As String) As DataTable PutData(pViewName As String, pFieldsAndValues As Dictionary(Of String, Object), pSelectColumns As Columns.afSelectColumnCollection, pUniqueViewName As String, pPrimKey As Guid, pTimestamp As DateTime?) As DataTable DelData(pViewName As String, pPrimKey As Guid) As Integer DelDataFilter(pViewName As String, pFilter As String) As Integer InsertFile(pStream As IO.Stream, pFileName As String, pViewName As String, pPrimKey As Guid) InsertFile(pStream As IO.Stream, pFileName As String) As Guid CreateUploadStream(pFileName As String, pViewName As String, pPrimKey As Guid) As FileStoreStream GetFileStream(pViewName As String, pPrimKey As Guid) As FileStoreStream GetFileStream(pViewName As String, pPrimKey As Guid, pFileRef As Guid) As FileStoreStream

Usage

To use the functionality a reference to Sys.Appframe3.Utils needs to added to the project/report required assemblies. In your code/report script you need to import it:
Imports Sys.Appframe3.Utils