【文章內(nèi)容簡介】
Dim myreader As SqlDataReader Dim sql As String = select * from stu_info where snum=39。 amp。 Username amp。 39。 Dim myd As New SqlCommand(sql, myconn) = myd () myreader = () () = (1) If IsDBNull((4)) Then = Else = (4) End If If IsDBNull((5)) Then = Else = (5) End If () (mytable) If (0).Item(3) = 男 Then = True Else = True End If () End Sub 39。激活修改狀態(tài) Private Sub Button1_Click(ByVal sender As , ByVal e As ) Handles = True = True = True = True = True = True = True End Sub 39。修改姓名 Private Sub Button2_Click(ByVal sender As , ByVal e As ) Handles Dim myd As New SqlCommand If = Then MsgBox(姓名不能為空 , , 提示 ) ElseIf = False Then MsgBox(姓名無任何改變 , , 提示 ) Else Dim sql As String = update stu_info set sname=39。 amp。 Trim() amp。 39。 where snum=39。 amp。 Trim() amp。 39。 = sql = myconn () () () MsgBox(更新姓名成功 ) = False = False = False End If End Sub 39。修改性別 Private Sub Button3_Click(ByVal sender As , ByVal e As ) Handles Dim myd As New SqlCommand If = True Then = True Dim sql As String = update stu_info set sex=39。 amp。 女 amp。 39。 where snum=39。 amp。 Trim() amp。 39。 = sql = myconn () () () MsgBox(更新性別成功 ) = False = False = False Else = True Dim sql As String = update stu_info set sex=39。 amp。 男 amp。 39。 where snum=39。 amp。 Trim() amp。 39。 = sql = myconn () () () MsgBox(更新性別成功 ) = False = False = False End If End Sub 39。修改專業(yè) Private Sub Button5_Click(ByVal sender As , ByVal e As ) Handles Dim myd As New SqlCommand If = Then MsgBox(專業(yè)為空 , , 提示 ) End If If = False Then MsgBox(專業(yè)無任何改變 , , 提示 ) Else Dim sql As String = update stu_info set spe=39。 amp。 Trim() amp。 39。 where snum=39。 amp。 Trim() amp。 39。 = sql = myconn () () () MsgBox(更新專業(yè)成功 ) = False = False = False End If End Sub 39。修改聯(lián)系方式 Private Sub Button6_Click(ByVal sender As , ByVal e As ) Handles Dim myd As New SqlCommand If = Then MsgBox(聯(lián)系方式為空 , , 提示 ) End If If = False Then MsgBox(聯(lián)系方式為變化 , , 提示 ) Else Dim sql As String = update stu_info set phone=39。 amp。 Trim() amp。 39。 where snum=39。 amp。 Trim() amp。 39。 = sql = myconn () () () MsgBox(更新成功 ) = False = False = False End If End Sub 39。修改密碼 Private Sub Button4_Click(ByVal sender As , ByVal e As ) Handles () () End Sub 4. Cpasswd【密碼修改】:主要功能是學生用戶和教師用戶的密碼修改。 39。再來一次,先清空 Private Sub Button2_Click(ByVal sender As , ByVal e As ) Handles = = = = True End Sub 39。修改密碼 Private Sub Button1_Click(ByVal sender As , ByVal e As ) Handles If = Then MsgBox(請輸入原密碼 , , 警告 ) Else If passwd Trim() Then MsgBox(原密碼錯誤 , , 警告 ) = = = () Else If = Then MsgBox(請輸入新密碼 , , 警告 ) Else If 16 Or 6 Then MsgBox(密碼長度不對 , , 警告 ) = = () Else If = Then MsgBox(請再輸入一次新密碼 , , 警告 ) Else If Trim() Trim() Then MsgBox(兩次輸入的密碼不一致 , , 警告 ) Else Dim myd As New SqlCommand Dim sql As String = update login set passwd=39。 + Trim() + 39。where snum=39。 + Username + 39。 = myconn = sql () () () MsgBox(修改密碼成功 ) = False () = = = End If End If End If End If End If End If End Sub 39。根據(jù)用戶登陸時記錄的用戶名來判斷返回學生用戶窗口還是教師用戶窗口 Private Sub Button3_Click(ByVal sender As , ByVal e As ) Handles () If Username = 000000 Or Username = 111111 Or Username = 222222 Then () () Else () End If End Su 5