Advertisement
Guest User

Untitled

a guest
Jul 11th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Private Sub DeleteEmailMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteEmailMenuItem.Click
  2. If AllowSaving = False Then Exit Sub
  3. Dim taEmailAddresses As New dsEmailManagerTableAdapters.EmailAddressesTableAdapter
  4.  
  5. If MessageBox.Show("Are you sure you want to delete the selected entries?", "HPD Alerts", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
  6. Dim EMailID As Integer = lstEmails.SelectedItem("EmailID")
  7. taEmailAddresses.DeleteEmailAddress(EMailID)
  8. PopulateEmailsListBox()
  9. lstEmails.ClearSelected()
  10. PopulateEmailCheckBoxes()
  11. End If
  12. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement