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

📄 main_xtgl_xtwh.frm

📁 餐饮企业的管理系统主要包括前台管理、后台管理、财务管理、报表打印等功能
💻 FRM
字号:
VERSION 5.00
Begin VB.Form main_xtgl_xtwh 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "系统管理--系统维护向导"
   ClientHeight    =   6180
   ClientLeft      =   45
   ClientTop       =   225
   ClientWidth     =   11505
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "main_xtgl_xtwh.frx":0000
   ScaleHeight     =   6180
   ScaleWidth      =   11505
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Comend 
      Caption         =   "取消维护向导"
      Height          =   360
      Left            =   6270
      TabIndex        =   4
      Top             =   5700
      Width           =   2100
   End
   Begin VB.CommandButton Comdown 
      Caption         =   "下一步"
      Height          =   360
      Left            =   3945
      TabIndex        =   3
      Top             =   5700
      Width           =   2100
   End
   Begin VB.CommandButton Comup 
      Caption         =   "上一步"
      Height          =   360
      Left            =   1635
      TabIndex        =   2
      Top             =   5700
      Width           =   2100
   End
   Begin VB.Frame Frame2 
      Height          =   60
      Left            =   15
      TabIndex        =   1
      Top             =   5505
      Width           =   10395
   End
   Begin VB.Frame Frame1 
      Caption         =   "维护向导的使用规则"
      Height          =   5430
      Index           =   0
      Left            =   1275
      TabIndex        =   0
      Top             =   45
      Width           =   7845
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   $"main_xtgl_xtwh.frx":110152
         Height          =   4800
         Left            =   270
         TabIndex        =   6
         Top             =   360
         Width           =   7410
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "在下面选择维护对象"
      Height          =   5430
      Index           =   1
      Left            =   1275
      TabIndex        =   7
      Top             =   45
      Width           =   7845
      Begin VB.CheckBox Check1 
         Caption         =   "应付帐款历史信息表"
         Height          =   315
         Index           =   7
         Left            =   165
         TabIndex        =   24
         Top             =   4410
         Width           =   2265
      End
      Begin VB.CheckBox Check1 
         Caption         =   "点单历史信息表"
         Height          =   315
         Index           =   6
         Left            =   165
         TabIndex        =   16
         Top             =   3870
         Width           =   2265
      End
      Begin VB.CheckBox Check1 
         Caption         =   "结帐历史信息表"
         Height          =   315
         Index           =   5
         Left            =   165
         TabIndex        =   15
         Top             =   3300
         Width           =   2265
      End
      Begin VB.CheckBox Check1 
         Caption         =   "出货单据"
         Height          =   315
         Index           =   4
         Left            =   165
         TabIndex        =   14
         Top             =   2715
         Width           =   2265
      End
      Begin VB.CheckBox Check1 
         Caption         =   "进货单据"
         Height          =   315
         Index           =   3
         Left            =   165
         TabIndex        =   13
         Top             =   2115
         Width           =   2265
      End
      Begin VB.CheckBox Check1 
         Caption         =   "出货信息表"
         Height          =   315
         Index           =   2
         Left            =   165
         TabIndex        =   12
         Top             =   1590
         Width           =   2265
      End
      Begin VB.CheckBox Check1 
         Caption         =   "进货信息表"
         Height          =   315
         Index           =   1
         Left            =   150
         TabIndex        =   11
         Top             =   1095
         Width           =   2265
      End
      Begin VB.CheckBox Check1 
         Caption         =   "库存信息表"
         Height          =   315
         Index           =   0
         Left            =   165
         TabIndex        =   10
         Top             =   615
         Width           =   2265
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "维护项目选择"
      Height          =   5430
      Index           =   2
      Left            =   1275
      TabIndex        =   8
      Top             =   45
      Width           =   7845
      Begin VB.CheckBox Check2 
         Caption         =   "清除应付帐款历史信息"
         Height          =   315
         Index           =   7
         Left            =   165
         TabIndex        =   25
         Top             =   4440
         Width           =   2265
      End
      Begin VB.CheckBox Check2 
         Caption         =   "清除历史点单信息"
         Height          =   315
         Index           =   6
         Left            =   165
         TabIndex        =   23
         Top             =   3900
         Width           =   2265
      End
      Begin VB.CheckBox Check2 
         Caption         =   "清除历史结帐单据信息表"
         Height          =   315
         Index           =   5
         Left            =   165
         TabIndex        =   22
         Top             =   3330
         Width           =   2580
      End
      Begin VB.CheckBox Check2 
         Caption         =   "清除一年以前的出货信单据息"
         Height          =   315
         Index           =   4
         Left            =   180
         TabIndex        =   21
         Top             =   2745
         Width           =   3030
      End
      Begin VB.CheckBox Check2 
         Caption         =   "清除一年以前的进货单据信息"
         Height          =   315
         Index           =   3
         Left            =   165
         TabIndex        =   20
         Top             =   2145
         Width           =   3075
      End
      Begin VB.CheckBox Check2 
         Caption         =   "清除一年以前的出货信息"
         Height          =   315
         Index           =   2
         Left            =   165
         TabIndex        =   19
         Top             =   1620
         Width           =   2625
      End
      Begin VB.CheckBox Check2 
         Caption         =   "清除一年以前的进货信息"
         Height          =   315
         Index           =   1
         Left            =   165
         TabIndex        =   18
         Top             =   1125
         Width           =   3030
      End
      Begin VB.CheckBox Check2 
         Caption         =   "清除库存小于等于零的信息"
         Height          =   315
         Index           =   0
         Left            =   165
         TabIndex        =   17
         Top             =   645
         Width           =   2670
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "维护结果"
      Height          =   5430
      Index           =   3
      Left            =   1245
      TabIndex        =   9
      Top             =   45
      Width           =   7845
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         ForeColor       =   &H000000FF&
         Height          =   4590
         Left            =   315
         TabIndex        =   26
         Top             =   360
         Width           =   3680
      End
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请您认真阅读维护规则,然后按“下一步”"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   3630
      Left            =   9285
      TabIndex        =   5
      Top             =   315
      Width           =   270
   End
