Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
  2. If boolModeAddNew = True Then
  3. If Trim(txtUserID.Text) <> "" And Trim(txtName.Text) <> "" And Trim(txtConfirmPswd.Text) Then
  4. If txtPassword.Text = txtConfirmPswd.Text Then
  5. strSQL = " insert into tblProfileLabOfficer ([userId], [name], IC, Password)values('" + txtUserID.Text + "','" + txtName.Text + "','" + txtIC.Text + "','" + txtPassword.Text + "')"
  6. actOfficer(strSQL)
  7.  
  8.  
  9.  
  10. Else
  11. MsgBox("Password not match")
  12. End If
  13.  
  14.  
  15.  
  16. Else
  17. MsgBox("The value Not Allowed Blanked! Try Again")
  18. End If
  19.  
  20. MsgBox("The New Data Has Been Recorded")
  21. btnAdd.Text = "Add New"
  22. txtUserID.Text = ""
  23. txtName.Text = ""
  24. txtIC.Text = ""
  25. txtPassword.Text = ""
  26. txtConfirmPswd.Text = ""
  27.  
  28. enableFalse()
  29.  
  30. boolModeAddNew = True
  31.  
  32.  
  33. ds = selectOfficer()
  34. dglabOfficer.DataSource = ds
  35. dglabOfficer.DataMember = "tblProfileLabOfficer"
  36.  
  37. Else
  38. btnAdd.Text = "kk"
  39. Clear()
  40. enableTrue()
  41. boolModeAddNew = True
  42.  
  43. End If
  44.  
  45. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement