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

📄 frmuserappeal.frm

📁 这是一个在某本书上获得的一个小区物业管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form UserAppeal 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "投诉项目管理"
   ClientHeight    =   2655
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5115
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2655
   ScaleWidth      =   5115
   Begin VB.CommandButton cmdAdd 
      Caption         =   "添加"
      Height          =   300
      Left            =   600
      TabIndex        =   4
      Top             =   2160
      Width           =   735
   End
   Begin VB.CommandButton cmdSave 
      Caption         =   "保存"
      Default         =   -1  'True
      Height          =   300
      Left            =   1440
      TabIndex        =   5
      Top             =   2160
      Width           =   735
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "关闭"
      Height          =   300
      Left            =   3960
      TabIndex        =   8
      Top             =   2160
      Width           =   735
   End
   Begin VB.CommandButton cmdDelete 
      Caption         =   "删除"
      Height          =   300
      Left            =   3120
      TabIndex        =   7
      Top             =   2160
      Width           =   735
   End
   Begin VB.CommandButton cmdRefresh 
      Caption         =   "刷新"
      Height          =   300
      Left            =   2280
      TabIndex        =   6
      Top             =   2160
      Width           =   735
   End
   Begin VB.TextBox txtAnswer 
      DataField       =   "负责人"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   1080
      MaxLength       =   100
      MultiLine       =   -1  'True
      TabIndex        =   3
      Top             =   1265
      Width           =   1575
   End
   Begin VB.TextBox txtContent 
      DataField       =   "内容"
      DataSource      =   "Adodc1"
      Height          =   510
      Left            =   1080
      MaxLength       =   50
      MultiLine       =   -1  'True
      TabIndex        =   2
      Top             =   610
      Width           =   3495
   End
   Begin VB.TextBox txtTime 
      DataField       =   "时间"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   2520
      MaxLength       =   16
      TabIndex        =   1
      Top             =   195
      Width           =   2055
   End
   Begin VB.TextBox txtUser 
      DataField       =   "投诉人"
      DataSource      =   "Adodc1"
      Height          =   270
      Left            =   1080
      MaxLength       =   9
      TabIndex        =   0
      Top             =   195
      Width           =   975
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   600
      Top             =   1680
      Width           =   4095
      _ExtentX        =   7223
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=物管数据DSN"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "物管数据DSN"
      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 VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "负责人"
      Height          =   180
      Left            =   480
      TabIndex        =   12
      Top             =   1320
      Width           =   540
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "内  容"
      Height          =   180
      Left            =   480
      TabIndex        =   11
      Top             =   630
      Width           =   540
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "时间"
      Height          =   180
      Left            =   2160
      TabIndex        =   10
      Top             =   240
      Width           =   360
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "投诉人"
      Height          =   180
      Left            =   480
      TabIndex        =   9
      Top             =   240
      Width           =   540
   End
End
Attribute VB_Name = "UserAppeal"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim isAdding As Boolean
Private Sub Adodc1_MoveComplete(ByVal adReason As EventReasonEnum, _
        ByVal pError As Error, adStatus As EventStatusEnum, ByVal pRecordset As Recordset)
    With Adodc1.Recordset
        If .AbsolutePosition > 0 Then
            Adodc1.Caption = "当前记录:" & .AbsolutePosition & "/" & .RecordCount
        Else
            Adodc1.Caption = "无用户投诉"
        End If
    End With
End Sub

Private Sub Adodc1_WillChangeRecord(ByVal adReason As EventReasonEnum, _
        ByVal cRecords As Long, adStatus As EventStatusEnum, ByVal pRecordset As Recordset)
        If Trim(txtUser) = "" Then
            MsgBox "投诉人不能为空!", vbCritical, "投诉项目管理"
            txtUser = "": txtUser.SetFocus
        ElseIf Trim(txtTime) = "" Then
            MsgBox "投诉时间不能为空!", vbCritical, "投诉项目管理"
            txtTime = "": txtTime.SetFocus
        ElseIf Trim(txtContent) = "" Then
            MsgBox "投诉内容不能为空!", vbCritical, "投诉项目管理"
            txtContent = "": txtContent.SetFocus
        End If
End Sub

Private Sub cmdAdd_Click()
    Adodc1.Recordset.AddNew     '添加新记录
    cmdAdd.Enabled = False: cmdDelete.Enabled = False
    Adodc1.Enabled = False: isAdding = True
    txtTime = Format(Date, "long date") & " " & Format(Time, "short time")
End Sub

Private Sub cmdDelete_Click()
    With Adodc1.Recordset
        If Not .EOF Then
            If MsgBox("将删除当前投诉项目数据,是否继续?", _
               vbCritical + vbYesNo, "投诉项目管理") = vbYes Then
                .Delete
                .MoveNext
                If .EOF And .RecordCount > 0 Then .MoveLast
            End If
        End If
    End With
End Sub

Private Sub cmdRefresh_Click()
    Adodc1.Refresh
    cmdAdd.Enabled = True: cmdDelete.Enabled = True: Adodc1.Enabled = True
    isAdding = False
End Sub

Private Sub cmdSave_Click()
        If Trim(txtUser) = "" Then
            MsgBox "投诉人不能为空!", vbCritical, "投诉项目管理"
            txtUser = "": txtUser.SetFocus
        ElseIf Trim(txtTime) = "" Then
            MsgBox "投诉时间不能为空!", vbCritical, "投诉项目管理"
            txtTime = "": txtTime.SetFocus
        ElseIf Trim(txtContent) = "" Then
            MsgBox "投诉内容不能为空!", vbCritical, "投诉项目管理"
            txtContent = "": txtContent.SetFocus
        Else
            Adodc1.Recordset.Update
            MsgBox "投诉数据保存成功!", vbInformation, "投诉项目管理"
            cmdAdd.Enabled = True: cmdDelete.Enabled = True: Adodc1.Enabled = True
            isAdding = False
    End If
End Sub


Private Sub cmdExit_Click()
    Unload Me               '关闭投诉项目管理窗体
End Sub

Private Sub txtContent_Change()
    If Trim(txtContent) = "" Or isAdding Then cmdAdd.Enabled = False _
                                         Else cmdAdd.Enabled = True
End Sub

Private Sub txtTime_Change()
    If Trim(txtTime) = "" Or isAdding Then cmdAdd.Enabled = False _
                                      Else cmdAdd.Enabled = True
End Sub

Private Sub txtUser_Change()
    If Trim(txtUser) = "" Or isAdding Then cmdAdd.Enabled = False _
                                      Else cmdAdd.Enabled = True
End Sub

⌨️ 快捷键说明

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