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

📄 frm_yzinfodj.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 FRM
📖 第 1 页 / 共 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         =   "C"
      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          =   330
      Left            =   3780
      Top             =   7050
      Width           =   2055
      _ExtentX        =   3625
      _ExtentY        =   582
      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 MSAdodcLib.Adodc Adodc4 
      Height          =   405
      Left            =   1710
      Top             =   7080
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   714
      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         =   "Adodc4"
      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 VB.Label Label4 
      Caption         =   "Label4"
      DataField       =   "房间编号"
      DataSource      =   "Adodc3"
      Height          =   255
      Left            =   1620
      TabIndex        =   19
      Top             =   7620
      Width           =   1005
   End
   Begin VB.Label Label3 
      Caption         =   "Label3"
      DataField       =   "大楼名称"
      DataSource      =   "Adodc2"
      Height          =   360
      Left            =   600
      TabIndex        =   18
      Top             =   7560
      Width           =   1005
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      DataField       =   "小区名称"
      DataSource      =   "Adodc1"
      Height          =   180
      Left            =   6135
      TabIndex        =   16
      Top             =   7125
      Width           =   780
   End
End
Attribute VB_Name = "Frm_yzinfodj"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer


Private Sub DataGrid2_Click()
    frm_fwxxinfo.Adodc1.RecordSource = "select * from tab_fwinfo where 房间编号='" + Label4.Caption + "'"
    frm_fwxxinfo.Adodc1.Refresh
    
'        Adodc4.RecordSource = "select * from tab_yzinfo"
'    Adodc4.Refresh
'    Set DataGrid3.DataSource = Adodc4


End Sub

Private Sub DataGrid3_Click()
    On Error Resume Next
    Adodc4.RecordSource = "select * from tab_yzinfo where 大楼名称='" + Label3.Caption + "' and 小区名称='" + Combo1.Text + "'"
    If Adodc4.Recordset.RecordCount > 0 Then
        Text2.Text = Adodc4.Recordset.Fields("业主姓名")
       '设置控件状态
        CmdModify.Enabled = True
        CmdDelete.Enabled = True
    Else
        MsgBox "请选择业主信息", , "系统提示"
    End If

End Sub

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
    If Adodc1.Recordset.RecordCount > 0 Then
        Adodc1.Recordset.MoveFirst
        On Error Resume Next
        Do While Adodc1.Recordset.EOF = False
            Combo1.AddItem Adodc1.Recordset.Fields("小区名称")
            Adodc1.Recordset.MoveNext
        Loop
    End If
        Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"


    Adodc3.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"

    Adodc4.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc4.RecordSource = "select * from tab_yzinfo where 大楼名称='" + Label3.Caption + "' and 小区名称='" + Combo1.Text + "'"
    Adodc4.Refresh
    Set DataGrid3.DataSource = Adodc4

    'DataGrid控件显示并允许对Recordset对象中代表记录和字段的一系列行和列进行数据操纵。
    '设置控件状态
    CmdModify.Enabled = False
    CmdDelete.Enabled = False
End Sub
Private Sub DataGrid1_Click()
    Adodc3.RecordSource = "select * from tab_fwinfo where 大楼名称 = '" + Label3 + "'"
    Adodc3.Refresh

    Adodc4.RecordSource = "select * from tab_yzinfo where 大楼名称='" + Label3.Caption + "' and 小区名称='" + Combo1.Text + "'"
    Adodc4.Refresh
    

End Sub
Private Sub OptAll_Click()    '显示全部业主
    Adodc4.RecordSource = "select * from tab_yzinfo"
    Adodc4.Refresh
End Sub
Private Sub OptT_Click()   '显示已入住信息
    Adodc4.RecordSource = "select * from tab_yzinfo where 是否进住 like '" + "已进住" + "%'"
    Adodc4.Refresh
End Sub
Private Sub OptF_Click()   '显示未入住业主
    Adodc4.RecordSource = "select * from tab_yzinfo where 是否进住 like '" + "未进住" + "%'"
    Adodc4.Refresh
