Imports System.Data.SqlClient

Public Class FlujoArbitrajeDAO


    Dim Operaciones As New Operaciones


    Public Function CargarArbitraje(ByVal CodigoAsociado As String) As DataSet
        Dim objCon As New Conexion
        Dim da As New SqlDataAdapter
        Dim ds As New DataSet

        Dim cn As SqlConnection = objCon.Conectar
        If cn.State = ConnectionState.Closed Then
            cn.Open()
        End If
        Dim sql = "[dbo].[SP_CargarArbitraje]"


        Dim cmd As New SqlCommand(sql, cn)
        cmd.CommandType = CommandType.StoredProcedure
        cmd.Parameters.Add("CodigoAso", SqlDbType.VarChar).Value = CodigoAsociado
        da = New SqlDataAdapter(cmd)

        da.Fill(ds)
        cn.Close()
        Return ds
    End Function
End Class
