Public Shared Function GetTechnologyData() As List(Of TechnologySet)
Dim techlist As New List(Of TechnologySet)
Dim CnSql As SqlConnection = BadsDB.GetConnection
Dim cmdA As SqlCommand
cmdA = New SqlClient.SqlCommand("up_CompareTechnology", CnSql)
cmdA.CommandType = CommandType.StoredProcedure
Try
CnSql.Open()
Dim reader As SqlDataReader = cmdA.ExecuteReader(CommandBehavior.CloseConnection)
Dim x As Integer = 1
Do While reader.Read
Dim t As New TechnologySet
t.TechnologySetCode = reader("TechnologySetCode").ToString
t.TechnologySetName = reader("TechnologySetName").ToString
t.TechnologySetType = reader("TechnologySetType").ToString
t.Notes = reader("Notes").ToString
techlist.Add(t)
Loop
Return techlist
Catch excA As SqlException
MsgBox(excA.Message)
Return Nothing
Finally
CnSql.Close()
End Try
|