i have a form that allows the user to add 0 to 4 contact numbers.
Dim ccontact As New Contact
Dim contactId As String = ccontact.getContactid(hcode)
phone1 = cbxPhone1.SelectedItem
phone2 = cbxPhone2.SelectedItem
phone3 = cbxPhone3.SelectedItem
phone4 = cbxPhone4.SelectedItem
tphone1 = txtPhone1.Text
tphone2 = txtPhone2.Text
tphone3 = txtPhone3.Text
tphone4 = txtPhone4.Text
If Not (tphone1 = "") Then
p.fAddPhoneNumber(contactId, phone1, tphone1)
ElseIf Not (tphone2 = "") Then
p.fAddPhoneNumber(contactId, phone1, tphone1)
p.fAddPhoneNumber(contactId, phone2, tphone2)
ElseIf Not (tphone3 = "") Then
p.fAddPhoneNumber(contactId, phone1, tphone1)
p.fAddPhoneNumber(contactId, phone2, tphone2)
p.fAddPhoneNumber(contactId, phone3, tphone3)
ElseIf Not (tphone4 = "") Then
p.fAddPhoneNumber(contactId, phone1, tphone1)
p.fAddPhoneNumber(contactId, phone2, tphone2)
p.fAddPhoneNumber(contactId, phone3, tphone3)
p.fAddPhoneNumber(contactId, phone4, tphone4)
End If
above is my code, it does not look right, any suggestions guys?