Public Shared Function GetMetricList(ByVal metriclist As List(Of Metrics)) As DataTable
Dim dset As New DataSet("MyDataSet")
Dim ResultTable As New DataTable
Dim CnSql As SqlConnection = BadsDB.GetConnection
Dim cmdA As SqlCommand
cmdA = New SqlCommand("[up_GetSelectedMetrics]", CnSql)
cmdA.CommandType = CommandType.StoredProcedure
cmdA.CommandTimeout = 7200
Dim dTable As New DataTable
Try
CnSql.Open()
For Each m As Metrics In metriclist
With cmdA
.Parameters.Clear()
.Parameters.AddWithValue("@TSC", m.Technology.ToString)
End With
Dim dAdp As New SqlDataAdapter(cmdA)
dAdp.Fill(dTable)
dAdp.Dispose()
Next
Catch excA As SqlException
MsgBox(excA.Message, excA.GetType.ToString)
Finally
CnSql.Close()
End Try
Return dTable
|