Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. xPR = PtblProjectIDComboBox.SelectedValue
  2. xPR = Convert.ToInt32(xPR)
  3.  
  4. For i = 0 To ListBox1.Items.Count - 1 'count to stroll thru company db and check if selected
  5. If ListBox1.GetSelected(i) = True Then 'if selected then add record project # and selected company#
  6. xCR = Convert.ToInt32(ListBox1.ValueMember)
  7. xselected = True
  8. TableGroupProjectTableAdapter.Insert(xPR, xCR, xselected) 'add the record if it is valid
  9.  
  10. 'update db
  11. Validate()
  12. TableAdapterManager.UpdateAll(CMDB1copy2DataSet)
  13. End If
  14. Next i
  15. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement