Posted By

hikoru on 05/09/11


Tagged


Versions (?)

CboYear


 / Published in: VB.NET
 

  1. Private Sub cboyear_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboyear.SelectedIndexChanged
  2. 'produce a report
  3. Dim count As Integer
  4. Dim count2 As Integer
  5. Dim dataR As DataRow
  6. Dim dataS As DataRow
  7. Dim mon As Date
  8.  
  9. For count = 0 To dsReservation.RESERVATION.Rows.Count - 1 Step 1
  10. dataR = dsReservation.RESERVATION.Rows(count)
  11.  
  12. For count2 = 0 To dsReservation.RESERVATION.Rows.Count - 1 Step 1
  13. dataS = dsReservation.RESERVATION.Rows(count2)
  14. mon = dataR("ReserveDate")
  15.  
  16. Next
  17. lstReserveNo.Items.Add(dataR("ReserveNo"))
  18. lstReserveDate.Items.Add(dataR("ReserveDate"))
  19. lstIslandName.Items.Add(dataR("IslandName"))
  20. lstTotalDeposit.Items.Add(dataR("TotalDeposit"))
  21. lbldeptotal.Text = "0"
  22.  
  23. For a As Integer = 0 To lstTotalDeposit.Items.Count - 1 Step 1
  24. lbldeptotal.Text = CInt(lbldeptotal.Text) + CInt(lstTotalDeposit.Items.Item(a).ToString)
  25. Next
  26. Next
  27. cboyear.Enabled = False
  28. End Sub

Report this snippet  

You need to login to post a comment.