毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

VB人事管理系统论文+数据流程图+ER图+功能模块图 第6页

更新时间:2009-3-29:  来源:毕业论文

VB人事管理系统论文+数据流程图+ER图+功能模块图 第6页
 编码实现与测试结果
6.1登录界面及代码
 
图6.1登录界面

代码如下:
Option Explicit
Const MxUser = 100
Public EmploID As Integer
Public CurUser As String
Public CurId As String
Public CurPsw As String
Dim user(MxUser), pws(MxUser), state(MxUser), Emplo(MxUser) As String
Private Sub cmdOK_Click()
If txtPassword = pws(Combo1.ListIndex) Then
        CurId = Combo1.ListIndex
        EmploID = Emplo(CurId)
        CurUser = user(CurId)
        CurPsw = pws(CurId)
        Me.Hide
       FrmMain.Show
   Else
        MsgBox "密码错误请重新输入密码!", , "Login"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub
Private Sub Command2_Click()
Unload Me
    End
End Sub
Private Sub Form_Load()
Dim i As Integer
    
      If App.PrevInstance Then
         MsgBox ("程序已经运行,不能再次装载。"), vbExclamation
         Unload Me
      End If
      i = 0
Open App.Path + "\user.ini" For Input As #1
     Do While Not EOF(1)
             Input #1, user(i), pws(i), state(i), Emplo(i)
                 If state(i) = "A" Then
                Combo1.AddItem user(i)
            End If
                i = i + 1
        Loop
            Close #1
            Combo1.ListIndex = 1
End Sub
进入系统主界面:
 
图6.2系统主界面
代码如下:
Private Sub bumen_Click(Index As Integer)
DataReport2.Show
End Sub
Private Sub gongzi_Click(Index As Integer)
DataReport1.Show
End Sub
Private Sub jiaoshi_Click(Index As Integer)
DataReport4.Show
End Sub
Private Sub MAbout_Click()
frmAbout.Show
End Sub
Private Sub Mhelp_Click()
FrmHelp.Show
End Sub
Private Sub Moption_Click(Index As Integer)
 If Index = 0 Then
          FrmPsw.Show
         Else
        End
         End If
End Sub
Private Sub Mtab_Click(Index As Integer)
 Select Case Index
751com.cn
          'FrmMain.Hide
         frmzhiwu.Show
    End Select
End Sub
Private Sub zhiwu_Click(Index As Integer)
DataReport3.Show
End Sub
选择密码修改:
 
图6.3密码修改界面
代码如下:
Option Explicit
Const MxUser = 100
Dim user(MxUser), pws(MxUser), state(MxUser), Emplo(MxUser) As String
Private Sub cmdCancel_Click()
Me.Hide
End Sub
Private Sub cmdOK_Click()
Dim fil, i, Usercount As Integer
If TxtNew1.Text <> TxtNew2.Text Then
    MsgBox "two times no yizhi"
        TxtNew1.SetFocus
        TxtNew2.Text = ""
        SendKeys "{Home}+{End}"
        Exit Sub
    ElseIf Txtold.Text <> FrmLogin.CurPsw Then
       MsgBox "old password wrong"
        Txtold.SetFocus
        TxtNew1.Text = ""
        TxtNew2.Text = ""
        SendKeys "{Home}+{End}"
        Exit Sub
 Else
                 fil = FreeFile()
        Open App.Path + "\user.ini" For Input As #fil
           i = 0
         Do While Not EOF(fil)
              Input #fil, user(i), pws(i)
              Input #fil, state(i), Emplo(i)
                       i = i + 1
           Loop
            Usercount = i
                            Close #fil
        
        pws(FrmLogin.CurId) = TxtNew1.Text
        FrmLogin.CurPsw = TxtNew1.Text
       fil = FreeFile()
        Open App.Path + "\user.ini" For Output As #fil
        For i = 0 To Usercount - 1
             Print #fil, user(i); ","; pws(i); ","; state(i); ","; Emplo(i)
              Next i
             Close #fil
        Txtold.Text = ""
        TxtNew1.Text = ""
        TxtNew2.Text = ""
       Me.Hide
        End If
End Sub
Private Sub Form_LostFocus()
 FrmPsw.SetFocus
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
End Sub

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页

VB人事管理系统论文+数据流程图+ER图+功能模块图 第6页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。