企业人事管理信息系统

时间:2012-07-08 02:02:45
【文件属性】:

文件名称:企业人事管理信息系统

文件大小:701KB

文件格式:RAR

更新时间:2012-07-08 02:02:45

企业

SQL+VB做成的licit Public gUserName As String Public gUserKind As String Public gEmployeeId As String Public gLoginSucceeded As Boolean Public Const BLUE = &HFF0000 Public Const WHITE = &H80000005 Sub Main() Dim fLogin As New frmLogin '启动登录窗体 fLogin.Show vbModal '装入并显示模式窗体。 If Not gLoginSucceeded Then MsgBox "系统启动失败,请重试!", vbOKOnly + vbExclamation, "警告" End If Unload fLogin End Sub Public Function ConnectString() As String ConnectString = "Provider=SQLOLEDB.1;Password=sa;User ID=sa;Initial Catalog=DBManPower;Data Source=127.0.0.1;" End Function Public Function ExecuteSQL(ByVal SQL As String, rst As ADODB.Recordset, _ Optional enableWrite As Boolean = True) As Boolean Dim con As ADODB.Connection Dim sTokens() As String On Error GoTo Execute_Error sTokens = Split(SQL) Set con = New ADODB.Connection con.Open ConnectString '打开数据库 Set rst = New ADODB.Recordset If enableWrite Then '读写方式 rst.Open Trim$(SQL), con, adOpenStatic, adLockOptimistic Else '只读方式 rst.Open Trim$(SQL), con, adOpenStatic, adLockReadOnly End If ExecuteSQL = True Exit Function Execute_Error: ExecuteSQL = False Exit Function End Function Public Function DBExist(ByVal SQL As String) As Integer Dim con As ADODB.Connection Dim sTokens() As String Dim flag As String Dim rst As ADODB.Recordset sTokens = Split(SQL) Set con = New ADODB.Connection con.Open ConnectString flag = ExecuteSQL(SQL, rst, False) '判断该记录是否存在 If rst.RecordCount <> 0 Then DBExist = rst.RecordCount Else DBExist = 0 End If con.Close End Function Public Function txtIsNull(txt As TextBox) As Boolean If Trim(txt.Text) = "" Then txtIsNull = True txt.SetFocus txt.BackColor = BLUE Else txtIsNull = False End If


【文件预览】:
覃月林 0604402126
----database()
--------DBManPower_log.LDF(504KB)
--------DBManPower.mdf(1.13MB)
----form()
--------VBB04.tmp(2KB)
--------VB8A8.tmp(44KB)
--------Form1.frm(11KB)
--------Module1pPeople.bas(434B)
--------QQ.frm(45KB)
--------frmPassord.frm(4KB)
--------VB7FE.tmp(2KB)
--------工程1.vbp(2KB)
--------MSSCCPRJ.SCC(190B)
--------Form2.frm(5KB)
--------frmDep.frx(11KB)
--------VB202.tmp(2KB)
--------yun.frm(15KB)
--------DataReport1.Dsr(16KB)
--------DataReport1.dsx(31B)
--------VB8B0.tmp(44KB)
--------frmValue.frm(21KB)
--------Module1.bas(41B)
--------Const.bas(178B)
--------VB205.tmp(44KB)
--------frmOptions.frm(17KB)
--------DataReport1.DCA(48KB)
--------Module1people.bas(3KB)
--------DataEnvironment1.dsx(446B)
--------frmFamily.frm(14KB)
--------frmWorkRecord.frm(13KB)
--------工程1.vbw(758B)
--------frmDep.frm(11KB)
--------Form2.frx(523KB)
--------frmLogin.frm(4KB)
--------DbFunc.bas(1KB)
--------DataEnvironment1.Dsr(8KB)
--------VB7FB.tmp(44KB)
--------DataEnvironment1.DCA(7KB)

网友评论