WebService application that return dataset
'using module on VB .Net
Imports System.Data.SqlClient
Imports WindowsApplication3.MyWebService
Imports System.Data
Module Module1
Public xConn As New SqlConnection
Public xAdpt, xadpt1 As New SqlDataAdapter
Public xSet, xset1 As DataSet
Public xView As DataView
Public WebService As New MyWebService.Service
Public xCmd As New SqlCommand
Public xStr As String
Public xRead As SqlDataReader
Public xRow As DataRow
End Module
' using main form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
xSet = WebService.GetData("Select * from penjualan", "penjualan")
‘atau gridPenjualan.DataSource = WebService.GetData(TextBox1.Text, TextBox2.Text)
xView = New DataView(xSet.Tables("penjualan"))
gridPenjualan.DataSource = xView
xView = New DataView(xSet.Tables("penjualan"))
gridPenjualan.DataSource = xView
For i As Integer = 0 To xSet.Tables("penjualan").Columns.Count - 1
cbSort.Items.Add(xSet.Tables("penjualan").Columns(i).ColumnName)
Next
Label6.Text = "Double-click untuk Update atau delete data"
Me.CenterToScreen()
End Sub
cbSort.Items.Add(xSet.Tables("penjualan").Columns(i).ColumnName)
Next
Label6.Text = "Double-click untuk Update atau delete data"
Me.CenterToScreen()
End Sub
Comments
Post a Comment