Initial commit
This commit is contained in:
42
SW/AssessmentMgmt/Klassen/clsStammdaten.vb
Normal file
42
SW/AssessmentMgmt/Klassen/clsStammdaten.vb
Normal file
@@ -0,0 +1,42 @@
|
||||
Imports System
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlTypes
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
Namespace db
|
||||
|
||||
Public Class clsStammdaten
|
||||
Public Function Get_Stammdaten(ByVal Tabelle As String, ByVal orderby As String) As DataTable
|
||||
Dim selectcommand As New SqlCommand
|
||||
Dim connection As New SqlConnection()
|
||||
Dim da As New SqlDataAdapter("", connection)
|
||||
Dim ds As New DataSet
|
||||
selectcommand.CommandText = "sp_get_stammdaten"
|
||||
selectcommand.Parameters.Add("@Mitarbeiternr", SqlDbType.Int, 4)
|
||||
selectcommand.Parameters.Add("@Tabelle", SqlDbType.VarChar, 255)
|
||||
selectcommand.Parameters.Add("@Orderby", SqlDbType.VarChar, 255)
|
||||
selectcommand.Parameters(0).Value = Globals.clsmitarbeiter.iMitarbeiternr.Value
|
||||
selectcommand.Parameters(1).Value = Tabelle
|
||||
selectcommand.Parameters(2).Value = orderby
|
||||
|
||||
selectcommand.CommandType = CommandType.StoredProcedure
|
||||
selectcommand.Connection = connection
|
||||
Try
|
||||
connection.ConnectionString = Globals.sConnectionString
|
||||
connection.Open()
|
||||
da.SelectCommand = selectcommand
|
||||
da.Fill(ds)
|
||||
Return ds.Tables(0)
|
||||
Catch ex As Exception
|
||||
Finally
|
||||
connection.Close()
|
||||
da.Dispose()
|
||||
ds.Dispose()
|
||||
selectcommand.Dispose()
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Reference in New Issue
Block a user