Listing 5: VB.NET Code Behind Form2 Public Shared fldNewPassword As String Private Sub btnSubmit_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnSubmit.Click 'Declaration of proxy variable and 'variable to hold array of objects Dim xws1 As New cab233a.SSMWSEmpPhones Dim response As System.Array 'Invoke the UpdateEmpPhonesRow method 'and respond to errors if they happen. Try response = _ xws1.UpdateEmpPhonesRow(CInt(txtEmployeeID.Text), _ True, txtPassword.Text, txtFname.Text, _ txtLname.Text, CInt(txtPhone.Text), True) If response(0) = 0 Then MessageBox.Show("Revise EmployeeID or Password " & _ "to match an existing row in web service.", _ "SSMWSEmpPhones Web Service Message") End If Catch ex1 As Exception MsgBox("Error message:" & _ vbCr & _ ex1.Message) End Try End Sub Private Sub btnValidate_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnValidate.Click 'Open a new instance of Form3. Dim frm3 As New Form3 frm3.Show() 'Copy values from Form2 to Form3. frm3.txtEmployeeID.Text = _ txtEmployeeID.Text frm3.txtOldPassword.Text = _ txtPassword.Text End Sub Private Sub btnUpdate_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles btnUpdate.Click 'Declaration of proxy variable Dim xws1 As New cab233a.SSMWSEmpPhones 'If fldNewPassword is not Failed, then 'invoke the UpdatePassword method; 'otherwise, display a diagnostic message. If Not (fldNewPassword = "Failed") Then xws1.UpdatePassword( _ CInt(txtEmployeeID.Text), True, _ fldNewPassword) Else MessageBox.Show( _ "No validate new password " & _ "available.", _ "SSMWSEmpPhones Web " & _ "Service Message") End If End Sub