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

📄 frm_dlinfomd.frm

📁 小区物业管理系统,(vb6+SQLServer2000+使用说明)
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "大楼说明:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   120
         TabIndex        =   29
         Top             =   645
         Width           =   900
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "建筑面积:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   120
         TabIndex        =   28
         Top             =   1050
         Width           =   900
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "房屋数量:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   120
         TabIndex        =   27
         Top             =   1410
         Width           =   900
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "竣工日期:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   120
         TabIndex        =   26
         Top             =   1785
         Width           =   900
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "交工日期:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   120
         TabIndex        =   25
         Top             =   2160
         Width           =   900
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "备    注:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   120
         TabIndex        =   24
         Top             =   2550
         Width           =   900
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "大楼名称:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   1875
         TabIndex        =   23
         Top             =   300
         Width           =   900
      End
      Begin VB.Label Label9 
         AutoSize        =   -1  'True
         Caption         =   "负责人:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   3915
         TabIndex        =   22
         Top             =   300
         Width           =   720
      End
      Begin VB.Label Label10 
         AutoSize        =   -1  'True
         Caption         =   "大楼结构:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   2475
         TabIndex        =   21
         Top             =   675
         Width           =   900
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         Caption         =   "朝   向:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   2490
         TabIndex        =   20
         Top             =   1035
         Width           =   810
      End
      Begin VB.Label Label12 
         AutoSize        =   -1  'True
         Caption         =   "单元数:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   2490
         TabIndex        =   19
         Top             =   1410
         Width           =   720
      End
      Begin VB.Label Label13 
         AutoSize        =   -1  'True
         Caption         =   "总户数:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   4020
         TabIndex        =   18
         Top             =   1425
         Width           =   720
      End
      Begin VB.Label Label14 
         Caption         =   "大楼位置:"
         Enabled         =   0   'False
         Height          =   270
         Left            =   2730
         TabIndex        =   17
         Top             =   1800
         Width           =   915
      End
      Begin VB.Label Label15 
         AutoSize        =   -1  'True
         Caption         =   "所属区域:"
         Enabled         =   0   'False
         Height          =   180
         Left            =   2670
         TabIndex        =   16
         Top             =   3465
         Width           =   900
      End
   End
   Begin VB.Frame Frame3 
      Height          =   705
      Left            =   105
      TabIndex        =   36
      Top             =   2715
      Width           =   3915
      Begin VB.CommandButton Command7 
         Caption         =   "最后一条"
         Height          =   390
         Left            =   2835
         TabIndex        =   40
         Top             =   195
         Width           =   900
      End
      Begin VB.CommandButton Command6 
         Caption         =   "下一条"
         Height          =   390
         Left            =   1935
         TabIndex        =   39
         Top             =   195
         Width           =   900
      End
      Begin VB.CommandButton Command5 
         Caption         =   "上一条"
         Height          =   390
         Left            =   1035
         TabIndex        =   38
         Top             =   195
         Width           =   900
      End
      Begin VB.CommandButton Command4 
         Caption         =   "第一条"
         Height          =   390
         Left            =   135
         TabIndex        =   37
         Top             =   195
         Width           =   900
      End
   End
   Begin VB.Label Label16 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "大楼信息修改窗口"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   2565
      TabIndex        =   31
      Top             =   75
      Width           =   2415
   End
End
Attribute VB_Name = "frm_dlinfomd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer   '定义整型变量
Private Sub Command1_Click()   '修改
    '设置控件状态
    Text2.Enabled = True
    Text3.Enabled = True
    Text4.Enabled = True
    Text5.Enabled = True
    Text6.Enabled = True
    Text7.Enabled = True
    Text8.Enabled = True
    Text9.Enabled = True
    Text10.Enabled = True
    Text11.Enabled = True
    Text12.Enabled = True
    Combo1.Enabled = True
    Combo2.Enabled = True
    DTPicker1.Enabled = True
    DTPicker2.Enabled = True
