【正文】
Dim sql4 As New SqlCommand(strsql4, sqlcon) () () () MsgBox(刪除成功!) clear() jisuan2() Else Dim strsql5 As String = delete from Department where dno=39。 Dim sql2 As New SqlCommand(strsql2, sqlcon) () () () Dim strsql3 As String = delete from post where sno=39。 Dim sql As New SqlCommand(strsql2, sqlcon) () () = 修改 disabletextbox() = True MsgBox(修改成功!) Else = 確定 = False = True = True End If End If End Sub、部門號直接刪除某個員工和某個部門的信息 Private Sub Button3_Click(sender As Object, e As EventArgs) Handles If = 員工號 Then Dim strsql1 As String = delete from Education_Information where sno=39。 Dim sql4 As New SqlCommand(strsql4, sqlcon) () () = 修改 disabletextbox() = True MsgBox(修改成功!) Else = 確定 = False enabletextbox() = False = False End If Else If = 確定 Then () Dim strsql2 As String = update Department set dmanager=39。,psalary=39。 Dim sql3 As New SqlCommand(strsql3, sqlcon) () () () Dim strsql4 As String = update post set pname=39。,mpany=39。,mname=39。where sno=39。,eschool=39。,emajor=39。where sno=39。,sbirthday=39。 Dim bc As BindingManagerBase Dim ds4 As New DataSet () Dim adp4 As New SqlDataAdapter(strsql4, sqlcon) () (ds4, info1) bc = (ds4, info1) If 0 Then = (info1).Rows(0)(1) = (info1).Rows(0)(2) = True = True MsgBox(已找到該記錄) Else MsgBox(你查找的數(shù)據(jù)不存在,——!可能已經(jīng)刪除) End If End IfEnd Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles If = 員工號 Then If = 確定 Then () Dim RadioButton_checked2 As String = If Then RadioButton_checked2 = 男 Else RadioButton_checked2 = 女 End If Dim strsql1 As String = update Staff_Information set sname=39。 Dim ds2 As New DataSet () Dim adp2 As New SqlDataAdapter(strsql2, sqlcon) () (ds2, info) Dim sex2 As String sex2 = (info).Rows(0)(1) If sex2 = 已婚 Then = True ElseIf sex2 = 再婚 Then = True ElseIf sex2 = 未婚 Then = True ElseIf sex2 = 離異 Then = True End If = (info).Rows(0)(2) = (info).Rows(0)(3) = (info).Rows(0)(4) Dim strsql3 As String = select * from Post where sno=39。 Dim ds As New DataSet () Dim adp As New SqlDataAdapter(strsql, sqlcon) () (ds, info) bc = (ds, info) If 0 Then = (info).Rows(0)(1) Dim sex1 As String sex1 = (info).Rows(0)(2) If sex1 = 男 Then = True Else = True