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

📄 frm_xqzytj.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc2"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   465
      Left            =   1725
      Top             =   4425
      Width           =   2235
      _ExtentX        =   3942
      _ExtentY        =   820
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSChart20Lib.MSChart MSChart1 
      Height          =   2445
      Left            =   2235
      OleObjectBlob   =   "Frm_xqzytj.frx":1C9C
      TabIndex        =   0
      Top             =   150
      Width           =   4260
   End
   Begin VB.Label Label5 
      Caption         =   "Label5"
      Height          =   180
      Left            =   3285
      TabIndex        =   5
      Top             =   5220
      Width           =   750
   End
   Begin VB.Label Label4 
      Caption         =   "Label4"
      Height          =   285
      Left            =   2955
      TabIndex        =   4
      Top             =   5220
      Width           =   1125
   End
   Begin VB.Label Label3 
      Caption         =   "Label3"
      Height          =   300
      Left            =   795
      TabIndex        =   3
      Top             =   5280
      Width           =   1485
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      Height          =   330
      Left            =   870
      TabIndex        =   2
      Top             =   5250
      Width           =   1230
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      DataField       =   "小区名称"
      DataSource      =   "Adodc1"
      Height          =   360
      Left            =   765
      TabIndex        =   1
      Top             =   5280
      Width           =   1215
   End
End
Attribute VB_Name = "Frm_xqzytj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim j As String
Dim i, X, k, a, b As Integer
Private Sub Form_Load()
    '自动识别路径
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from tab_xqinfo"
    Adodc1.Refresh

    Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc2.RecordSource = "select * from tab_rkinfo"
    Adodc2.Refresh

    Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc3.RecordSource = "select * from tab_rktj"
    Adodc3.Refresh

    Adodc4.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc4.RecordSource = "select * from tab_fwinfo"
    Adodc4.Refresh

    Adodc5.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc5.RecordSource = "select * from tab_fwtj"
    Adodc5.Refresh

    Command1.Enabled = False
    Adodc1.RecordSource = "select * from tab_xqinfo"
    Adodc1.Refresh
    If Adodc1.Recordset.RecordCount > 0 Then
        Adodc1.Recordset.MoveFirst
        Do While Adodc1.Recordset.EOF = False
            Combo1.AddItem Label1.Caption
            Adodc1.Recordset.MoveNext
        Loop
    End If
End Sub
Private Sub Combo2_Click()
    If Combo2.Text = "人口统计" Then j = 1
    If Combo2.Text = "住房统计" Then j = 2
End Sub
Private Sub Command1_Click()
    Command1.Enabled = False
    Command2.Enabled = True
    If j = 1 Then
        Adodc3.RecordSource = "select * from tab_rktj"
        Adodc3.Refresh
        ReDim arrvalues(1 To 2, 1 To 2)
        For X = 1 To 2
            arrvalues(X, 1) = Adodc3.Recordset!性别
            arrvalues(X, 2) = Adodc3.Recordset!人数
            Adodc3.Recordset.MoveNext
        Next X
        MSChart1.ChartData = arrvalues
        MSChart1.Title = "小区人口比例图"
        'MSChart 控件以图形方式显示数据的图表
    End If
    If j = 2 Then
        Adodc5.RecordSource = "select * from tab_fwtj"
        Adodc5.Refresh
        ReDim arrvalues(1 To 2, 1 To 2)
        For X = 1 To 2
            arrvalues(X, 1) = Adodc5.Recordset!是否空闲
            arrvalues(X, 2) = Adodc5.Recordset!房间数
            Adodc5.Recordset.MoveNext
        Next X
        MSChart1.ChartData = arrvalues
        MSChart1.Title = "小区房屋比例图"
    End If
End Sub
Private Sub Command2_Click()
    If j = 1 Then
        Adodc2.RecordSource = "select * from tab_rkinfo where 小区名称='" + Combo1.Text + "'"
        Adodc2.Refresh
        i = Adodc2.Recordset.RecordCount
        Adodc2.RecordSource = "select * from tab_rkinfo where 小区名称='" + Combo1.Text + "'and 性别='女'"
        Adodc2.Refresh
        k = Adodc2.Recordset.RecordCount
        Label2.Caption = k
        Label3.Caption = i - k
        Adodc3.RecordSource = "select * from tab_rktj"
        Adodc3.Refresh
        If Adodc3.Recordset.RecordCount > 0 Then
            Do While Adodc3.Recordset.EOF = False
                Adodc3.Recordset.Delete
                Adodc3.Recordset.MoveNext
            Loop
        End If
        Adodc3.RecordSource = "select * from tab_rktj"
        Adodc3.Refresh
        Set adors = cn.Execute("insert into tab_rktj values('男','" & Label3 & "') ")
        Set adors = cn.Execute("insert into tab_rktj values('女','" & Label2 & "') ")
        Adodc3.Refresh
    End If
    If j = 2 Then
        Adodc4.RecordSource = "select * from tab_fwinfo where 小区名称='" + Combo1 + "'"
        Adodc4.Refresh
        a = Adodc4.Recordset.RecordCount
        Adodc4.RecordSource = "select * from tab_fwinfo where 小区名称='" + Combo1 + "'and 房屋状态 ='入住'"
        Adodc4.Refresh
        b = Adodc4.Recordset.RecordCount
        Label4.Caption = b
        Label5.Caption = a - b
        Adodc5.RecordSource = "select * from tab_fwtj"
        Adodc5.Refresh
        If Adodc5.Recordset.RecordCount > 0 Then
            Do While Adodc5.Recordset.EOF = False
                Adodc5.Recordset.Delete
                Adodc5.Recordset.MoveNext
            Loop
        End If
        Adodc5.RecordSource = "select * from tab_fwtj"
        Adodc5.Refresh
        Set adors = cn.Execute("insert into tab_fwtj values('入住','" & Label4 & "') ")
        Set adors = cn.Execute("insert into tab_fwtj values('空闲','" & Label5 & "') ")
        Adodc5.Refresh
    End If
    MsgBox "数据导入完成!", , "系统提示"
    Command1.Enabled = True    '开始分析按钮可用
    Command2.Enabled = False   '到入数据按钮不可用
End Sub

⌨️ 快捷键说明

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