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

📄 +-+

📁 VB财务软件系统下载源代码提供自由下载使用学习
💻
📖 第 1 页 / 共 4 页
字号:
   End With
   
End Sub

Private Sub DoUnload(blnLoad As Boolean)
   DoUnloadInfo.blnRkhdt = blnLoad
End Sub

Private Sub MakeZero(iGrade As Long)
   preDayYe(iGrade) = 0
   toDaySr(iGrade) = 0
   toDayZc(iGrade) = 0
   toDayYe(iGrade) = 0
   toDayBsr(iGrade) = 0
   toDayBzc(iGrade) = 0
   
End Sub

'********************************************************************
'*函数说明: 初始化  Grid                                             *
'*参    数:                                                          *
'*                                                                   *
'*返回值  :                                                          *
'*********************************************************************
Public Sub initGrid()
   Dim i As Integer
   Dim rsHead As New UfRecordset, sqlHead As String
   sqlHead = "SELECT * FROM FD_Item WHERE iitems_id = 4"
   Set rsHead = dbsZJ.OpenRecordset(sqlHead, dbOpenSnapshot)
   If Not rsHead.EOF Then Label4 = rsHead!citems_name
   lblTime = Year(dSearchDate) & "年 " & Month(dSearchDate) & "月 " & Day(dSearchDate) & "日"
   
   With Me.UfGridADO1
      ' 设置表头
      .Rows = 0
      DoEvents
      .Redraw = True
      .LargeVirtualGrid = True
      .Cols = 13
      .Rows = 2
      .FixedCols = 0
      .FixedRows = 2
      
      .TextMatrix(0, 0) = "客户名称"
      .TextMatrix(1, 0) = "客户名称"
      .JoinCells 0, 0, 1, 0, True
      
      .TextMatrix(0, 1) = "币别"
      .TextMatrix(1, 1) = "币别"
      .JoinCells 0, 1, 1, 1, True
      
      .TextMatrix(0, 2) = "汇率"
      .TextMatrix(1, 2) = "汇率"
      .JoinCells 0, 2, 1, 2, True
      
      .TextMatrix(0, 3) = "上日余额"
      .TextMatrix(1, 3) = "上日余额"
      .JoinCells 0, 3, 1, 3, True
      
      .TextMatrix(0, 4) = "上日余额(本位币)"
      .TextMatrix(1, 4) = "上日余额(本位币)"
      .JoinCells 0, 4, 1, 4, True
      
      .TextMatrix(0, 5) = "本日收入额"
      .TextMatrix(1, 5) = "本日收入额"
      .JoinCells 0, 5, 1, 5, True
      
      .TextMatrix(0, 6) = "本日收入额(本位币)"
      .TextMatrix(1, 6) = "本日收入额(本位币)"
      .JoinCells 0, 6, 1, 6, True
      
      .TextMatrix(0, 7) = "笔数"
      .TextMatrix(1, 7) = "笔数"
      .JoinCells 0, 7, 1, 7, True
      
      .TextMatrix(0, 8) = "本日支出额"
      .TextMatrix(1, 8) = "本日支出额"
      .JoinCells 0, 8, 1, 8, True
      
      .TextMatrix(0, 9) = "本日支出额(本位币)"
      .TextMatrix(1, 9) = "本日支出额(本位币)"
      .JoinCells 0, 9, 1, 9, True
      
      .TextMatrix(0, 10) = "笔数"
      .TextMatrix(1, 10) = "笔数"
      .JoinCells 0, 10, 1, 10, True
      
      .TextMatrix(0, 11) = "本日余额"
      .TextMatrix(1, 11) = "本日余额"
      .JoinCells 0, 11, 1, 11, True
      
      .TextMatrix(0, 12) = "本日余额(本位币)"
      .TextMatrix(1, 12) = "本日余额(本位币)"
      .JoinCells 0, 12, 1, 12, True
              
      ' 设置宽度
      For i = 0 To 12
          Select Case i
              Case 0
                  .ColWidth(i) = 1800
              Case 1, 2
                  .ColWidth(i) = 700
              Case 3, 4, 5, 6, 8, 9, 11, 12
                  .ColWidth(i) = 2000
              Case 7, 10
                  .ColWidth(i) = 330
          End Select
      Next i
   
      '设置表体的Alignment
      For i = 0 To 12
          Select Case i
              Case 0
                  .ColAlignment(i) = UG_ALIGNLEFT
              Case 1, 2, 7, 10
                  .ColAlignment(i) = UG_ALIGNCENTER
              Case Else
                  .ColAlignment(i) = UG_ALIGNRIGHT
          End Select
      Next i
      
      .HeadFont.Name = "宋体"
      .HeadFont.Size = 9
      .HeadBackColor = &H8000000E
      .HeadFont.Bold = True
   End With
   Set frmRptItem.mCollectColWidth = New Collection
   For i = 0 To 12
      frmRptItem.mCollectColWidth.Add UfGridADO1.ColWidth(i), CStr(i)
   Next i
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
   Cancel = DoUnloadInfo.blnRkhdt
End Sub

Private Sub Form_Resize()
   On Error Resume Next
   If Me.WindowState <> 1 Then
      If Me.Width < frmMinWidth Then Me.Width = frmMinWidth
      If Me.Height < frmMinWidth Then Me.Height = frmMinWidth
      Picture1.Left = Me.Width - Picture1.Width
      Label4.Left = Me.Width / 2 - Label4.Width / 2 + (Picture1.Width - Me.Width)
      lblTime.Left = Me.Width - lblTime.Width - 200 + (Picture1.Width - Me.Width)
      UfGridADO1.Width = Me.Width - 100
      UfGridADO1.Height = Me.Height - Toolbar1.Height - Picture1.Height - 400 - IIf(StatusBar1.Visible, StatusBar1.Height, 0)
      UfGridADO1.Top = Toolbar1.Height + Picture1.Height
      UfGridADO1.Left = 0
      ProBar1.Left = 4860
      ProBar1.Top = Me.Height - 640
   End If
   On Error GoTo 0
End Sub

Private Sub Form_Unload(Cancel As Integer)
   Dim i As Long
   For i = 1 To 4
      preDayYe(i) = 0
      toDayYe(i) = 0
      toDaySr(i) = 0
      toDayZc(i) = 0
      toDayBsr(i) = 0
      toDayBzc(i) = 0
   Next i
   Set frmRptItem = Nothing
    zjLogInfo.TaskExec "FD0704", 0, zjLogInfo.cIYear
    zjLogInfo.ClearError
    zjGen_arr.FD0704 = False
End Sub

Private Sub Recx()
   With frmReportXz
      .Quitfs = False
      .strReportType = "Khdt"
      .Show vbModal
   End With
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
   Gen_Key Button.key

End Sub

Private Sub InitDataOut()
   ReDim prnReport1(13)
   
   prnReport1(0).iColNumber = 0
   prnReport1(0).iColType = dbText
   prnReport1(0).cColName = UfGridADO1.TextMatrix(0, 0)
   prnReport1(0).iColLength = lngText
   
   prnReport1(1).iColNumber = 1
   prnReport1(1).iColType = dbText
   prnReport1(1).cColName = UfGridADO1.TextMatrix(0, 1)
   prnReport1(1).iColLength = lngText
   
   prnReport1(2).iColNumber = 2
   prnReport1(2).iColType = dbCurrency
   prnReport1(2).cColName = UfGridADO1.TextMatrix(0, 2)
   prnReport1(2).iColLength = lngCurrency
   
   prnReport1(3).iColNumber = 3
   prnReport1(3).iColType = dbCurrency
   prnReport1(3).cColName = UfGridADO1.TextMatrix(0, 3)
   prnReport1(3).iColLength = lngCurrency
   
   prnReport1(4).iColNumber = 4
   prnReport1(4).iColType = dbCurrency
   prnReport1(4).cColName = UfGridADO1.TextMatrix(0, 4)
   prnReport1(4).iColLength = lngCurrency
   
   prnReport1(5).iColNumber = 5
   prnReport1(5).iColType = dbCurrency
   prnReport1(5).cColName = UfGridADO1.TextMatrix(0, 5)
   prnReport1(5).iColLength = lngCurrency
   
   prnReport1(6).iColNumber = 6
   prnReport1(6).iColType = dbCurrency
   prnReport1(6).cColName = UfGridADO1.TextMatrix(0, 6)
   prnReport1(6).iColLength = lngCurrency
   
   prnReport1(7).iColNumber = 7
   prnReport1(7).iColType = dbLong
   prnReport1(7).cColName = UfGridADO1.TextMatrix(0, 7)
   prnReport1(7).iColLength = lngText
   
   prnReport1(8).iColNumber = 8
   prnReport1(8).iColType = dbCurrency
   prnReport1(8).cColName = UfGridADO1.TextMatrix(0, 8)
   prnReport1(8).iColLength = lngCurrency
   
   prnReport1(9).iColNumber = 9
   prnReport1(9).iColType = dbCurrency
   prnReport1(9).cColName = UfGridADO1.TextMatrix(0, 9)
   prnReport1(9).iColLength = lngCurrency
   
   prnReport1(10).iColNumber = 10
   prnReport1(10).iColType = dbLong
   prnReport1(10).cColName = UfGridADO1.TextMatrix(0, 10)
   prnReport1(10).iColLength = lngText
   
   prnReport1(11).iColNumber = 11
   prnReport1(11).iColType = dbCurrency
   prnReport1(11).cColName = UfGridADO1.TextMatrix(0, 11)
   prnReport1(11).iColLength = lngCurrency
   
   prnReport1(12).iColNumber = 12
   prnReport1(12).iColType = dbCurrency
   prnReport1(12).cColName = UfGridADO1.TextMatrix(0, 12)
   prnReport1(12).iColLength = lngCurrency
End Sub

Private Sub Gen_Key(TLB_Key As String)
    '----设置互斥
    If m_bExclude = True Then Exit Sub
   
   Select Case TLB_Key
        Case Is = "Print", "Preview", "Dataout"
            If TLB_Key = "Dataout" Then InitDataOut
            zjbPrnViewOut Me, "khdtb", TLB_Key, True, Label4.Caption, "", "", lblTime.Caption
      Case "Recx"
         Recx
      Case "Item"
         With frmRptItem
            Set .mGrid = Me.UfGridADO1
            .mStartCol = 1
            .mEndCol = 12
            .Show vbModal
         End With
      Case "Help"
         SendKeys "{F1}"
      Case "Exit"
         Unload Me
   End Select

End Sub

⌨️ 快捷键说明

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