📄 frmgys.frm
字号:
VERSION 5.00
Begin VB.Form frmgys
BorderStyle = 3 'Fixed Dialog
Caption = "供应商设置"
ClientHeight = 5265
ClientLeft = 45
ClientTop = 330
ClientWidth = 5895
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5265
ScaleWidth = 5895
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
Height = 735
Left = 240
TabIndex = 16
Top = 4320
Width = 5415
Begin VB.CommandButton Command2
Caption = "保存"
Default = -1 'True
Height = 375
Left = 1920
TabIndex = 7
Top = 240
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "重设"
Height = 375
Left = 600
TabIndex = 6
Top = 240
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "返回"
Height = 375
Left = 3240
TabIndex = 8
Top = 240
Width = 1095
End
End
Begin VB.Frame Frame1
Caption = "供应商设置"
Height = 3855
Left = 240
TabIndex = 9
Top = 240
Width = 5415
Begin VB.TextBox Text
Height = 1095
Index = 5
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 5
Text = "frmgys.frx":0000
Top = 2520
Width = 4935
End
Begin VB.TextBox Text
Height = 270
Index = 4
Left = 1440
TabIndex = 4
Text = "Text1"
Top = 1920
Width = 2175
End
Begin VB.TextBox Text
Height = 270
Index = 3
Left = 1440
TabIndex = 3
Text = "Text1"
Top = 1560
Width = 2175
End
Begin VB.TextBox Text
Height = 270
Index = 2
Left = 1440
TabIndex = 2
Text = "Text1"
Top = 1200
Width = 2175
End
Begin VB.TextBox Text
Height = 270
Index = 1
Left = 1440
TabIndex = 1
Text = "Text1"
Top = 840
Width = 2175
End
Begin VB.TextBox Text
Height = 270
Index = 0
Left = 1440
TabIndex = 0
Text = "Text1"
Top = 480
Width = 2175
End
Begin VB.Label Label1
Caption = "其它信息:"
Height = 255
Index = 5
Left = 240
TabIndex = 15
Top = 2280
Width = 1335
End
Begin VB.Label Label1
Caption = "联系地址:"
Height = 255
Index = 4
Left = 240
TabIndex = 14
Top = 1920
Width = 975
End
Begin VB.Label Label1
Caption = "联系电话:"
Height = 255
Index = 3
Left = 240
TabIndex = 13
Top = 1560
Width = 1335
End
Begin VB.Label Label1
Caption = "联系人:"
Height = 255
Index = 2
Left = 240
TabIndex = 12
Top = 1200
Width = 1335
End
Begin VB.Label Label1
Caption = "供应商名称:"
Height = 255
Index = 1
Left = 240
TabIndex = 11
Top = 840
Width = 1335
End
Begin VB.Label Label1
Caption = "供应商编号:"
Height = 255
Index = 0
Left = 240
TabIndex = 10
Top = 480
Width = 1335
End
End
End
Attribute VB_Name = "frmgys"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2006/12/06
'描 述: 纯净水进销存管理系统 Ver 2.0
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Dim txtsql As String
Private Sub Command1_Click()
Dim t As Integer
t = 0
For t = 0 To 5
Text(t) = ""
Next
End Sub
Private Sub Command2_Click()
Dim t As Integer
For t = 0 To 4
If Text(t) = "" Then
MsgBox "请将信息输入完整,前五项为必填选项", vbExclamation, "输入提示"
Exit Sub
End If
Next
Dim sqlgys As String
Dim rsgys As ADODB.Recordset
sqlgys = "select * from 供应商表 where 供应商编号='" & Trim(Text(0).Text) & "'"
Set rsgys = ExeSQL(sqlgys)
If Not rsgys.EOF Then
If MsgBox("已经存在编号为" & Trim(Text(0).Text) & "的记录,是否覆盖记录", vbYesNo, "系统提示") = vbYes Then
sqlgys = "delete from 供应商表 where 供应商编号='" & Trim(Text(0).Text) & "'"
ExeSQL (sqlgys)
rsgys.Close
Set rsgys = Nothing
Else
rsgys.Close
Set rsgys = Nothing
Exit Sub
End If
End If
'sqlgys = "select 供应商编号,名称,联系人,联系电话,联系地址,备注 from 供应商表"
sqlgys = "insert into 供应商表 values('"
For t = 0 To 5
If t <> 5 Then
sqlgys = sqlgys & Trim(Text(t).Text) & "','"
Else
sqlgys = sqlgys & Trim(Text(t).Text) & "')"
End If
Next
ExeSQL (sqlgys)
MsgBox "输入成功,请返回", vbInformation, "系统提示"
Call Command1_Click
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
Private Sub Form_Load()
Call Command1_Click
End Sub
Private Sub Form_Unload(Cancel As Integer)
frmgysinfo.showdata
frmgysinfo.ShowTitle
Set frmgys = Nothing
End Sub
Public Sub showdata(txtsql As String)
Dim rsshow As ADODB.Recordset
Dim i As Integer
If txtsql = "" Then
txtsql = "select * from 供应商表"
End If
Set rsshow = ExeSQL(txtsql)
For i = 0 To rsshow.Fields.Count - 1
Text(i) = rsshow.Fields(i)
Next
rsshow.Close
Set rsshow = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -