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.
50 lines
2.0 KiB
50 lines
2.0 KiB
Imports System
|
|
Imports System.Data
|
|
Imports System.Data.SqlTypes
|
|
Imports System.Data.SqlClient
|
|
Public Class TabControlMultiLine
|
|
|
|
Dim m_tabcontrol As Windows.Forms.TabControl
|
|
Property tabcontrol() As Windows.Forms.TabControl
|
|
Get
|
|
Return m_tabcontrol
|
|
End Get
|
|
Set(ByVal value As Windows.Forms.TabControl)
|
|
m_tabcontrol = value
|
|
End Set
|
|
End Property
|
|
|
|
Public Function Set_Multiline(ByRef ctl As Windows.Forms.TabControl)
|
|
If Check_multiline(ctl.Name) = True Then ctl.Multiline = True
|
|
End Function
|
|
|
|
Private Function Check_multiline(ByVal name As String) As Boolean
|
|
Dim scmCmdToExecute As SqlCommand = New SqlCommand()
|
|
Dim dtToReturn As DataTable = New DataTable()
|
|
Dim sdaAdapter As SqlDataAdapter = New SqlDataAdapter(scmCmdToExecute)
|
|
scmCmdToExecute.CommandText = "dbo.sp_get_TabControlMultiline"
|
|
scmCmdToExecute.CommandType = CommandType.StoredProcedure
|
|
scmCmdToExecute.Connection = conn.scoDBConnection
|
|
Try
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@TabControlname", SqlDbType.VarChar, 255, ParameterDirection.Input, True, 10, 0, "", DataRowVersion.Proposed, name))
|
|
scmCmdToExecute.Parameters.Add(New SqlParameter("@Multiline", SqlDbType.Int, 4, ParameterDirection.Output, True, 10, 0, "", DataRowVersion.Proposed, 0))
|
|
conn.OpenConnection()
|
|
scmCmdToExecute.ExecuteNonQuery()
|
|
conn.CloseConnection(True)
|
|
Try
|
|
If scmCmdToExecute.Parameters("@Multiline").Value = 1 Then
|
|
Return True
|
|
Else
|
|
Return False
|
|
End If
|
|
Catch ex As Exception
|
|
End Try
|
|
Catch ex As Exception
|
|
Throw New Exception("clsApplikation::" & scmCmdToExecute.CommandText & "::Error occured." & ex.Message, ex)
|
|
Finally
|
|
scmCmdToExecute.Dispose()
|
|
sdaAdapter.Dispose()
|
|
End Try
|
|
End Function
|
|
End Class
|