Skip to content

Instantly share code, notes, and snippets.

View pradesa's full-sized avatar

pradesa pradesa

  • design kamarku
  • cirebon
View GitHub Profile
Public Shared Sub ServerList(ByVal ComboInstance As ComboBox)
Dim _server As String = String.Empty
Dim _Instance = SqlDataSourceEnumerator.Instance
Dim _Table = _Instance.GetDataSources
For Each _row In _Table.Rows
_server = String.Empty
_server = If(_row("InstanceName").ToString.Length > 0, String.Format("{0}\{1}", _row("ServerName"), _row("InstanceName")), _row("ServerName"))
ComboInstance.Items.Add(_server)
Next
End Sub
@pradesa
pradesa / gist:6667853
Last active December 23, 2015 17:19
Paging Data dengan VB.Net
Imports System.Data.Sql
Imports System.Data.SqlClient
Public Class PagingData
Private Shared iMaxRow As Integer = 20
Private Shared iCurrentIndex As Integer
Private Shared iTotalIndex As Integer
Private Shared iCurrentPage As Integer
Private Shared iTotalPage As Integer
Imports System.Data.SqlClient
Imports System.Data.Sql
Public Class nPagingData
Public Property TombolFirst() As ToolStripButton
Public Property TombolPrev() As ToolStripButton
Public Property TombolNext() As ToolStripButton
Public Property TombolLast() As ToolStripButton
Public Property TextCurrentPage() As ToolStripTextBox
Public Property TextTotalPage() As ToolStripTextBox
'==================================================