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

📄 frmsalarybillwizard.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 4 页
字号:
         Top             =   2205
         UseMaskColor    =   -1  'True
         Width           =   415
      End
      Begin VB.CommandButton cmdCheck 
         Caption         =   ">>"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Index           =   1
         Left            =   -71310
         TabIndex        =   8
         TabStop         =   0   'False
         Top             =   1800
         UseMaskColor    =   -1  'True
         Width           =   415
      End
      Begin VB.CommandButton cmdCheck 
         Caption         =   ">"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Index           =   0
         Left            =   -71310
         TabIndex        =   7
         TabStop         =   0   'False
         Top             =   1410
         UseMaskColor    =   -1  'True
         Width           =   415
      End
      Begin VB.CommandButton cmdUpDown 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Index           =   0
         Left            =   -68760
         Style           =   1  'Graphical
         TabIndex        =   13
         TabStop         =   0   'False
         Top             =   1590
         UseMaskColor    =   -1  'True
         Width           =   240
      End
      Begin VB.CommandButton cmdUpDown 
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Index           =   1
         Left            =   -68760
         Style           =   1  'Graphical
         TabIndex        =   14
         TabStop         =   0   'False
         Top             =   2070
         UseMaskColor    =   -1  'True
         Width           =   240
      End
      Begin VB.TextBox txtReportName 
         Height          =   315
         Left            =   2970
         TabIndex        =   2
         Text            =   "工资条"
         Top             =   1230
         Width           =   2985
      End
      Begin VB.Frame Frame1 
         Caption         =   "可选项目"
         Height          =   3435
         Index           =   2
         Left            =   -74910
         TabIndex        =   15
         Top             =   390
         Width           =   2475
         Begin MSComctlLib.TreeView tvwFilter 
            Height          =   3165
            Left            =   60
            TabIndex        =   16
            Top             =   210
            Width           =   2340
            _ExtentX        =   4128
            _ExtentY        =   5583
            _Version        =   393217
            HideSelection   =   0   'False
            Indentation     =   529
            LineStyle       =   1
            Style           =   7
            FullRowSelect   =   -1  'True
            BorderStyle     =   1
            Appearance      =   1
         End
      End
      Begin VB.Frame Frame2 
         Caption         =   "已选条件(&H)"
         Height          =   2025
         Left            =   -72330
         TabIndex        =   33
         Top             =   1800
         Width           =   3795
         Begin MSFlexGridLib.MSFlexGrid MsgFilter 
            Height          =   1755
            Left            =   60
            TabIndex        =   34
            Top             =   210
            Width           =   3675
            _ExtentX        =   6482
            _ExtentY        =   3096
            _Version        =   393216
            FixedCols       =   0
            FocusRect       =   0
            ScrollBars      =   2
            SelectionMode   =   1
         End
      End
      Begin ListRefer.ListText litSalarySource 
         Height          =   315
         Left            =   2970
         TabIndex        =   4
         Top             =   2025
         Width           =   2985
         _ExtentX        =   5265
         _ExtentY        =   556
         Locked          =   -1  'True
         BackColor       =   -2147483643
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin MSFlexGridLib.MSFlexGrid msgSalaryItem 
         Height          =   3165
         Index           =   0
         Left            =   -73410
         TabIndex        =   6
         Top             =   630
         Width           =   1995
         _ExtentX        =   3519
         _ExtentY        =   5583
         _Version        =   393216
         Rows            =   1
         Cols            =   3
         FixedRows       =   0
         FixedCols       =   0
         BackColorFixed  =   -2147483643
         ForeColorFixed  =   -2147483641
         BackColorBkg    =   -2147483643
         GridColorFixed  =   16777215
         FocusRect       =   0
         GridLines       =   0
         GridLinesFixed  =   0
         ScrollBars      =   2
         SelectionMode   =   1
         Appearance      =   0
      End
      Begin MSFlexGridLib.MSFlexGrid msgSalaryItem 
         Height          =   3165
         Index           =   1
         Left            =   -70800
         TabIndex        =   12
         Top             =   630
         Width           =   1995
         _ExtentX        =   3519
         _ExtentY        =   5583
         _Version        =   393216
         Rows            =   1
         Cols            =   3
         FixedRows       =   0
         FixedCols       =   0
         BackColorFixed  =   -2147483643
         ForeColorFixed  =   -2147483641
         BackColorBkg    =   -2147483643
         GridColorFixed  =   16777215
         FocusRect       =   0
         GridLines       =   0
         ScrollBars      =   2
         SelectionMode   =   1
         Appearance      =   0
      End
      Begin VB.Label LblData 
         Caption         =   "数据项目(&D)"
         Height          =   225
         Left            =   -73350
         TabIndex        =   5
         Top             =   420
         Width           =   1035
      End
      Begin VB.Label LblReport 
         Caption         =   "报表项目(&R)"
         Height          =   225
         Index           =   0
         Left            =   -70830
         TabIndex        =   11
         Top             =   420
         Width           =   1575
      End
      Begin VB.Image imgSalarySet 
         BorderStyle     =   1  'Fixed Single
         Height          =   3375
         Index           =   0
         Left            =   90
         Stretch         =   -1  'True
         Top             =   420
         Width           =   1380
      End
      Begin VB.Image imgSalarySet 
         BorderStyle     =   1  'Fixed Single
         Height          =   3375
         Index           =   1
         Left            =   -74910
         Stretch         =   -1  'True
         Top             =   420
         Width           =   1395
      End
      Begin VB.Label lblMonneySet 
         BackStyle       =   0  'Transparent
         Caption         =   "来源工资表(&G)"
         Height          =   195
         Index           =   1
         Left            =   1770
         TabIndex        =   3
         Top             =   2100
         Width           =   1215
      End
      Begin VB.Label lblMonneySet 
         BackStyle       =   0  'Transparent
         Caption         =   "报表名称(&N)"
         Height          =   195
         Index           =   2
         Left            =   1770
         TabIndex        =   1
         Top             =   1290
         Width           =   1215
      End
   End
