Common Reference

Common

2006 by Zubler & Partner AG


EDOKALib.Common Namespace

Namespace EDOKALib.Common

Classes

class Consts | Diese klasse beinhaltet Konstanten welche im der gesamten EDOKAApp verwendet werden
class Crypto | Diese klasse beinhaltet Methoden welche für den Kryptografischen Teil im EDOKA verwendet werden
class Datenbank | Diese klasse beinhaltet Methoden welche für den Datenbank Zugriff im DataAccess verwendet werden
class Tools | Diese klasse beinhaltet Methoden, welche im gesamten Edoka über alle Layers verwendet werden


EDOKALib.Common Members

EDOKALib.Common overview

Classes

class Consts | Diese klasse beinhaltet Konstanten welche im der gesamten EDOKAApp verwendet werden
class Crypto | Diese klasse beinhaltet Methoden welche für den Kryptografischen Teil im EDOKA verwendet werden
class Datenbank | Diese klasse beinhaltet Methoden welche für den Datenbank Zugriff im DataAccess verwendet werden
class Tools | Diese klasse beinhaltet Methoden, welche im gesamten Edoka über alle Layers verwendet werden

See Also

EDOKALib.Common Namespace


Consts Class

Diese klasse beinhaltet Konstanten welche im der gesamten EDOKAApp verwendet werden

For a list of all members of this type, see Consts Members.

System.Object
EDOKALib.Common.Consts

Public Class Consts

Requirements

Namespace: Common

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

Assembly: EDOKALib.Common (in EDOKALib.Common.dll)

See Also

Consts Members


Crypto Class

Diese klasse beinhaltet Methoden welche für den Kryptografischen Teil im EDOKA verwendet werden

For a list of all members of this type, see Crypto Members.

System.Object
EDOKALib.Common.Crypto

Public Class Crypto

Requirements

Namespace: Common

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

Assembly: EDOKALib.Common (in EDOKALib.Common.dll)

See Also

Crypto Members


Crypto Members

Crypto overview

Methods

method DecryptText | Entschlüsselt einen Text
method EncryptText | Verschlüsselt einen Text mit dem angegebenen Passwort

See Also

Crypto Class


Crypto Methods

Crypto overview

Methods

method DecryptText | Entschlüsselt einen Text
method EncryptText | Verschlüsselt einen Text mit dem angegebenen Passwort

See Also

Crypto Class


Crypto.DecryptText Method

Entschlüsselt einen Text

Public Shared Function DecryptText( _
   ByVal strText As String _
)

Parameters

strText
Required. Zu verschlüsselnder Text

Source code

[Visual Basic]
    Public Shared Function DecryptText(ByVal strText As String)
        Dim i As Integer, c As Integer
        Dim strBuff As String
        Dim strPwd As String = CRYPTO_PASSWORD

        strPwd = UCase$(strPwd)
        If Len(strPwd) Then
            For i = 1 To Len(strText)
                c = Asc(Mid$(strText, i, 1))
                c = c - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
                strBuff = strBuff & Chr(c And &HFF)
            Next i
        Else
            strBuff = strText
        End If
        DecryptText = strBuff
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Crypto


Crypto.EncryptText Method

Verschlüsselt einen Text mit dem angegebenen Passwort

Public Shared Function EncryptText( _
   ByVal strText As String _
)

Parameters

strText
Required. Zu verschlüsselnder Text

Source code

[Visual Basic]
    Public Shared Function EncryptText(ByVal strText As String)
        Dim i As Integer, c As Integer
        Dim strBuff As String
        Dim strPwd As String = CRYPTO_PASSWORD

        strPwd = UCase$(strPwd)
        If Len(strPwd) Then
            For i = 1 To Len(strText)
                c = Asc(Mid$(strText, i, 1))
                c = c + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
                strBuff = strBuff & Chr(c And &HFF)
            Next i
        Else
            strBuff = strText
        End If
        EncryptText = strBuff
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Crypto


Datenbank Class

Diese klasse beinhaltet Methoden welche für den Datenbank Zugriff im DataAccess verwendet werden

For a list of all members of this type, see Datenbank Members.

System.Object
EDOKALib.Common.Datenbank

Public Class Datenbank

Requirements

Namespace: Common

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

Assembly: EDOKALib.Common (in EDOKALib.Common.dll)

See Also

Datenbank Members


Datenbank Members

Datenbank overview

Methods

method GetDSN Liest aus dem Connection String file edokaconn.cfg aus

See Also

Datenbank Class


Datenbank Methods

Datenbank overview

Methods

method GetDSN Liest aus dem Connection String file edokaconn.cfg aus

See Also

Datenbank Class


Datenbank.GetDSN Method

Liest aus dem Connection String file edokaconn.cfg aus

Overloads Shared Function GetDSN() As String

Returns

Den entschlüsseleten DSN string

Source code

[Visual Basic]
    Overloads Shared Function GetDSN() As String
        Try
            Dim file As System.IO.File
            Dim reader As System.IO.StreamReader
            Dim connectionString As String

            reader = file.OpenText(AppDomain.CurrentDomain.BaseDirectory + "edokaconn.cfg")

            connectionString = reader.ReadLine
            connectionString = Crypto.DecryptText(connectionString)
            connectionString = Left(connectionString, Len(connectionString) - 1)

            reader.Close()

            GetDSN = connectionString

        Catch ex As Exception
            Throw ex
        End Try
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Datenbank


