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

📄 main_xt_sjhf.frm

📁 星级酒店客房管理系统一套很不错的系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmDatarestore 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "数据中心——【数据恢复】"
   ClientHeight    =   2520
   ClientLeft      =   3825
   ClientTop       =   5295
   ClientWidth     =   5025
   Icon            =   "main_xt_sjhf.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "main_xt_sjhf.frx":030A
   ScaleHeight     =   2520
   ScaleWidth      =   5025
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.ListBox List1 
      Height          =   1140
      Left            =   840
      TabIndex        =   3
      Top             =   960
      Width           =   1695
   End
   Begin VB.CommandButton Command2 
      Height          =   380
      Left            =   2880
      Picture         =   "main_xt_sjhf.frx":0CEE
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   1680
      Width           =   940
   End
   Begin VB.CommandButton Command1 
      Height          =   380
      Left            =   2880
      Picture         =   "main_xt_sjhf.frx":1136
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   1080
      Width           =   940
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   240
      Picture         =   "main_xt_sjhf.frx":163A
      Top             =   240
      Width           =   480
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请与下边列表中选择欲恢复的数据,然后开始恢复,并且恢复的数据重新登陆后生效!!"
      ForeColor       =   &H000000C0&
      Height          =   630
      Left            =   840
      TabIndex        =   2
      Top             =   240
      Width           =   3735
   End
End
Attribute VB_Name = "frmDatarestore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
 '枚举备份目录下所有文件数据文件到list 中
  Public Function AutoListFiles(ByVal sDirName As String, ByVal FileFilter As String) As Boolean
    Dim sName As String, sFile As String, sExt As String
    Dim sDirList() As String, iDirNum As Integer, i As Integer
    Dim filename
    '首先枚举所有文件
    sFile = Dir(sDirName + FileFilter, vbNormal + vbArchive + vbHidden)
    Do While Len(sFile) > 0
         sFile = UCase(Trim(sFile))
    '在此处可以将 sFile 加入到一个 list1
         filename = Format(Left(sFile, 8), "0000-00-00")
        List1.AddItem filename
        sFile = Dir '下一个文件
    Loop
    End Function

Private Sub Command1_Click()                '确认数据恢复
Dim reponse
If List1.Text = "" Then
    MsgBox "没有选择备份数据,请选择...", vbOKOnly, "提示"
Else
    reponse = MsgBox("现在数据将被备份数据代替,并且需要重新登陆系统才能生效,还恢复吗?", vbOKCancel, "警告")
        If reponse = vbOK Then
            FileCopy App.Path & "\backup\" & Format(List1.Text, "yyyymmdd") & ".mdb", App.Path & "\bkroom.mdb"
            MDIForm1.Visible = False
            main_mima.Show
         Else
        End If
        Unload Me
End If
End Sub
Private Sub Command2_Click()
  Unload Me
End Sub

Private Sub Form_Activate()
AutoListFiles App.Path & "\backup\", "*.mdb"
End Sub

Private Sub Form_Unload(Cancel As Integer)
MDIForm1.Enabled = True
End Sub

⌨️ 快捷键说明

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