You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.7 KiB
71 lines
2.7 KiB
Imports System
|
|
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
|
|
Namespace TKB.VV.Stammdaten
|
|
|
|
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
|
|
|
|
Public Function Get_Gremium(ByVal type As Integer, ByVal subtype As Integer) 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 = "dbo.sp_get_gremium"
|
|
selectcommand.Parameters.Add("@type", SqlDbType.Int, 4)
|
|
selectcommand.Parameters.Add("@subtype", SqlDbType.Int, 4)
|
|
selectcommand.Parameters(0).Value = type
|
|
selectcommand.Parameters(1).Value = subtype
|
|
|
|
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
|
|
|