End
Attribute VB_Name = "frmSalaryBillWizard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'  工资条设置向导
'  作者: 邹俊
'  日期 : 1998. 11. 12

Option Explicit
Private WithEvents mclsMainControl As MainControl   '主控对象
Attribute mclsMainControl.VB_VarHelpID = -1
Private mclsFilter As FormCond            '查询条件类
Private WithEvents mclsHook As Hook       '响应msgFilter中vbUp 和vbDown
Attribute mclsHook.VB_VarHelpID = -1
Private Const mlngSalaryReportID = 1464   '工资条报表ID
Private Const mlngSalaryViewID = 63       '工资视图ID
Private Const mlngFilterViewID = 72       '工资条筛选视图ID
Private mlngSalarylistID As Long          '工资表ID
Private mstrReportName As String    '报表名称
Private mstrReportWhere As String   '报表条件
Private mstrReportSQL As String     '报表SQL
Private mblnIsOK As Boolean         '是否为完成退出
Private mblnIsSame As Boolean       '工资表ID是否发生改变

'调用工资条报表初始化
Public Function InitSalaryBill(ByRef clsSalary As clsSalaryRptSet, ByVal lngSalaryListID As Long, Optional ByVal blnIsShow As Boolean = False) As Boolean
    mlngSalarylistID = lngSalaryListID
    Load Me
    If blnIsShow Then
        Me.Show vbModal
    Else
        If lngSalaryListID = 0 Then
            Me.Show vbModal
        Else
            mstrReportSQL = "工资条"
            mstrReportSQL = clsSalary.InitSalaryBillSql(lngSalaryListID)
            mlngSalarylistID = lngSalaryListID
            mstrReportWhere = ""
            mblnIsOK = True
        End If
    End If
    clsSalary.SalaryBillName = mstrReportName
    clsSalary.SalaryBillWhere = mstrReportWhere
    clsSalary.SalaryBillID = mlngSalarylistID
    clsSalary.SalaryBillSQL = mstrReportSQL
    InitSalaryBill = mblnIsOK
    Unload Me
End Function

Private Sub cmdOK_Click()
    Dim lngArrID() As Long
    
    '检查报表名称
    If Trim(txtReportName.Text) = "" Then
        SSTab1.Tab = 0
        ShowMsg Me.hwnd, "报表名称不能为空。", vbInformation, Me.Caption
        txtReportName.SetFocus
        Exit Sub
    End If
    '检查来源工资表
    If Trim(litSalarySource.Text) = "" Then
        SSTab1.Tab = 0
        ShowMsg Me.hwnd, "来源工资表不能为空。", vbInformation, Me.Caption
        Exit Sub
    End If
    '检查报表项目
    If msgSalaryItem(1).Rows <= 2 Then
        SSTab1.Tab = 1
        ShowMsg Me.hwnd, "至少应有一个数据项目。", vbInformation, Me.Caption
        Exit Sub
    End If
    '保存报表项目
    SaveReportItem mlngSalarylistID
    '取得报表名称
    mstrReportName = Trim(txtReportName.Text)
    '取得筛选条件
    If mclsFilter Is Nothing Then
        mstrReportWhere = ""
    Else
        mstrReportWhere = mclsFilter.GetCond
    End If
    '组合查询项目条件的SQL语句
    mstrReportSQL = SetItemSQL()
    Unload Me
End Sub

'组合查询项目条件的SQL语句
Private Function SetItemSQL() As String
    Dim strSelect As String
    Dim i As Long
    Dim strTmp As String
    Dim strFrom As String
    Dim strWhere As String
    Dim strFormat As String
    Dim intTmp As Integer
    
    strSelect = "SELECT "
    With msgSalaryItem(1)
        For i = 0 To .Rows - 1
            If UCase(.TextMatrix(i, 3)) = "DOUBLE" Then
                If Val(.TextMatrix(i, 4)) > 0 Then
                    intTmp = Val(.TextMatrix(i, 4))
                    strFormat = "'999999999999999999999999990." & String(intTmp, "0") & "'"
                Else

⌨️ 快捷键说明

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