📄 gys.frm
字号:
Left = 240
TabIndex = 21
Top = 2880
Width = 1080
End
Begin VB.CommandButton Cmd_exit
Caption = "EXIT"
Height = 350
Left = 240
TabIndex = 18
Top = 2400
Width = 1020
End
Begin VB.CommandButton Cmd_save
Caption = "SAVE"
Height = 350
Left = 255
TabIndex = 17
Top = 1830
Width = 1020
End
Begin VB.CommandButton Cmd_edit
Caption = "EDIT"
Height = 350
Left = 255
TabIndex = 16
Top = 1335
Width = 1020
End
Begin VB.CommandButton Cmd_del
Caption = "DEL"
Height = 350
Left = 255
TabIndex = 15
Top = 825
Width = 1020
End
Begin VB.CommandButton Cmd_Add
Caption = "ADD"
Height = 350
Left = 255
TabIndex = 14
Top = 345
Width = 1020
End
End
Begin VB.Frame Frame1
Height = 3585
Left = 75
TabIndex = 0
Top = 30
Width = 3360
Begin VB.TextBox Text1
BackColor = &H80000018&
Height = 945
Index = 5
Left = 1485
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 12
Top = 2520
Width = 1725
End
Begin VB.TextBox Text1
BackColor = &H80000018&
Height = 300
Index = 4
Left = 1485
TabIndex = 10
Top = 2055
Width = 1710
End
Begin VB.TextBox Text1
BackColor = &H80000018&
Height = 300
Index = 3
Left = 1485
TabIndex = 8
Top = 1590
Width = 1710
End
Begin VB.TextBox Text1
BackColor = &H80000018&
Height = 300
Index = 2
Left = 1485
TabIndex = 6
Top = 1125
Width = 1710
End
Begin VB.TextBox Text1
BackColor = &H80000018&
Height = 300
Index = 1
Left = 1485
TabIndex = 4
Top = 675
Width = 1710
End
Begin VB.TextBox Text1
BackColor = &H80000018&
Height = 300
Index = 0
Left = 1485
TabIndex = 2
Top = 225
Width = 1710
End
Begin VB.Label Label7
Height = 255
Left = 120
TabIndex = 20
Top = 3000
Width = 1215
End
Begin VB.Label Label6
Caption = "备注"
Height = 435
Left = 375
TabIndex = 11
Top = 2625
Width = 990
End
Begin VB.Label Label5
Caption = "传真"
Height = 300
Left = 375
TabIndex = 9
Top = 2160
Width = 1005
End
Begin VB.Label Label4
Caption = "联系电话"
Height = 255
Index = 0
Left = 375
TabIndex = 7
Top = 1710
Width = 975
End
Begin VB.Label Label3
Caption = "业务联系人"
Height = 300
Left = 375
TabIndex = 5
Top = 1260
Width = 1065
End
Begin VB.Label Label2
Caption = "供应商名称"
Height = 315
Left = 375
TabIndex = 3
Top = 795
Width = 1050
End
Begin VB.Label Label1
Caption = "供应商编号"
Height = 285
Left = 375
TabIndex = 1
Top = 300
Width = 1155
End
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 5400
Top = 1440
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 300
Left = 0
TabIndex = 27
Top = 4920
Width = 7380
_ExtentX = 13018
_ExtentY = 529
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 4304
MinWidth = 4304
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Alignment = 1
AutoSize = 1
Object.Width = 5080
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 3528
MinWidth = 3528
EndProperty
EndProperty
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 255
Left = 5280
TabIndex = 25
Top = 4920
Width = 2055
_ExtentX = 3625
_ExtentY = 450
_Version = 393216
Appearance = 0
Scrolling = 1
End
Begin VB.Label Label4
Alignment = 2 'Center
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 285
Index = 1
Left = 5040
TabIndex = 24
Top = 1920
Width = 2295
End
Begin VB.Image Image1
BorderStyle = 1 'Fixed Single
DataField = "bindata"
DataSource = "Adodc1"
Height = 1815
Left = 5040
Stretch = -1 'True
Top = 120
Width = 2295
End
End
Attribute VB_Name = "gys"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public m_CRC As clsCRC
Public bCancel As Boolean
Dim srcDB As String
Dim ask As Boolean
Dim response As Integer
Const Blocksize = 32768
Dim i As Integer '用于FOR循环中的变量
Dim StrNum As Long '定义一个用于保存编号信息的变量
Dim ETemp As Integer '定义一个标识变量,用于标识添加的日志
'*** “添加”供应商信息按钮的事件过程 ***
Private Sub Cmd_Add_Click()
On Error Resume Next
For i = 0 To 5
Text1(i).Text = ""
Next i
Adodc1.RecordSource = "select * from tb_gys order by gys_id"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
Adodc1.Recordset.MoveLast
StrNum = Val(Adodc1.Recordset.Fields("gys_IDs")) + 1
'Len函数用于取字符串的长度,Trim函数用于去除字符串中的空格,关于这两个函数的具体用法
'请参阅明日公司《Visual Basic编程词典》中的函数应用部分 网址 www.cccxy.com
Select Case Len(Trim(StrNum)) '位数不足则用0补其
Case 1
strtemp = "00000"
Case 2
strtemp = "0000"
Case 3
strtemp = "000"
Case 4
strtemp = "00"
Case 5
strtemp = "0"
Case 6
strtemp = ""
End Select
Text1(0).Text = "GYS" & Trim(strtemp) & Trim(Str(StrNum)) '在文本框中显示供应商编号信息
Else
Text1(0).Text = "GYS000001" '如果数据库中没有记录,则给供应商编号赋一个初值
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -