这个商品销售管理系统实现了几乎所有的功能,并通过验收
源代码在线查看: frm商品信息管理.frm
VERSION 5.00
Begin VB.Form frm商品信息管理
BackColor = &H00FFFFFF&
Caption = "dbo.商品信息表"
ClientHeight = 5595
ClientLeft = 1110
ClientTop = 450
ClientWidth = 9180
LinkTopic = "Form2"
ScaleHeight = 5595
ScaleWidth = 9180
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdClose
Caption = "关闭(&C)"
Height = 300
Left = 7440
TabIndex = 20
Top = 3840
Width = 975
End
Begin VB.CommandButton cmdUpdate
Caption = "更新(&U)"
Height = 300
Left = 7440
TabIndex = 19
Top = 3360
Width = 975
End
Begin VB.CommandButton cmdRefresh
Caption = "刷新(&R)"
Height = 300
Left = 7440
TabIndex = 18
Top = 2880
Width = 975
End
Begin VB.CommandButton cmdDelete
Caption = "删除(&D)"
Height = 300
Left = 7440
TabIndex = 17
Top = 2400
Width = 975
End
Begin VB.CommandButton cmdAdd
Caption = "添加(&A)"
Height = 300
Left = 7440
TabIndex = 16
Top = 1920
Width = 975
End
Begin VB.Data Data1
Align = 2 'Align Bottom
Connect = "ODBC;DSN=info;UID=;PWD=;APP=VisData;WSID=COMPUTER;DATABASE=BMS;Trusted_Connection=Yes"
DatabaseName = ""
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 0
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "dbo.商品信息表"
Top = 5310
Width = 9180
End
Begin VB.TextBox txtFields
DataField = "库存数量"
DataSource = "Data1"
Height = 285
Index = 7
Left = 3600
MaxLength = 255
TabIndex = 15
Top = 4440
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "单价"
DataSource = "Data1"
Height = 285
Index = 6
Left = 3600
TabIndex = 13
Top = 4080
Width = 1935
End
Begin VB.TextBox txtFields
DataField = "单位"
DataSource = "Data1"
Height = 285
Index = 5
Left = 3600
MaxLength = 50
TabIndex = 11
Top = 3620
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "产地"
DataSource = "Data1"
Height = 285
Index = 4
Left = 3600
MaxLength = 50
TabIndex = 9
Top = 3280
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "规格"
DataSource = "Data1"
Height = 285
Index = 3
Left = 3600
MaxLength = 50
TabIndex = 7
Top = 2940
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "商品简称"
DataSource = "Data1"
Height = 285
Index = 2
Left = 3600
MaxLength = 50
TabIndex = 5
Top = 2600
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "商品名称"
DataSource = "Data1"
Height = 285
Index = 1
Left = 3600
MaxLength = 50
TabIndex = 3
Top = 2260
Width = 3375
End
Begin VB.TextBox txtFields
DataField = "商品编号"
DataSource = "Data1"
Height = 285
Index = 0
Left = 3600
MaxLength = 50
TabIndex = 1
Top = 1920
Width = 3375
End
Begin VB.Line Line4
BorderColor = &H00764E10&
BorderWidth = 2
X1 = 0
X2 = 9120
Y1 = 1680
Y2 = 1680
End
Begin VB.Line Line5
BorderColor = &H00764E10&
BorderWidth = 2
X1 = 0
X2 = 9120
Y1 = 5160
Y2 = 5160
End
Begin VB.Shape Shape1
Height = 3255
Left = 120
Top = 1800
Width = 8775
End
Begin VB.Image Image1
Height = 1095
Left = 240
Picture = "frm商品信息管理.frx":0000
Stretch = -1 'True
Top = 0
Width = 2175
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "小型自选商场商品管理系统"
BeginProperty Font
Name = "Arial"
Size = 27.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00764E10&
Height = 735
Left = 2280
TabIndex = 23
Top = 240
Width = 6855
End
Begin VB.Line Line1
BorderColor = &H00764E10&
BorderWidth = 2
X1 = 0
X2 = 9240
Y1 = 1200
Y2 = 1200
End
Begin VB.Line Line2
BorderColor = &H00764E10&
BorderWidth = 2
X1 = 6960
X2 = 7320
Y1 = 1200
Y2 = 960
End
Begin VB.Line Line3
BorderColor = &H00764E10&
BorderWidth = 2
X1 = 9240
X2 = 7320
Y1 = 960
Y2 = 960
End
Begin VB.Label loginbar
BackStyle = 0 'Transparent
BeginProperty Font
Name = "Verdana"
Size = 7.5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000C0&
Height = 375
Left = 7320
TabIndex = 22
Top = 960
Width = 1815
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "商品信息管理"
BeginProperty Font
Name = "Arial"
Size = 11.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00764E10&
Height = 255
Left = 3720
TabIndex = 21
Top = 1320
Width = 1935
End
Begin VB.Label lblLabels
Caption = "库存数量:"
Height = 255
Index = 7
Left = 1680
TabIndex = 14
Top = 4440
Width = 1815
End
Begin VB.Label lblLabels
Alignment = 2 'Center
Caption = "单价:"
Height = 255
Index = 6
Left = 1680
TabIndex = 12
Top = 4140
Width = 1815
End
Begin VB.Label lblLabels
Alignment = 2 'Center
Caption = "单位:"
Height = 255
Index = 5
Left = 1680
TabIndex = 10
Top = 3765
Width = 1815
End
Begin VB.Label lblLabels
Alignment = 2 'Center
Caption = "产地:"
Height = 255
Index = 4
Left = 1680
TabIndex = 8
Top = 3405
Width = 1815
End
Begin VB.Label lblLabels
Alignment = 2 'Center
Caption = "规格:"
Height = 255
Index = 3
Left = 1680
TabIndex = 6
Top = 3030
Width = 1815
End
Begin VB.Label lblLabels
Alignment = 2 'Center
Caption = "商品简称:"
Height = 255
Index = 2
Left = 1680
TabIndex = 4
Top = 2655
Width = 1815
End
Begin VB.Label lblLabels
Alignment = 2 'Center
Caption = "商品名称:"
Height = 255
Index = 1
Left = 1680
TabIndex = 2
Top = 2295
Width = 1815
End
Begin VB.Label lblLabels
Alignment = 2 'Center
Caption = "商品编号:"
Height = 255
Index = 0
Left = 1680
TabIndex = 0
Top = 1920
Width = 1815
End
End
Attribute VB_Name = "frm商品信息管理"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdAdd_Click()
Data1.Recordset.AddNew
End Sub
Private Sub cmdDelete_Click()
'如果删除记录集的最后一条记录
'记录或记录集中唯一的记录
Data1.Recordset.Delete
Data1.Recordset.MoveNext
End Sub
Private Sub cmdRefresh_Click()
'这仅对多用户应用程序才是需要的
Data1.Refresh
End Sub
Private Sub cmdUpdate_Click()
Data1.UpdateRecord
Data1.Recordset.Bookmark = Data1.Recordset.LastModified
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub Data1_Error(DataErr As Integer, Response As Integer)
'这就是放置错误处理代码的地方
'如果想忽略错误,注释掉下一行代码
'如果想捕捉错误,在这里添加错误处理代码
MsgBox "数据错误事件命中错误:" & Error$(DataErr)
Response = 0 '忽略错误
End Sub
Private Sub Data1_Reposition()
Screen.MousePointer = vbDefault
On Error Resume Next
'这将显示当前记录位置
'为动态集和快照
Data1.Caption = "记录:" & (Data1.Recordset.AbsolutePosition + 1)
'对于 Table 对象,当记录集创建后并使用下面的行时,
'必须设置 Index 属性
'Data1.Caption = "记录:" & (Data1.Recordset.RecordCount * (Data1.Recordset.PercentPosition * 0.01)) + 1
End Sub
Private Sub Data1_Validate(Action As Integer, Save As Integer)
'这是放置验证代码的地方
'当下面的动作发生时,调用这个事件
Select Case Action
Case vbDataActionMoveFirst
Case vbDataActionMovePrevious
Case vbDataActionMoveNext
Case vbDataActionMoveLast
Case vbDataActionAddNew
Case vbDataActionUpdate
Case vbDataActionDelete
Case vbDataActionFind
Case vbDataActionBookmark
Case vbDataActionClose
End Select
Screen.MousePointer = vbHourglass
End Sub
Private Sub Form_Load()
loginbar.Caption = "User = " & userid
End Sub
Private Sub loginbar_Click()
End Sub
|
相关资源 |
|
-
这个商品销售管理系统实现了几乎所有的功能,并通过验收
-
商品销售管理系统
1.首先确保您的机器上安装了SQL Server数据库。将SQL Server服务器名称改为JAMESLIN
-
该商品销售管理系统是一个基于WEB的适应于小型企业的管理系统!可以实现商品基本信息的查询。添加
-
本程序是自己写的一个关于学生管理系统,实现了查看所有学生信息,查找学生,删除学生,输入学生(按学号大小排列)功能.希望大家参考,指出需改进之处.
-
商品销售管理系统:随着信息技术的快速进步
-
java + sqlserver2000编写的一个网上购书系统,实现了一些基本的功能,但对于初学者来说这个系统已经足以起到帮助作用
-
网吧管理系统.
实现了网吧收费的管理.每小时设置2元,不足1小时扣除2元,1小时5分内扣除2元,以后扣除两小时的4元.
-
中专学校的学生操行分管理系统,包含了网络查询的功能
|