文件名称:人事管理系统(用vb2008做的)
文件大小:3.86MB
文件格式:RAR
更新时间:2012-12-10 07:10:02
vb2008做的
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Then MsgBox("用户名或密码输入错误!") Else Dim dblink As New SqlCeConnection("Data Source=|DataDirectory|\人事管理系统.sdf") Dim selectstring As String selectstring = "SELECT password FROM 管理员 WHERE (usename = '" + TextBox1.Text + "')" dblink.Open() Dim sql As New SqlCeCommand(selectstring, dblink) If sql.ExecuteScalar Is Nothing Then Me.Hide() Me.Text = TextBox1.Text TextBox2.Text = "" MsgBox("欢迎你" + Me.Text + "登录") 用户登录类型.Show() ElseIf TextBox2.Text = sql.ExecuteScalar Then Me.Hide() Me.Text = TextBox1.Text TextBox2.Text = "" MsgBox("欢迎你" + Me.Text + "登录") 用户登录类型.Show() Else MsgBox("你输入的账号或密码错误") TextBox2.Text = "" End If dblink.Close() End If