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

📄 gzgl.bas

📁 银行代发薪资管理系统,跟金融有关的,想学这方面可以参考一下
💻 BAS
字号:
Attribute VB_Name = "gzglbas"
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpoperation As String, _
ByVal lpfile As String, ByVal lpparameters As String, ByVal lpdirectory As String, ByVal nshowcmd As Long) As Long
Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpbuffer As String, _
ByVal nsize As Long) As Long

Public bds As String '表达式
Public yn As Integer 'YES NO标记
Public yhdw As String '用户单位
Public syr As String '使用人
Public syrmm As String
Public dwdh As String '单位代号
Public ye As String * 4 '库的年份
Public mon As String * 2 '库的月份
Public ri As String * 2
Public Mima As Long '报盘密码
Public LoginSucceeded As Boolean

Public xtlj As String '系统路径
Public dqklj As String '当前库路径
Public dbdk As Boolean '月库打开标记
Public ws As Workspace
Public db As Database
Public tb1 As Recordset
Public tb2 As Recordset
Public tb3 As Recordset
Public wws As Workspace
Public wdb As Database
Public wtb1 As Recordset

Public SQL As String
Public THZ As Currency '返回值(货币型)
Public THZD As String '返回字段名
Public FHBJ As Boolean '返回标记
Public THTJ As String
Public i As Long '计数器
Public file1 As String
Public file2 As String
Public xlh As Long
Public SC As Long
Public xlhbj As Boolean
Public GH As String * 5
Public sdbj As Boolean

Public Function getwindowsdir() As String
Dim strbuf As String
strbuf = Space(80)
If GetWindowsDirectory(strbuf, 80) > 0 Then
    getwindowsdir = UCase$(strbuf)
End If
End Function

Sub Main()
Dim lj As String
Dim ye As Integer
Dim ma As Integer
xtlj = App.Path + "\"
Debug.Print Date
Set wws = DBEngine.Workspaces(0)
Set ws = DBEngine.Workspaces(0)
Set wdb = wws.OpenDatabase(xtlj + "dwxx.mdb")
Set wtb1 = wdb.OpenRecordset("注册标记", dbOpenTable)
wtb1.MoveFirst
If wtb1("注册标记") = False Then
    yn = MsgBox("系统必须注册才能运行,请运行注册程序!", 48)
Else
    xlhbj = True
    winlj = getwindowsdir()
    winlj = Left(Trim$(winlj), Len(Trim$(winlj)) - 1) & "\WINGZZC.DLL"
    Open winlj For Random As #1 Len = 10
    Get #1, 1, SC
    Get #1, 2, xlh
    ye = Val(Left(Str(SC), 5))
    ma = Val(Right(Left(Str(SC), 7), 2))
    If (ye = Year(Date) And Month(Date) - ma <= 3) Or (ye = Year(Date) - 1 And 12 - ma + Month(Date) <= 3) Then
        GoTo OK:
    Else
        If xlh <> Int(SC / 21223 * 2091708) Then
            xlhbj = False
            Frm正版.Show 1
        Else
            GoTo OK:
        End If
    End If
OK: If xlhbj = True Then
        Close #1
        Set wtb1 = wdb.OpenRecordset("dwxx", dbOpenTable)
        wtb1.MoveFirst
        yhdw = wtb1("单位名称")
        syr = wtb1("系统使用人")
        syrmm = wtb1("使用人密码")
        dwdh = wtb1("单位代号")
        Load frmSplash
        Load frmMAIN
        Load frmLogin
        frmMAIN.Show
        frmSplash.Show
    End If
End If
wdb.Close
dbdk = False
End Sub

Public Sub TEXTF(CTL As Control)
CTL.SelStart = 0
CTL.SelLength = Len(CTL.Text)
End Sub

⌨️ 快捷键说明

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