Dim con As New SqlConnection
Dim cmd As New SqlCommand
Dim lreturn As Boolean = True
con.ConnectionString = Settings.ConnectionString
con.Open()
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
cmd.CommandText = "totalgaji"
cmd.Parameters.Add("@kode", SqlDbType.Varchar)
cmd.Parameters("@kode").Direction = ParameterDirection.Input
cmd.Parameters("@kode").Value = 'MKT' cmd.Parameters.Add("@hasil", SqlDbType.Int)
cmd.Parameters("@hasil").Direction = ParameterDirection.Output
cmd.ExecuteNonQuery()
Dim intCount As Integer = 0
Integer.TryParse(cmd.Parameters("@hasil").Value, intCount)
If intCount > 0 Then MessageBox.Show("Total Gaji " & intCount.ToString() & "")
con.Close()
cmd.Parameters("@hasil").Direction = ParameterDirection.Output
cmd.ExecuteNonQuery()
Dim intCount As Integer = 0
Integer.TryParse(cmd.Parameters("@hasil").Value, intCount)
If intCount > 0 Then MessageBox.Show("Total Gaji " & intCount.ToString() & "")
con.Close()