End
Attribute VB_Name = "main_xtgl_xtwh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, y As Integer     '定义整型变量
Dim newcnn As New Connection     '定义数据库连接
Dim s, SQL0, SQL1, SQL2, SQL3, SQL4, SQL5, SQL6, SQL7 As String     '定义字符串变量
Private Sub Form_Activate()     '初始化设置
  s = Year(Date) - 1
  y = 1
  Comup.Enabled = False
  Me.Caption = Me.Caption & "    " & frm_main.St1.Panels(3).text
End Sub
Private Sub Form_Unload(Cancel As Integer)
  frm_main.Enabled = True
End Sub
Private Sub Comdown_Click()     '下一步操作
  If y <> 5 Then y = y + 1
  Comup.Enabled = True
  If y = 2 Then
     Frame1(1).Visible = True: Frame1(0).Visible = False
     Frame1(2).Visible = False: Frame1(3).Visible = False
  End If
 If y > 2 Then
    If Check1(0).Value = 0 And Check1(1).Value = 0 And Check1(2).Value = 0 And Check1(3).Value = 0 And Check1(4).Value = 0 And Check1(5).Value = 0 And Check1(6).Value = 0 And Check1(7).Value = 0 Then
       MsgBox "请选择维护对象!"
       y = 2
    Else
       Frame1(2).Visible = True: Frame1(0).Visible = False
       Frame1(1).Visible = False: Frame1(3).Visible = False
       For i = 0 To 7
           If Check1(i).Value = 1 Then Check2(i).Enabled = True Else Check2(i).Enabled = False
       Next i
    End If
 End If
 If y > 3 Then
    If Check2(0).Value = 0 And Check2(1).Value = 0 And Check2(2).Value = 0 And Check2(3).Value = 0 And Check2(4).Value = 0 And Check2(5).Value = 0 And Check2(6).Value = 0 And Check2(7).Value = 0 Then
       MsgBox "请选择维护项目!"
       y = 3
    Else
       Frame1(2).Visible = False: Frame1(0).Visible = False
       Frame1(1).Visible = False: Frame1(3).Visible = True
       Comdown.Caption = "开始维护"
    End If
 End If
 If y > 4 Then
    newcnn.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=CYGLXT"
    If Check2(0).Value = 1 Then
       SQL0 = "delete 库存信息表 where 库存信息表.库存数量<=0"
       newcnn.Execute SQL0
       Label3.Caption = Label3.Caption & "已成功删除库存信息表中库存数量小于等于零的数据!"
    End If
    If Check2(1).Value = 1 Then
       SQL1 = "delete 进货表 where 进货表.票号 like '" & s & "'+'%'"
       newcnn.Execute SQL1
       Label3.Caption = Label3.Caption & "已成功删除进货表中一年前的数据! "
    End If
    If Check2(2).Value = 1 Then
       SQL2 = "delete 出货表 where 出货表.票号 like '" & s & "'+'%'"
       newcnn.Execute SQL2
       Label3.Caption = Label3.Caption & "已成功删除出货表中一年前的数据! "
    End If
    If Check2(3).Value = 1 Then
       SQL3 = "delete 进货单据历史表 where 进货单据历史表.进货票号 like '" & s & "'+'%'"
       newcnn.Execute SQL3         'Connection 对象的 Execute 方法,执行指定的查询、SQL 语句、存储过程或特定提供者的文本等内容。
       Label3.Caption = Label3.Caption & "已成功删除进货单据中一年前的数据!"
    End If
    If Check2(4).Value = 1 Then
       SQL4 = "delete 出货历史单据表 where 出货历史单据表.出货票号 like '" & s & "'+'%'"
       newcnn.Execute SQL4
       Label3.Caption = Label3.Caption & "已成功删除出货单据中一年前的数据!"
    End If
    If Check2(5).Value = 1 Then
       SQL5 = "delete 结账历史信息表 select * from 结账历史信息表"
       newcnn.Execute SQL5
       Label3.Caption = Label3.Caption & "已成功删除结账历史数据!     "
    End If
    If Check2(6).Value = 1 Then
       SQL6 = "delete 点单历史表 select * from 点单历史表"
       newcnn.Execute SQL6
       Label3.Caption = Label3.Caption & "已成功删除点单历史数据!     "
    End If
    If Check2(7).Value = 1 Then
       SQL7 = "delete 付款单据历史表 select * from 付款单据历史表"
       newcnn.Execute SQL7         'Connection 对象的 Execute 方法,执行指定的查询、SQL 语句、存储过程或特定提供者的文本等内容。
       Label3.Caption = Label3.Caption & "已成功删除付款单据历史数据!   "
    End If
    newcnn.Close   '关闭连接
    MsgBox "数据维护结束!"
    Comdown.Caption = "维护结束"
    Comdown.Enabled = False
    y = 4
    Unload Me
 End If
End Sub
Private Sub Comup_Click()     '上一步操作
  If y <> 1 Then y = y - 1
  If y = 1 Then
     Frame1(0).Visible = True: Frame1(1).Visible = False
     Frame1(2).Visible = False: Frame1(3).Visible = False
  End If
  If y = 2 Then
     Frame1(1).Visible = True: Frame1(0).Visible = False
     Frame1(2).Visible = False: Frame1(3).Visible = False
  End If
  If y = 3 Then
     Frame1(2).Visible = True: Frame1(0).Visible = False
     Frame1(3).Visible = False: Frame1(1).Visible = False
  End If
  If y = 4 Then
     Frame1(3).Visible = True: Frame1(0).Visible = False
     Frame1(2).Visible = False: Frame1(1).Visible = False
  End If
  If y = 1 Then
     Comup.Enabled = False
  End If
  If y <> 4 Then Comdown.Caption = " 下一步"
End Sub
Private Sub comend_Click()
  Unload Me
  frm_main.Enabled = True
End Sub




⌨️ 快捷键说明

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