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

📄 frmstat.frm

📁 由VB编写的一个实用短信计费系统。主要模块包括(1)计费管理子系统:用户入费;错单处理;用户费率管理;费率管理;用户分析(2)系统维护子系统:管理员登录、管理员管理、数据库设置等(3)计费引擎子系统
💻 FRM
字号:
VERSION 5.00
Object = "{C5DE3F80-3376-11D2-BAA4-04F205C10000}#1.0#0"; "Vsflex6d.ocx"
Begin VB.Form frmStat 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "用户分析"
   ClientHeight    =   6795
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   9885
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   9
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmStat.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6795
   ScaleWidth      =   9885
   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            =   7560
      TabIndex        =   1
      Top             =   6345
      Width           =   1230
   End
   Begin VSFlex6DAOCtl.vsFlexGrid Gridbrowser 
      Height          =   6225
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   9885
      _ExtentX        =   17436
      _ExtentY        =   10980
      _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   =   0
      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
End
Attribute VB_Name = "frmStat"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*******************************************************
'*    模 块 名 称 :用户分析(统计)
'*    功 能 描 述 :
'*    程序员姓名  :谭怀志
'*    最后修改人  :谭怀志
'*    最后修改时间:2003/6/26
'*    备        注:
'*******************************************************

Private m_StartDate As Date
Private m_EndDate As Date
Private m_SType As Integer

'统计分析的开始日期
Public Property Let StartDate(ByVal NewValue As Date)

     m_StartDate = NewValue
     
End Property

'统计分析的开始日期
Public Property Let EndDate(ByVal NewValue As Date)

    m_EndDate = NewValue
    
End Property

'统计分析的用户类型
Public Property Let SType(ByVal NewValue As Integer)

    m_SType = NewValue

End Property

Private Sub cmdQuit_Click()

    Unload Me

End Sub

Private Sub Form_Resize()
    
    On Error GoTo VBError
    
    '初始化网格
    With Gridbrowser
     
        .RowHeight(0) = 350
        .ColAlignment(0) = flexAlignLeftCenter
        .Cols = 8
        .FixedRows = 1
        .SelectionMode = flexSelectionByRow
        .AllowUserResizing = flexResizeColumns
        .ExplorerBar = flexExSort
        
        .ColWidth(0) = 1000
        .ColWidth(1) = 1800
        .ColWidth(2) = 1000
        .ColWidth(3) = 1200
        .ColWidth(4) = 1200
        .ColWidth(5) = 1200
        .ColWidth(6) = 1200
        .ColWidth(7) = 1200
        
        .TextMatrix(0, 0) = "用户ID"
        .TextMatrix(0, 1) = "用户名称"
        .TextMatrix(0, 2) = "当前余额"
        .TextMatrix(0, 3) = "本期消费金额"
        .TextMatrix(0, 4) = "已消费总金额"
        .TextMatrix(0, 5) = "本期发送条数"
        .TextMatrix(0, 6) = "已发送总条数"
        .TextMatrix(0, 7) = "可发送条数"
    
        .Rows = .FixedRows
        
        '统计用户计费数据
        Call UserStat
        
    End With
    
    Exit Sub
    
VBError:
    DisplayVBError

End Sub

Private Sub UserStat()

    On Error GoTo ADOError

    Dim tmprstCustomers As ADODB.Recordset
    
    With Gridbrowser
        .Rows = .FixedRows
        .Redraw = False
    End With
    
    Select Case m_SType
    Case 0  '所有用户
        strQry = "select UserID,Tmoney=SUM(Money),TotalNum=COUNT(UserID) from JFparti  where SendTime>='" & m_StartDate & "' and SendTime<'" & m_EndDate + 1 & "' group by UserID"
    Case 1  '单条用户
        strQry = "select UserID,Tmoney=SUM(Money),TotalNum=COUNT(UserID) from JFparti where SendTime>='" & m_StartDate & "' and SendTime<'" & m_EndDate + 1 & "' and JFtype=0 group by UserID"
    Case 2  '包月用户
        strQry = "select UserID,Tmoney=SUM(Money),TotalNum=COUNT(UserID) from JFparti where SendTime>='" & m_StartDate & "' and SendTime<'" & m_EndDate + 1 & "' and JFtype=1 group by UserID"
    End Select
    
    Set rstCustomers = GetRecordSet(cnnConnection, strQry)
    
    While Not rstCustomers.EOF
    
        strQry = "select FirstName,LastName,SendFlag,Cmoney,SendedNum,TotalMoney,SendableNum from MsgJF,sysUser where MsgJF.UserID='" & rstCustomers!UserID & "' and  MsgJF.UserID=sysUser.UserID"
        Set tmprstCustomers = GetRecordSet(cnnConnection, strQry)
        
        With Gridbrowser
        
            .AddItem ""
            .RowHeight(.Rows - 1) = 350
            .TextMatrix(.Rows - 1, 0) = rstCustomers!UserID
            .TextMatrix(.Rows - 1, 1) = IIf(IsNull(tmprstCustomers!FirstName & tmprstCustomers!LastName), "", tmprstCustomers!FirstName & tmprstCustomers!LastName)
            .TextMatrix(.Rows - 1, 2) = Format(tmprstCustomers!Cmoney, "########0.00")
            .TextMatrix(.Rows - 1, 3) = Format(rstCustomers!Tmoney, "########0.00")
            .TextMatrix(.Rows - 1, 4) = Format(tmprstCustomers!TotalMoney, "########0.00")
            .TextMatrix(.Rows - 1, 5) = rstCustomers!TotalNum
            .TextMatrix(.Rows - 1, 6) = tmprstCustomers!SendedNum
            .TextMatrix(.Rows - 1, 7) = IIf(tmprstCustomers!SendableNum = -1, "无限制", tmprstCustomers!SendableNum)
            
        End With
        
        rstCustomers.MoveNext
        
    Wend
    
    Gridbrowser.Redraw = True
    
    Exit Sub
    
VBError:
    DisplayVBError
    Exit Sub
ADOError:
    DisplayADOError cnnConnection

End Sub

⌨️ 快捷键说明

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