Tools Class

Diese klasse beinhaltet Methoden, welche im gesamten Edoka über alle Layers verwendet werden

For a list of all members of this type, see Tools Members.

System.Object
EDOKALib.Common.Tools

Public Class Tools

Requirements

Namespace: Common

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

Assembly: EDOKALib.Common (in EDOKALib.Common.dll)

See Also

Tools Members


Tools Members

Tools overview

Methods

method CToBool |
method CToByte |
method CToByteArr |
method CToDateTime |
method CToDecimal |
method CToDouble |
method CToInt16 |
method CToInt32 |
method CToInt64 |
method CToSingle |
method CToString |
method ValidateDS | Überprüft TableCount und RowCount eines DataSet

See Also

Tools Class


Tools Methods

Tools overview

Methods

method CToBool |
method CToByte |
method CToByteArr |
method CToDateTime |
method CToDecimal |
method CToDouble |
method CToInt16 |
method CToInt32 |
method CToInt64 |
method CToSingle |
method CToString |
method ValidateDS | Überprüft TableCount und RowCount eines DataSet

See Also

Tools Class


Tools.CToBool Method

Public Shared Function CToBool( _
   ByVal o As Object _
) As Boolean

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToBool(ByVal o As Object) As Boolean
        If o Is System.DBNull.Value Then
            Return False
        Else
            If TypeOf o Is Boolean Then
                Return CBool(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToByte Method

Public Shared Function CToByte( _
   ByVal o As Object _
) As Byte

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToByte(ByVal o As Object) As Byte
        If o Is System.DBNull.Value Then
            Return New Byte()
        Else
            If TypeOf o Is Byte Then
                Return CByte(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToByteArr Method

Public Shared Function CToByteArr( _
   ByVal o As Object _
) As Byte()

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToByteArr(ByVal o As Object) As Byte()
        If o Is System.DBNull.Value Then
            Return New Byte() {}
        Else
            If TypeOf o Is Byte() Then
                Return CType(o, Byte())
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToDateTime Method

Public Shared Function CToDateTime( _
   ByVal o As Object _
) As DateTime

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToDateTime(ByVal o As Object) As DateTime
        If o Is System.DBNull.Value Then
            Return DateTime.MinValue
        Else
            If TypeOf o Is DateTime Then
                Return CDate(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToDecimal Method

Public Shared Function CToDecimal( _
   ByVal o As Object _
) As Decimal

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToDecimal(ByVal o As Object) As Decimal
        If o Is System.DBNull.Value Then
            Return 0
        Else
            If TypeOf o Is Decimal Then
                Return CDec(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToDouble Method

Public Shared Function CToDouble( _
   ByVal o As Object _
) As Double

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToDouble(ByVal o As Object) As Double
        If o Is System.DBNull.Value Then
            Return 0
        Else
            If TypeOf o Is Double Then
                Return CDbl(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToInt16 Method

Public Shared Function CToInt16( _
   ByVal o As Object _
) As Int16

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToInt16(ByVal o As Object) As Int16
        If o Is System.DBNull.Value Then
            Return 0
        Else
            If TypeOf o Is Int16 Then
                Return CShort(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToInt32 Method

Public Shared Function CToInt32( _
   ByVal o As Object _
) As Int32

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToInt32(ByVal o As Object) As Int32
        If o Is System.DBNull.Value Then
            Return 0
        Else
            If TypeOf o Is Int32 Then
                Return CInt(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToInt64 Method

Public Shared Function CToInt64( _
   ByVal o As Object _
) As Int64

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToInt64(ByVal o As Object) As Int64
        If o Is System.DBNull.Value Then
            Return 0
        Else
            If TypeOf o Is Int64 Then
                Return CLng(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToSingle Method

Public Shared Function CToSingle( _
   ByVal o As Object _
) As Single

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToSingle(ByVal o As Object) As Single
        If o Is System.DBNull.Value Then
            Return 0
        Else
            If TypeOf o Is Single Then
                Return CSng(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.CToString Method

Public Shared Function CToString( _
   ByVal o As Object _
) As String

Parameters

o
Required.

Source code

[Visual Basic]
    Public Shared Function CToString(ByVal o As Object) As String
        If o Is System.DBNull.Value Then
            Return ""
        Else
            If TypeOf o Is String Then
                Return CStr(o)
            End If
        End If
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Tools.ValidateDS Method

Überprüft TableCount und RowCount eines DataSet

Public Shared Function ValidateDS( _
   ByVal ds As DataSet _
) As Boolean

Parameters

ds
Required.

Returns

True wenn table- und rowcount > 0

Source code

[Visual Basic]
    Public Shared Function ValidateDS(ByVal ds As DataSet) As Boolean
        Try
            If ds.Tables.Count > 0 Then
                If ds.Tables(0).Rows.Count > 0 Then
                    Return True
                End If
            End If
            Return False
        Catch ex As Exception
            TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.Common.Tools.ValidateDS", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
        End Try
    End Function

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

See Also

Tools


Consts Members

Consts overview

See Also

Consts Class