【正文】
RadioButton_checked2 = 男 Else RadioButton_checked2 = 女 End If Dim strsql1 As String = update Staff_Information set sname=39。 amp。 amp。 39。,ssex=39。 amp。 RadioButton_checked2 amp。 39。,sbirthday=39。 amp。 amp。 39。,snation=39。 amp。 amp。 39。where sno=39。 amp。 amp。 39。 Dim sql1 As New SqlCommand(strsql1, sqlcon) () () () Dim strsql2 As String = update Education_Information set egraduation=39。 amp。 amp。 39。,emajor=39。 amp。 amp。 39。 ,etime=39。 amp。 amp。 39。,eschool=39。 amp。 amp。 39。,efor_language=39。 amp。 amp。 39。where sno=39。 amp。 amp。 39。 Dim sql2 As New SqlCommand(strsql2, sqlcon) () () () Dim RadioButton_checked As String = If Then RadioButton_checked = 已婚 ElseIf Then RadioButton_checked = 未婚 ElseIf Then RadioButton_checked = 再婚 ElseIf Then RadioButton_checked = 離異 End If Dim strsql3 As String = update Marital_Status set mcondition=39。 amp。 RadioButton_checked amp。 39。,mname=39。 amp。 amp。 39。 ,mjob=39。 amp。 amp。 39。,mpany=39。 amp。 amp。 39。where sno=39。 amp。 amp。 39。 Dim sql3 As New SqlCommand(strsql3, sqlcon) () () () Dim strsql4 As String = update post set pname=39。 amp。 amp。 39。,pexperience=39。 amp。 amp。 39。,psalary=39。 amp。 Int(Val()) amp。 39。where sno=39。 amp。 amp。 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。 amp。 amp。 39。,dname=39。 amp。 amp。 39。 Dim sql As New SqlCommand(strsql2, sqlcon) () () = 修改 disabletextbox() = True MsgBox(修改成功!) Else = 確定 = False = True = True End If End If End Sub、部門號直接刪除某個(gè)員工和某個(gè)部門的信息 Private Sub Button3_Click(sender As Object, e As EventArgs) Handles If = 員工號 Then Dim strsql1 As String = delete from Education_Information where sno=39。 amp。 amp。 39。 Dim sql1 As New SqlCommand(strsql1, sqlcon) () () () Dim strsql2 As String = delete from Marital_Status where sno=39。 amp。 amp。 39。 Dim sql2 As New SqlCommand(strsql2, sqlcon) () () () Dim strsql3 As String = delete from post where sno=39。 amp。 amp。 39。 Dim sql3 As New SqlCommand(strsql3, sqlcon) () () () Dim strsql4 As String = delete from Staff_Information where sno=39。 amp。 amp。 39。 Dim sql4 As New SqlCommand(strsql4, sqlcon) () () () MsgBox(刪除成功!) clear() jisuan2() Else Dim strsql5 As String = delete from Department where dno=39。 amp。 amp。 39。 Dim sql5 As New SqlCommand(strsql5, sqlcon) () () () MsgBox(刪除成功!) clear() jisuan() End If End Sub第 32 頁 共 33 頁