⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eduinfoform.vb

📁 管理毕业设计的管理系统 VB+SQL2000....
💻 VB
字号:
Public Class EduInfoForm

    Private Sub UpdateInfo(ByVal table As DataTable, ByVal index As Integer)
        TextUser.Text = table.Rows(index)("euser")
        TextName.Text = table.Rows(index)("ename")
        TextEmail.Text = table.Rows(index)("eemail")
        Dim strDuty As String = table.Rows(index)("eduty")
        If strDuty.Substring(0, 1) = "1" Then
            CheckBox1.Checked = True
        End If
        If strDuty.Substring(1, 1) = "1" Then
            CheckBox2.Checked = True
        End If
        If strDuty.Substring(2, 1) = "1" Then
            CheckBox3.Checked = True
        End If
    End Sub

    Private Sub EduInfoForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim strUser As String = LoginForm.TextUser.Text
        Dim strSQL As String = "select * from edu where euser='" + strUser + "'"
        Dim UserTable As DataTable = DBOperation.Search(strSQL)

        UpdateInfo(UserTable, 0)
    End Sub

    Private Sub ButtonOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonOK.Click
        '
        '请加入判断输入的规范!!!!!!
        '
        Dim strSQL As String = "update edu set eemail='" + Trim(TextEmail.Text) + "' where euser='" + TextUser.Text + "'"
        '更新个人信息
        If DBOperation.Update(strSQL) Then
            MsgBox("更新用户信息成功!", MsgBoxStyle.OkOnly, "更新用户")
        Else
            MsgBox("更新用户信息失败!", MsgBoxStyle.Exclamation, "更新用户")
        End If
        Me.Close()
    End Sub

    Private Sub ButtonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCancel.Click
        Me.Close()
    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -