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

📄 frmrecordset.frm

📁 由VB编写的一个实用短信计费系统。主要模块包括(1)计费管理子系统:用户入费;错单处理;用户费率管理;费率管理;用户分析(2)系统维护子系统:管理员登录、管理员管理、数据库设置等(3)计费引擎子系统
💻 FRM
字号:
VERSION 5.00
Object = "{C5DE3F80-3376-11D2-BAA4-04F205C10000}#1.0#0"; "Vsflex6d.ocx"
Begin VB.Form frmRecordset 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "入费记录"
   ClientHeight    =   7320
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   11430
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   9
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmRecordset.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   7320
   ScaleWidth      =   11430
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdQuit 
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   8865
      TabIndex        =   2
      Top             =   6840
      Width           =   1140
   End
   Begin VSFlex6DAOCtl.vsFlexGrid OGridbrowser 
      Height          =   2985
      Left            =   113
      TabIndex        =   3
      Top             =   3690
      Width           =   11205
      _ExtentX        =   19764
      _ExtentY        =   5265
      _ConvInfo       =   1
      Appearance      =   1
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      MousePointer    =   0
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      BackColorFixed  =   -2147483633
      ForeColorFixed  =   -2147483630
      BackColorSel    =   -2147483635
      ForeColorSel    =   -2147483634
      BackColorBkg    =   8421504
      BackColorAlternate=   -2147483643
      GridColor       =   -2147483633
      GridColorFixed  =   -2147483632
      TreeColor       =   -2147483632
      FloodColor      =   192
      SheetBorder     =   -2147483642
      FocusRect       =   1
      HighLight       =   1
      AllowSelection  =   -1  'True
      AllowBigSelection=   -1  'True
      AllowUserResizing=   0
      SelectionMode   =   1
      GridLines       =   1
      GridLinesFixed  =   2
      GridLineWidth   =   1
      Rows            =   5000
      Cols            =   10
      FixedRows       =   1
      FixedCols       =   0
      RowHeightMin    =   0
      RowHeightMax    =   0
      ColWidthMin     =   0
      ColWidthMax     =   0
      ExtendLastCol   =   0   'False
      FormatString    =   ""
      ScrollTrack     =   0   'False
      ScrollBars      =   3
      ScrollTips      =   0   'False
      MergeCells      =   0
      MergeCompare    =   0
      AutoResize      =   -1  'True
      AutoSizeMode    =   0
      AutoSearch      =   0
      MultiTotals     =   -1  'True
      SubtotalPosition=   1
      OutlineBar      =   0
      OutlineCol      =   0
      Ellipsis        =   0
      ExplorerBar     =   0
      PicturesOver    =   0   'False
      FillStyle       =   0
      RightToLeft     =   0   'False
      PictureType     =   0
      TabBehavior     =   0
      OwnerDraw       =   0
      Editable        =   0   'False
      ShowComboButton =   -1  'True
      WordWrap        =   0   'False
      TextStyle       =   0
      TextStyleFixed  =   0
      OleDragMode     =   0
      OleDropMode     =   0
      DataMode        =   0
      VirtualData     =   -1  'True
   End
   Begin VSFlex6DAOCtl.vsFlexGrid CGridbrowser 
      Height          =   2985
      Left            =   135
      TabIndex        =   4
      Top             =   315
      Width           =   11205
      _ExtentX        =   19764
      _ExtentY        =   5265
      _ConvInfo       =   1
      Appearance      =   1
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      MousePointer    =   0
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      BackColorFixed  =   -2147483633
      ForeColorFixed  =   -2147483630
      BackColorSel    =   -2147483635
      ForeColorSel    =   -2147483634
      BackColorBkg    =   8421504
      BackColorAlternate=   -2147483643
      GridColor       =   -2147483633
      GridColorFixed  =   -2147483632
      TreeColor       =   -2147483632
      FloodColor      =   192
      SheetBorder     =   -2147483642
      FocusRect       =   1
      HighLight       =   1
      AllowSelection  =   -1  'True
      AllowBigSelection=   -1  'True
      AllowUserResizing=   0
      SelectionMode   =   1
      GridLines       =   1
      GridLinesFixed  =   2
      GridLineWidth   =   1
      Rows            =   5000
      Cols            =   10
      FixedRows       =   1
      FixedCols       =   0
      RowHeightMin    =   0
      RowHeightMax    =   0
      ColWidthMin     =   0
      ColWidthMax     =   0
      ExtendLastCol   =   0   'False
      FormatString    =   ""
      ScrollTrack     =   0   'False
      ScrollBars      =   3
      ScrollTips      =   0   'False
      MergeCells      =   0
      MergeCompare    =   0
      AutoResize      =   -1  'True
      AutoSizeMode    =   0
      AutoSearch      =   0
      MultiTotals     =   -1  'True
      SubtotalPosition=   1
      OutlineBar      =   0
      OutlineCol      =   0
      Ellipsis        =   0
      ExplorerBar     =   0
      PicturesOver    =   0   'False
      FillStyle       =   0
      RightToLeft     =   0   'False
      PictureType     =   0
      TabBehavior     =   0
      OwnerDraw       =   0
      Editable        =   0   'False
      ShowComboButton =   -1  'True
      WordWrap        =   0   'False
      TextStyle       =   0
      TextStyleFixed  =   0
      OleDragMode     =   0
      OleDropMode     =   0
      DataMode        =   0
      VirtualData     =   -1  'True
   End
   Begin VB.Label Label2 
      Caption         =   "原始入费单:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   135
      TabIndex        =   1
      Top             =   3420
      Width           =   1140
   End
   Begin VB.Label Label1 
      Caption         =   "确认入费单:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   240
      Left            =   135
      TabIndex        =   0
      Top             =   90
      Width           =   1095
   End
End
Attribute VB_Name = "frmRecordset"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'*    模 块 名 称 :用户入费记录
'*    功 能 描 述 :
'*    程序员姓名  :谭怀志
'*    最后修改人  :谭怀志
'*    最后修改时间:2003/6/26
'*    备        注:
'*******************************************************

Private strStatus(2) As String

Private Sub CGridbrowser_SelChange()
    
    On Error Resume Next
    
    With CGridbrowser
        If .TextMatrix(.RowSel, 0) <> "" And .RowSel > 0 Then
        
            '显示所选入费单的操作记录
            Call ORFDrefresh(.TextMatrix(.RowSel, 0))
        End If
    End With

End Sub

Private Sub cmdQuit_Click()

    Unload Me
    
End Sub

Private Sub Form_Load()

    On Error GoTo VBError

    strStatus(0) = ""
    strStatus(1) = "错单"
    strStatus(2) = "无效单"
    
    '初始化网格
    With OGridbrowser
     
        .ColAlignment(0) = flexAlignLeftCenter
        .Cols = 12
        .FixedRows = 1
        .SelectionMode = flexSelectionByRow
        .AllowUserResizing = flexResizeColumns
        .ExplorerBar = flexExSort
        
        .Rows = .FixedRows
        
        .ColWidth(0) = 1300
        .ColWidth(1) = 1000
        .ColWidth(2) = 1800
        .ColWidth(3) = 1000
        .ColWidth(4) = 1200
        .ColWidth(5) = 1200
        .ColWidth(6) = 1200
        .ColWidth(7) = 1200
        .ColWidth(8) = 800
        .ColWidth(9) = 1000
        .ColWidth(10) = 1200
        .ColWidth(11) = 1600
        
        .RowHeight(0) = 350
        .TextMatrix(0, 0) = "入费单ID"
        .TextMatrix(0, 1) = "用户ID"
        .TextMatrix(0, 2) = "用户名称"
        .TextMatrix(0, 3) = "入费金额"
        .TextMatrix(0, 4) = "费率"
        .TextMatrix(0, 5) = "入费日期"
        .TextMatrix(0, 6) = "开始日期"
        .TextMatrix(0, 7) = "结束日期"
        .TextMatrix(0, 8) = "状态"
        .TextMatrix(0, 9) = "管理员ID"
        .TextMatrix(0, 10) = "管理员姓名"
        .TextMatrix(0, 11) = "操作时间"
        
    End With
    
    With CGridbrowser
     
        .ColAlignment(0) = flexAlignLeftCenter
        .Cols = 9
        .FixedRows = 1
        .SelectionMode = flexSelectionByRow
        .AllowUserResizing = flexResizeColumns
        .ExplorerBar = flexExSort
        
        .ColWidth(0) = 1300
        .ColWidth(1) = 1000
        .ColWidth(2) = 1800
        .ColWidth(3) = 1000
        .ColWidth(4) = 1200
        .ColWidth(5) = 1200
        .ColWidth(6) = 1200
        .ColWidth(7) = 1200
        .ColWidth(8) = 800
        
        .RowHeight(0) = 350
        .TextMatrix(0, 0) = "入费单ID"
        .TextMatrix(0, 1) = "用户ID"
        .TextMatrix(0, 2) = "用户名称"
        .TextMatrix(0, 3) = "入费金额"
        .TextMatrix(0, 4) = "费率"
        .TextMatrix(0, 5) = "入费日期"
        .TextMatrix(0, 6) = "开始日期"
        .TextMatrix(0, 7) = "结束日期"
        .TextMatrix(0, 8) = "状态"
        
        '列出所有入费单
        Call CRFDrefresh
        
        If .Rows > 1 Then
        
            '显示第一条入费单的操作记录
            Call ORFDrefresh(.TextMatrix(1, 0))
        End If
        
    End With

    Exit Sub
    
