📄 main_xtsz_xtcsh.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form main_xtsz_xtcsh
BorderStyle = 1 'Fixed Single
Caption = "系统设置--【系统初始化】"
ClientHeight = 3660
ClientLeft = 2265
ClientTop = 3765
ClientWidth = 8565
Icon = "main_xtsz_xtcsh.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3660
ScaleWidth = 8565
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Comks
Caption = "开始"
Height = 390
Left = 4065
TabIndex = 21
Top = 3165
Width = 1470
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 360
Left = 105
TabIndex = 6
Top = 2715
Visible = 0 'False
Width = 8430
_ExtentX = 14870
_ExtentY = 635
_Version = 393216
Appearance = 1
End
Begin VB.CommandButton ComExit
Caption = "退出"
Height = 390
Left = 7035
TabIndex = 5
Top = 3165
Width = 1470
End
Begin VB.CommandButton Comcsh
Caption = "初始化"
Enabled = 0 'False
Height = 390
Left = 5550
TabIndex = 4
Top = 3165
Width = 1470
End
Begin VB.Frame Frame2
Caption = "各种单据"
Height = 1275
Left = 75
TabIndex = 3
Top = 1365
Width = 8445
Begin VB.CheckBox Check1
Caption = "本单位信息"
Height = 240
Index = 20
Left = 345
TabIndex = 27
Top = 780
Width = 1200
End
Begin VB.CheckBox Check1
Caption = "收款单"
Height = 240
Index = 19
Left = 5685
TabIndex = 26
Top = 375
Width = 870
End
Begin VB.CheckBox Check1
Caption = "库存信息"
Height = 240
Index = 18
Left = 4545
TabIndex = 25
Top = 375
Width = 1410
End
Begin VB.CheckBox Check1
Caption = "付款单"
Height = 240
Index = 17
Left = 6705
TabIndex = 24
Top = 375
Width = 1200
End
Begin VB.CheckBox Check1
Caption = "报溢票号"
Height = 240
Index = 16
Left = 4980
TabIndex = 23
Top = 1440
Visible = 0 'False
Width = 1200
End
Begin VB.CheckBox Check1
Caption = "报溢单"
Height = 240
Index = 15
Left = 3975
TabIndex = 22
Top = 1425
Visible = 0 'False
Width = 1200
End
Begin VB.CheckBox Check1
Caption = "报损票号"
Height = 240
Index = 14
Left = 2805
TabIndex = 20
Top = 1425
Visible = 0 'False
Width = 1200
End
Begin VB.CheckBox Check1
Caption = "退货返厂票号"
Height = 240
Index = 13
Left = 315
TabIndex = 19
Top = 1425
Visible = 0 'False
Width = 1410
End
Begin VB.CheckBox Check1
Caption = "报损单"
Height = 240
Index = 12
Left = 1815
TabIndex = 18
Top = 1425
Visible = 0 'False
Width = 870
End
Begin VB.CheckBox Check1
Caption = "退货返厂"
Height = 240
Index = 11
Left = 6000
TabIndex = 17
Top = 1410
Visible = 0 'False
Width = 1050
End
Begin VB.CheckBox Check1
Caption = "入库票号"
Height = 240
Index = 10
Left = 3465
TabIndex = 16
Top = 375
Width = 1125
End
Begin VB.CheckBox Check1
Caption = "入库单"
Height = 240
Index = 9
Left = 2505
TabIndex = 15
Top = 375
Width = 855
End
Begin VB.CheckBox Check1
Caption = "销售退货票号"
Height = 240
Index = 8
Left = 3420
TabIndex = 14
Top = 1275
Visible = 0 'False
Width = 1890
End
Begin VB.CheckBox Check1
Caption = "销售退单"
Height = 240
Index = 7
Left = 2235
TabIndex = 13
Top = 1275
Visible = 0 'False
Width = 1065
End
Begin VB.CheckBox Check1
Caption = "销售单"
Height = 240
Index = 6
Left = 345
TabIndex = 12
Top = 375
Width = 885
End
Begin VB.CheckBox Check1
Caption = "销售票号"
Height = 240
Index = 5
Left = 1335
TabIndex = 11
Top = 375
Width = 1410
End
End
Begin VB.Frame Frame1
Caption = "基础数据"
Height = 765
Left = 75
TabIndex = 1
Top = 450
Width = 8445
Begin VB.CheckBox Check1
Caption = "客户信息管理"
Height = 240
Index = 4
Left = 6660
TabIndex = 10
Top = 300
Width = 1410
End
Begin VB.CheckBox Check1
Caption = "供应商信息管理"
Height = 240
Index = 3
Left = 4950
TabIndex = 9
Top = 300
Width = 1890
End
Begin VB.CheckBox Check1
Caption = "仓库信息管理"
Height = 240
Index = 2
Left = 3405
TabIndex = 8
Top = 300
Width = 1410
End
Begin VB.CheckBox Check1
Caption = "商品信息管理"
Height = 240
Index = 0
Left = 360
TabIndex = 7
Top = 300
Width = 1440
End
Begin VB.CheckBox Check1
Caption = "职员信息管理"
Height = 240
Index = 1
Left = 1860
TabIndex = 2
Top = 300
Width = 1410
End
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "注意:系统初始化将清空系统数据"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 285
Left = 210
TabIndex = 0
Top = 75
Width = 4830
End
End
Attribute VB_Name = "main_xtsz_xtcsh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Activate()
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 Comks_Click() '开始
Comcsh.Enabled = True
End Sub
Private Sub Comcsh_Click()
Dim rs As ADODB.Recordset '定义数据集对象
Set rs = New ADODB.Recordset
Dim cnn As ADODB.Connection '定义数据连接
Set cnn = New ADODB.Connection
cnn.Open "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=Gcgl;Initial Catalog=Gcgl"
Dim connter As Integer '定义一个整型变量
Dim sql, workarea(200) As String '定义字符串变量
ProgressBar1.Visible = True
ProgressBar1.Max = UBound(workarea)
ProgressBar1.Value = ProgressBar1.Min
For Counter = LBound(workarea) To UBound(workarea)
workarea(Counter) = "initial value " & Counter
ProgressBar1.Value = Counter
'清空选定的表中的数据
If Check1(0).Value = 1 Then
sql = "delete spinf select * from spinf "
Set rs = cnn.Execute(sql)
End If
If Check1(1).Value = 1 Then
sql = "delete yginf select * from yginf "
Set rs = cnn.Execute(sql)
End If
If Check1(2).Value = 1 Then
sql = "delete ckinf select * from ckinf "
Set rs = cnn.Execute(sql)
End If
If Check1(3).Value = 1 Then
sql = "delete gys select * from gys"
Set rs = cnn.Execute(sql)
End If
If Check1(4).Value = 1 Then
sql = "delete kh select * from kh"
Set rs = cnn.Execute(sql)
End If
If Check1(6).Value = 1 Then
sql = "delete xsd select * from xsd"
Set rs = cnn.Execute(sql)
End If
If Check1(5).Value = 1 Then
sql = "delete xsph select * from xsph"
Set rs = cnn.Execute(sql)
End If
If Check1(9).Value = 1 Then
sql = "delete rkd select * from rkd"
Set rs = cnn.Execute(sql)
End If
If Check1(10).Value = 1 Then
sql = "delete rkph select * from rkph"
Set rs = cnn.Execute(sql)
End If
If Check1(18).Value = 1 Then
sql = "delete kc select * from kc"
Set rs = cnn.Execute(sql)
End If
If Check1(17).Value = 1 Then
sql = "delete gysmx select * from gysmx"
Set rs = cnn.Execute(sql)
End If
If Check1(19).Value = 1 Then
sql = "delete khmx select * from khmx"
Set rs = cnn.Execute(sql)
End If
If Check1(20).Value = 1 Then
sql = "delete bdwdy select * from bdwdy"
Set rs = cnn.Execute(sql)
End If
Next Counter
ProgressBar1.Visible = False
ProgressBar1.Value = ProgressBar1.Min
cnn.Close
Comcsh.Enabled = False
End Sub
Private Sub ComExit_Click()
frm_main.Enabled = True
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -