/ Published in: VB.NET
=.=
Expand |
Embed | Plain Text
Public Class DisplayCustomerAreaForm Private Function ValidateData(ByVal value As Object) As String If Not DBNull.Value.Equals(value) Then Return CStr(value) Else Return "-" End If End Function Private Sub AddNewLVRow(ByVal ListViewItm As ListView, ByVal xdataRow As DataRow) Dim itmparent As New ListViewItem(ValidateData(xdataRow("Telno"))) Dim itm1 As New ListViewItem.ListViewSubItem(itmparent, ValidateData(xdataRow("Name"))) Dim itm2 As New ListViewItem.ListViewSubItem(itmparent, ValidateData(xdataRow("Address"))) itmparent.SubItems.Add(itm1) itmparent.SubItems.Add(itm2) ListViewItm.Items.Add(itmparent) End Sub Private Sub loadcustomer() Dim AllRow As DataRow daCUSTOMER.Fill(dsCUSTOMER) For i As Integer = 0 To dsCUSTOMER.CUSTOMER.Rows.Count - 1 Step 1 AllRow = dsCUSTOMER.CUSTOMER.Rows(i) Next End Sub Private Sub ExitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitBtn.Click Me.Close() End Sub Private Sub MainBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainBtn.Click SelectForm.Show() Me.Close() End Sub Private Sub PrevBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrevBtn.Click DisplayCustomerForm.Show() Me.Close() End Sub Private Sub CustDisListView_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub DisplayBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayBtn.Click loadcustomer() End Sub End Class
You need to login to post a comment.