VBError:
    DisplayVBError
    
End Sub

'显示指定入费单的操作记录
Private Sub ORFDrefresh(TableID As String)

    On Error GoTo ADOError

    strQry = "select ID,RFDorig.UserID,FirstName,LastName,RFdate,Money,RFDorig.Status,FLname,StartDate,EndDate,RFDorig.OperID,Name,OperTime from RFDorig,sysUser,JFoperator where ID='" & TableID & "' and RFDorig.UserID*=sysUser.UserID and RFDorig.OperID=JFoperator.OperID"
    Set rstCustomers = GetRecordSet(cnnConnection, strQry)
    
    With OGridbrowser
        .Rows = .FixedRows
        .Redraw = False
    End With
    
    While Not rstCustomers.EOF
    
        With OGridbrowser
        
           .AddItem ""
           .RowHeight(.Rows - 1) = 350
           .TextMatrix(.Rows - 1, 0) = rstCustomers!ID
           .TextMatrix(.Rows - 1, 1) = rstCustomers!UserID
           .TextMatrix(.Rows - 1, 2) = IIf(IsNull(rstCustomers!FirstName & rstCustomers!LastName), "", rstCustomers!FirstName & rstCustomers!LastName)
           .TextMatrix(.Rows - 1, 3) = Format(rstCustomers!Money, "########0.00")
           .TextMatrix(.Rows - 1, 4) = rstCustomers!FLname
           .TextMatrix(.Rows - 1, 5) = rstCustomers!RFdate
           .TextMatrix(.Rows - 1, 6) = IIf(IsNull(rstCustomers!StartDate), "", rstCustomers!StartDate)
           .TextMatrix(.Rows - 1, 7) = IIf(IsNull(rstCustomers!EndDate), "", rstCustomers!EndDate)
           .TextMatrix(.Rows - 1, 8) = strStatus(rstCustomers!Status)
           .TextMatrix(.Rows - 1, 9) = rstCustomers!OperID
           .TextMatrix(.Rows - 1, 10) = rstCustomers!Name
           .TextMatrix(.Rows - 1, 11) = rstCustomers!OperTime
           
        End With
        
        rstCustomers.MoveNext
        
    Wend
        
    OGridbrowser.Redraw = True
    
    Exit Sub
    
VBError:
    DisplayVBError
    Exit Sub
ADOError:
    DisplayADOError cnnConnection
    
End Sub

'列出所有入费单
Private Sub CRFDrefresh()

    On Error GoTo ADOError

    strQry = "select ID,RFDconf.UserID,FirstName,LastName,RFdate,Money,RFDconf.Status,FLname,StartDate,EndDate from RFDconf,sysUser where RFDconf.UserID=sysUser.UserID "
    Set rstCustomers = GetRecordSet(cnnConnection, strQry)
    
    With CGridbrowser
        .Rows = .FixedRows
        .Redraw = False
    End With
    
    While Not rstCustomers.EOF
    
        With CGridbrowser
        
           .AddItem ""
           .RowHeight(.Rows - 1) = 350
           .TextMatrix(.Rows - 1, 0) = rstCustomers!ID
           .TextMatrix(.Rows - 1, 1) = rstCustomers!UserID
           .TextMatrix(.Rows - 1, 2) = IIf(IsNull(rstCustomers!FirstName & rstCustomers!LastName), "", rstCustomers!FirstName & rstCustomers!LastName)
           .TextMatrix(.Rows - 1, 3) = Format(rstCustomers!Money, "########0.00")
           .TextMatrix(.Rows - 1, 4) = rstCustomers!FLname
           .TextMatrix(.Rows - 1, 5) = rstCustomers!RFdate
           .TextMatrix(.Rows - 1, 6) = IIf(IsNull(rstCustomers!StartDate), "", rstCustomers!StartDate)
           .TextMatrix(.Rows - 1, 7) = IIf(IsNull(rstCustomers!EndDate), "", rstCustomers!EndDate)
           .TextMatrix(.Rows - 1, 8) = IIf(rstCustomers!Status = 0, "", "无效单")
           
        End With
        
        rstCustomers.MoveNext
    Wend
        
    CGridbrowser.Redraw = True
    
    Exit Sub
    
VBError:
    DisplayVBError
    Exit Sub
ADOError:
    DisplayADOError cnnConnection
    
End Sub

⌨️ 快捷键说明

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