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

📄 frmnogeneralusermanagequery_select.frm

📁 自来水公司的一个管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmNoGeneralUserManageQuery_Select 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "水表非正常用户选择"
   ClientHeight    =   3885
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   7125
   Icon            =   "frmNoGeneralUserManageQuery_Select.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3885
   ScaleWidth      =   7125
   StartUpPosition =   1  '所有者中心
   Begin VB.Frame Frame2 
      Caption         =   "时期"
      Height          =   765
      Left            =   150
      TabIndex        =   13
      Top             =   180
      Width           =   6810
      Begin VB.ComboBox cboSQ 
         Height          =   300
         Left            =   2115
         Style           =   2  'Dropdown List
         TabIndex        =   0
         Top             =   300
         Width           =   1770
      End
      Begin VB.Label Label1 
         Caption         =   "非正常水表状态时期:"
         Height          =   210
         Left            =   345
         TabIndex        =   14
         Top             =   360
         Width           =   1905
      End
   End
   Begin VB.CommandButton cmdCB 
      Caption         =   "确定"
      Height          =   420
      Index           =   0
      Left            =   135
      TabIndex        =   2
      Top             =   3270
      Width           =   1065
   End
   Begin VB.Frame Frame1 
      Caption         =   "用户"
      Height          =   2025
      Left            =   135
      TabIndex        =   12
      Top             =   1050
      Width           =   6825
      Begin VB.CheckBox chkUser 
         Height          =   225
         Left            =   255
         TabIndex        =   17
         Top             =   1485
         Width           =   240
      End
      Begin MSDataListLib.DataCombo cboP 
         Height          =   330
         Left            =   1200
         TabIndex        =   1
         Top             =   1005
         Width           =   1380
         _ExtentX        =   2434
         _ExtentY        =   582
         _Version        =   393216
         Enabled         =   0   'False
         Style           =   2
         Text            =   ""
      End
      Begin VB.CheckBox chkPQ 
         Enabled         =   0   'False
         Height          =   210
         Index           =   1
         Left            =   2850
         TabIndex        =   16
         Top             =   1065
         Width           =   225
      End
      Begin VB.CheckBox chkPQ 
         Height          =   210
         Index           =   0
         Left            =   255
         TabIndex        =   15
         Top             =   1065
         Width           =   225
      End
      Begin VB.CheckBox chkChargetType 
         Caption         =   "私人用户"
         Height          =   240
         Index           =   1
         Left            =   2370
         TabIndex        =   4
         Top             =   390
         Value           =   1  'Checked
         Width           =   1755
      End
      Begin VB.CheckBox chkChargetType 
         Caption         =   "公家用户"
         Height          =   240
         Index           =   0
         Left            =   255
         TabIndex        =   3
         Top             =   390
         Value           =   1  'Checked
         Width           =   1755
      End
      Begin VB.TextBox txtUID 
         Enabled         =   0   'False
         Height          =   345
         Left            =   1215
         TabIndex        =   6
         Top             =   1425
         Width           =   1365
      End
      Begin VB.TextBox txtUName 
         Enabled         =   0   'False
         Height          =   345
         Left            =   3840
         TabIndex        =   7
         Top             =   1425
         Width           =   2865
      End
      Begin MSDataListLib.DataCombo cboQ 
         Height          =   330
         Left            =   3840
         TabIndex        =   5
         Top             =   960
         Width           =   1380
         _ExtentX        =   2434
         _ExtentY        =   582
         _Version        =   393216
         Enabled         =   0   'False
         Style           =   2
         Text            =   ""
      End
      Begin VB.Label lblUserID 
         Caption         =   "用户号:"
         Height          =   195
         Left            =   495
         TabIndex        =   10
         Top             =   1515
         Width           =   1470
      End
      Begin VB.Label lblQID 
         Caption         =   "小区:"
         Height          =   195
         Left            =   3090
         TabIndex        =   9
         Top             =   1080
         Width           =   555
      End
      Begin VB.Label lblPID 
         Caption         =   "片区:"
         Height          =   195
         Left            =   495
         TabIndex        =   8
         Top             =   1080
         Width           =   555
      End
      Begin VB.Label lblUserName 
         Caption         =   "用户名:"
         Height          =   195
         Left            =   3090
         TabIndex        =   11
         Top             =   1500
         Width           =   735
      End
      Begin VB.Line Line2 
         BorderColor     =   &H80000003&
         Index           =   1
         X1              =   90
         X2              =   6705
         Y1              =   795
         Y2              =   795
      End
      Begin VB.Line Line2 
         BorderColor     =   &H80000005&
         Index           =   0
         X1              =   90
         X2              =   6705
         Y1              =   810
         Y2              =   810
      End
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000003&
      Index           =   1
      X1              =   75
      X2              =   7020
      Y1              =   3150
      Y2              =   3150
   End
   Begin VB.Line Line1 
      BorderColor     =   &H80000005&
      Index           =   0
      X1              =   75
      X2              =   7020
      Y1              =   3165
      Y2              =   3165
   End
End
Attribute VB_Name = "frmNoGeneralUserManageQuery_Select"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public strReturnSQL As String   '用于返回给父窗口,SQL 查询语句
Public strReturnSQ As String    '用于返回给父窗口,时期
Public strReturnUser As String    '用于返回给父窗口,片,区/用户

Dim adoPRS As ADODB.Recordset
Dim adoQRS As ADODB.Recordset

Private Sub cmdCB_Click(Index As Integer)
    If Me.chkPQ(0).value = 1 And Trim(Me.cboP.Text) = "" Then
        Beep
        Me.cboP.SetFocus
        Exit Sub
    End If

    strReturnSQL = "select * from vABWm where "
    
    If Me.cboSQ.ListIndex = 0 Then  '当前状态
        strReturnSQL = strReturnSQL & "CurrentFlag='1' "
        strReturnSQ = Trim(Me.cboSQ.Text)
    Else                            '历史状态
        strReturnSQL = strReturnSQL & "CurrentFlag='0' "
        strReturnSQ = Trim(Me.cboSQ.Text)
    End If
    
    If Me.chkUser.value = 1 Then    '按用户号查询
        If Trim(Me.txtUName.Text) <> "" Then
            strReturnSQL = strReturnSQL & "and UID='" & Trim(Me.txtUID.Text) & "' "
        End If
        strReturnUser = Trim(Me.txtUID.Text) & " " & Trim(Me.txtUName.Text)
    
        strReturnSQL = strReturnSQL & "order by UID"
        Unload Me
        Exit Sub
    End If

    If (Me.chkChargetType(0).value = 1 And Me.chkChargetType(1).value = 1) Or ((Me.chkChargetType(0).value = 0 And Me.chkChargetType(1).value = 0)) Then
        '两个都选,或两个都不选----不对该项进行过滤
        '空
    Else
        If Me.chkChargetType(0).value = 1 Then  '公家
            strReturnSQL = strReturnSQL & "and (ChargetTypeID='1' or ChargetTypeID='2') "
            strReturnUser = "公家用户"
        Else                                    '私人
            strReturnSQL = strReturnSQL & "and ChargetTypeID='3' "
            strReturnUser = "私人用户"
        End If
    End If
    
    If Me.chkPQ(0).value = 1 Then   '按片区查询(片区有可分为公家/私人)
        If Trim(Me.cboP.Text) <> "" Then

⌨️ 快捷键说明

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