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

📄 frmmodifyliver.frm

📁 物业管理信息系统my sql +visual basic
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   492
         Left            =   4240
         TabIndex        =   8
         Top             =   360
         Width           =   1452
      End
      Begin VB.CommandButton previousCommand 
         Caption         =   "上一条记录"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   492
         Left            =   2240
         TabIndex        =   7
         Top             =   360
         Width           =   1452
      End
      Begin VB.CommandButton firstCommand 
         Caption         =   "第一条记录"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   492
         Left            =   240
         TabIndex        =   6
         Top             =   360
         Width           =   1452
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "修改住户信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1092
      Left            =   120
      TabIndex        =   0
      Top             =   5280
      Width           =   8175
      Begin VB.CommandButton deleteCommand 
         Caption         =   "删除记录"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   492
         Left            =   4320
         TabIndex        =   4
         Top             =   360
         Width           =   1455
      End
      Begin VB.CommandButton cancelCommand 
         Caption         =   "关闭退出"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   492
         Left            =   6240
         TabIndex        =   3
         Top             =   360
         Width           =   1485
      End
      Begin VB.CommandButton updateCommand 
         Caption         =   "保存记录"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   492
         Left            =   2280
         TabIndex        =   2
         Top             =   360
         Width           =   1425
      End
      Begin VB.CommandButton editCommand 
         Caption         =   "修改记录"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   492
         Left            =   270
         TabIndex        =   1
         Top             =   390
         Width           =   1440
      End
   End
End
Attribute VB_Name = "frmModifyLiver"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim tempLiver As clsLiver

Private Sub cancelCommand_Click()
 Unload Me
End Sub



Private Sub deleteCommand_Click()
  tempLiver.DelRecord
End Sub

Private Sub editCommand_Click()
 tempLiver.EditRecord
    Frame2.Enabled = False
    firstCommand.Enabled = False
    previousCommand.Enabled = False
    nextCommand.Enabled = False
    lastCommand.Enabled = False
    txtName.Enabled = False
    txtPhone.Enabled = True
    TxtAddress.Enabled = True
    txtComment.Enabled = True
  
End Sub

Private Sub firstCommand_Click()
   mrc.MoveFirst
    Call viewData
End Sub

Private Sub Form_Load()
       
     Set tempLiver = New clsLiver
    tempLiver.LoadRecord
    Call viewData
    txtName.Enabled = False
    TxtAddress.Enabled = False
    txtPhone.Enabled = False
       txtComment.Enabled = False
    txtModifyName.Enabled = False
    txtModifyDate.Enabled = False
    
    
    
    
End Sub

Public Sub viewData()
    txtName.Text = tempLiver.mrc.Fields(0)
    txtPhone.Text = tempLiver.mrc.Fields(1)
    TxtAddress.Text = tempLiver.mrc.Fields(2)
    txtComment.Text = tempLiver.mrc.Fields(3)
    txtModifyName.Text = tempLiver.mrc.Fields(4)
    txtModifyDate.Text = tempLiver.mrc.Fields(5)
   
End Sub



Private Sub lastCommand_Click()
 tempLiver.mrc.MoveLast
    Call viewData
End Sub

Private Sub nextCommand_Click()
 tempLiver.mrc.MoveNext
    If tempLiver.mrc.EOF Then
        tempLiver.mrc.MoveFirst
    End If
    Call viewData
End Sub

Private Sub previousCommand_Click()
 tempLiver.mrc.MovePrevious
    If mrc.BOF Then
        tempLiver.mrc.MoveLast
    End If
    Call viewData
End Sub



Private Sub updateCommand_Click()
 Dim txtSQL As String
    Dim MsgText As String
    Dim mrcc As ADODB.Recordset
    
    If tempLiver.mcclean Then
        MsgBox "请先修改住户资料信息信息", vbOKOnly + vbExclamation, "警告"
        Exit Sub
    End If
    
    If Not Testtxt(txtName.Text) Then
        MsgBox "请输入住户名称!", vbOKOnly + vbExclamation, "警告"
        txtName.SetFocus
        Exit Sub
    End If
     If Not Testtxt(txtPhone.Text) Then
        MsgBox "请输入电话!", vbOKOnly + vbExclamation, "警告"
        txtName.SetFocus
        Exit Sub
    End If
     If Not Testtxt(TxtAddress.Text) Then
        MsgBox "请输入联系地址!", vbOKOnly + vbExclamation, "警告"
        txtName.SetFocus
        Exit Sub
    End If
             
               
                 
               tempLiver.Update txtName.Text, txtPhone.Text, TxtAddress.Text, Me.txtComment.Text
               Call viewData
                Frame2.Enabled = True
                firstCommand.Enabled = True
                previousCommand.Enabled = True
                nextCommand.Enabled = True
                lastCommand.Enabled = True
                txtName.Enabled = False
                txtPhone.Enabled = False
                TxtAddress.Enabled = False
                 tempLiver.mcclean = True
                            
                
     
    
End Sub

⌨️ 快捷键说明

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