Posted By

nazslash on 12/01/11


Tagged


Versions (?)

codess


 / Published in: VB.NET
 

=.=

  1. Public Class DisplayCustomerAreaForm
  2. Private Function ValidateData(ByVal value As Object) As String
  3. If Not DBNull.Value.Equals(value) Then
  4. Return CStr(value)
  5. Else
  6. Return "-"
  7. End If
  8. End Function
  9. Private Sub AddNewLVRow(ByVal ListViewItm As ListView, ByVal xdataRow As DataRow)
  10. Dim itmparent As New ListViewItem(ValidateData(xdataRow("Telno")))
  11. Dim itm1 As New ListViewItem.ListViewSubItem(itmparent, ValidateData(xdataRow("Name")))
  12. Dim itm2 As New ListViewItem.ListViewSubItem(itmparent, ValidateData(xdataRow("Address")))
  13.  
  14. itmparent.SubItems.Add(itm1)
  15. itmparent.SubItems.Add(itm2)
  16.  
  17. ListViewItm.Items.Add(itmparent)
  18. End Sub
  19. Private Sub loadcustomer()
  20. Dim AllRow As DataRow
  21. daCUSTOMER.Fill(dsCUSTOMER)
  22.  
  23. For i As Integer = 0 To dsCUSTOMER.CUSTOMER.Rows.Count - 1 Step 1
  24. AllRow = dsCUSTOMER.CUSTOMER.Rows(i)
  25.  
  26. Next
  27. End Sub
  28.  
  29.  
  30. Private Sub ExitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitBtn.Click
  31. Me.Close()
  32. End Sub
  33.  
  34. Private Sub MainBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainBtn.Click
  35. SelectForm.Show()
  36. Me.Close()
  37. End Sub
  38.  
  39. Private Sub PrevBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrevBtn.Click
  40. DisplayCustomerForm.Show()
  41. Me.Close()
  42. End Sub
  43.  
  44. Private Sub CustDisListView_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
  45.  
  46. End Sub
  47.  
  48. Private Sub DisplayBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DisplayBtn.Click
  49. loadcustomer()
  50. End Sub
  51. End Class

Report this snippet  

You need to login to post a comment.