End Sub
Private Sub Command2_Click()    '保存

    If Adodc1.Recordset.RecordCount > 0 Then
        Adodc1.Recordset.Fields("大楼编号") = Text1.Text
        Adodc1.Recordset.Fields("大楼名称") = Text2.Text
        Adodc1.Recordset.Fields("大楼说明") = Text4.Text
        Adodc1.Recordset.Fields("大楼位置") = Text10.Text
        Adodc1.Recordset.Fields("房屋数量") = Text7.Text
        Adodc1.Recordset.Fields("总户数") = Text9.Text
        Adodc1.Recordset.Fields("负责人") = Text3.Text
        Adodc1.Recordset.Fields("负责人电话") = Text12.Text
        Adodc1.Recordset.Fields("备注") = Text11.Text
        Adodc1.Recordset.Fields("建筑面积") = Text6.Text
        Adodc1.Recordset.Fields("竣工日期") = DTPicker1
        Adodc1.Recordset.Fields("交工日期") = DTPicker2
        Adodc1.Recordset.Fields("大楼结构") = Text5.Text
        Adodc1.Recordset.Fields("朝向") = Combo1.Text
        Adodc1.Recordset.Fields("单元数") = Text8.Text
        On Error Resume Next
        Adodc1.Recordset.Update
        MsgBox "信息修改成功!", , "系统提示"
        Adodc1.Refresh
    End If
End Sub
Private Sub Command3_Click()   '退出
    Unload Me
    Frm_dlinfo.Show
End Sub
Private Sub Command4_Click()   '第一条
    Adodc1.Refresh
    If Adodc1.Recordset.RecordCount > 0 Then
        Adodc1.Recordset.MoveFirst
                DTPicker1.Value = Adodc1.Recordset.Fields("竣工日期")
        DTPicker2.Value = Adodc1.Recordset.Fields("交工日期")

    Else
        MsgBox "没有记录!", , "系统提示"
    End If

'    Adodc1.Recordset.MoveFirst   '移至数据表的第一条记录
End Sub
Private Sub Command5_Click()   '上一条
    Adodc1.Refresh
    If Adodc1.Recordset.RecordCount > 0 Then
        Adodc1.Recordset.MovePrevious

        If Adodc1.Recordset.BOF Then
        Adodc1.Recordset.MoveFirst
                DTPicker1.Value = Adodc1.Recordset.Fields("竣工日期")
        DTPicker2.Value = Adodc1.Recordset.Fields("交工日期")
End If
    Else
        MsgBox "没有记录!", , "系统提示"
    End If
'
'    Adodc1.Recordset.MovePrevious
'    If Adodc1.Recordset.BOF Then Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command6_Click()   '下一条
    Adodc1.Refresh
'    Adodc1.Recordset.MoveNext
'    If Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveLast
    
    If Adodc1.Recordset.RecordCount > 0 Then
        Adodc1.Recordset.MoveNext
                DTPicker1.Value = Adodc1.Recordset.Fields("竣工日期")
        DTPicker2.Value = Adodc1.Recordset.Fields("交工日期")

        If Adodc1.Recordset.EOF Then
        Adodc1.Recordset.MoveLast
                DTPicker1.Value = Adodc1.Recordset.Fields("竣工日期")
        DTPicker2.Value = Adodc1.Recordset.Fields("交工日期")
End If
    Else
        MsgBox "没有记录!", , "系统提示"
    End If

End Sub
Private Sub Command7_Click()  ' 最后一条
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
    Adodc1.Recordset.MoveLast
            DTPicker1.Value = Adodc1.Recordset.Fields("竣工日期")
        DTPicker2.Value = Adodc1.Recordset.Fields("交工日期")

    Else
    MsgBox "没有记录!", , "系统提示"
    End If
End Sub
Private Sub Form_Load()
Dim i As Integer
    DTPicker1.Value = Date
    DTPicker2.Value = Date
    '自动识别路径
    Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc1.RecordSource = "select * from tab_dlinfo "
    Adodc1.Refresh
    Image1.Picture = LoadPicture(App.Path & "\image\大楼.jpg")
       Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db_wygl.mdb;Persist Security Info=False"
    Adodc2.RecordSource = "select * from tab_frontage "
    Adodc2.Refresh
     
            Dim rs As New ADODB.Recordset
    rs.Open "select * from tab_frontage", cn, 1, 3
    If rs.RecordCount > 0 Then
        rs.MoveFirst
        For i = 0 To rs.RecordCount - 1
            Combo1.AddItem rs.Fields("房屋朝向")
            rs.MoveNext
        Next i
    End If
    rs.Close

    
End Sub

⌨️ 快捷键说明

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