End Sub
Private Sub Combo1_Click()
    Adodc2.RecordSource = "select * from tab_dlinfo where 大楼编号 like '" + Combo1.Text + "%'"
    Adodc2.Refresh
    Adodc4.RecordSource = "select * from tab_yzinfo where 小区名称 ='" + Combo1.Text + "' "
    Adodc4.Refresh
    
    
'    Adodc2.RecordSource = "select * from tab_dlinfo"
'    Adodc2.Refresh
    Adodc3.RecordSource = "select * from tab_fwinfo where 大楼名称 = '" + Label3 + "'"
    Adodc3.Refresh
    frm_fwxxinfo.Adodc1.RecordSource = "select * from tab_fwinfo where 房间编号='" + Label4.Caption + "'"
    frm_fwxxinfo.Adodc1.Refresh
    
    Set DataGrid1.DataSource = Adodc2
    Set DataGrid2.DataSource = Adodc3
    Set DataGrid3.DataSource = Adodc4


End Sub
Private Sub CmdView_Click()    '查看房屋详细信息
    frm_fwxxinfo.Adodc1.RecordSource = "select * from tab_fwinfo where 房间编号='" + Label4.Caption + "'"
    frm_fwxxinfo.Adodc1.Refresh
    If frm_fwxxinfo.Adodc1.Recordset.RecordCount > 0 Then
    End If
    frm_fwxxinfo.Show   '显示房屋详细信息窗体
End Sub
Private Sub CmdAdd_Click()    '添加新业主
    If Combo1.Text = "" Or Label3.Caption = "" Or Label4.Caption = "" Then
        MsgBox "请选择小区名称,大楼名称,房间编号", , "系统提示"
        Exit Sub
    End If
    Frm_yzinfo.Text1 = Combo1.Text
    Frm_yzinfo.Text2 = Label3.Caption
    Frm_yzinfo.Text3 = Right(Label4.Caption, 4)
    Frm_yzinfo.Text4 = Label4.Caption
    Frm_yzinfo.Text5 = Label4.Caption
    
    Unload Me
    Frm_yzinfo.Show   '显示业主信息窗体
End Sub
'Private Sub CmdModify_Click()    '修改业主信息
'    For i = 0 To 16
'        Frm_yzmd.Text1(i).Text = DataGrid3.Columns(i).Text
'    Next i
'    Unload Me
'    Frm_yzmd.Show    '显示业主信息修改窗体
'End Sub
Private Sub CmdDelete_Click()     '删除业主信息
    If MsgBox("确定删除该业主?", 4, "系统提示") = vbYes Then
        Adodc4.RecordSource = "select * from tab_yzinfo where 业主姓名='" + Text2.Text + "'"
        If Adodc4.Recordset.RecordCount > 0 Then
            Adodc4.Recordset.Delete
'            Adodc4.Recordset.Delete
            Adodc4.Recordset.Update
        End If
        Dim rs1 As New ADODB.Recordset
'        rs1.Open "select * from tab_fwinfo where 户主姓名='" + Text2.Text + "'", cn, adOpenKeyset, adLockOptimistic
'        If rs1.RecordCount > 0 Then
'            rs1.Fields("户主姓名") = " "
'            rs1.Fields("用途") = " "
'            rs1.Fields("房屋状态") = " "
'            rs1.Fields("备注") = " "
'            rs1.Update
'        End If
        Dim rs2 As New ADODB.Recordset
        rs2.Open "select * from tab_rkinfo where 姓名='" + Text2.Text + "'", cn, adOpenKeyset, adLockOptimistic
        If rs2.RecordCount > 0 Then
            rs2.Delete
            rs2.Update
        End If
    End If
    Me.Refresh
End Sub
Private Sub CmdEnd_Click()
    Frm_main.Show
    Unload Me
End Sub

⌨️ 快捷键说明

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