服装销售系统,VB开发.没有解压密码
源代码在线查看: frm商品编码查询.frm
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#2.0#0"; "THREED20.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frm商品编码查询
BorderStyle = 3 'Fixed Dialog
Caption = "商品编码查询"
ClientHeight = 5850
ClientLeft = 45
ClientTop = 330
ClientWidth = 10710
Icon = "frm商品编码查询.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 5850
ScaleWidth = 10710
ShowInTaskbar = 0 'False
Begin MSDataGridLib.DataGrid grdR
Align = 2 'Align Bottom
Height = 3600
Left = 0
TabIndex = 12
Top = 1815
Width = 10710
_ExtentX = 18891
_ExtentY = 6350
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin ComctlLib.StatusBar AD
Align = 2 'Align Bottom
Height = 435
Left = 0
TabIndex = 11
Top = 5415
Width = 10710
_ExtentX = 18891
_ExtentY = 767
SimpleText = ""
_Version = 327682
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 3
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 2
TextSave = ""
Key = "MSG"
Object.Tag = ""
EndProperty
BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7}
TextSave = ""
Key = ""
Object.Tag = ""
EndProperty
BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7}
AutoSize = 1
Object.Width = 13705
TextSave = ""
Key = ""
Object.Tag = ""
EndProperty
EndProperty
End
Begin VB.Frame Frame1
Caption = "条件"
Height = 810
Left = 105
TabIndex = 5
Top = 840
Width = 10350
Begin VB.TextBox txtSname
Height = 285
Left = 6975
TabIndex = 2
Top = 360
Width = 1620
End
Begin VB.TextBox txtCode
Height = 285
Left = 3885
TabIndex = 1
Top = 330
Width = 1620
End
Begin VB.TextBox txtIncode
Height = 270
Left = 1185
TabIndex = 0
Top = 338
Width = 1260
End
Begin VB.Label Label6
AutoSize = -1 'True
Height = 180
Left = 6915
TabIndex = 9
Top = 855
Width = 90
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "品 名"
Height = 180
Left = 6225
TabIndex = 8
Top = 405
Width = 630
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "商品条码"
Height = 180
Left = 3030
TabIndex = 7
Top = 375
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "商品编码"
Height = 180
Left = 390
TabIndex = 6
Top = 390
Width = 720
End
End
Begin VB.PictureBox Picture1
Align = 1 'Align Top
Appearance = 0 'Flat
BackColor = &H80000004&
ForeColor = &H80000008&
Height = 612
Left = 0
ScaleHeight = 585
ScaleWidth = 10680
TabIndex = 3
Top = 0
Width = 10710
Begin MSComDlg.CommonDialog dlgPrinter
Left = 5376
Top = 72
_ExtentX = 688
_ExtentY = 688
_Version = 393216
End
Begin Threed.SSCommand cmdQuery
Height = 570
Left = 60
TabIndex = 10
TabStop = 0 'False
Top = -15
Width = 1170
_ExtentX = 2064
_ExtentY = 1005
_Version = 131073
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "查询[&Q]"
ButtonStyle = 3
PictureAlignment= 6
End
Begin Threed.SSCommand cmdExit
Height = 570
Left = 1245
TabIndex = 4
TabStop = 0 'False
Top = 0
Width = 1170
_ExtentX = 2064
_ExtentY = 1005
_Version = 131073
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Caption = "退出[&X]"
ButtonStyle = 3
PictureAlignment= 6
End
End
End
Attribute VB_Name = "frm商品编码查询"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public Rs As New ADODB.Recordset '用于只打开单记录集时
Private Function GenerateQuerySQL() As String
Dim strTemp As String
sSQL = "SELECT * FROM 商品主档"
If txtIncode.Text "" Then
strTemp = strTemp & " 商品编码 " & _
AnalyseCondition(txtIncode.Text, True) & " AND "
End If
If txtCode.Text "" Then
strTemp = strTemp & " 商品条码 " & _
AnalyseCondition(txtCode.Text, True) & " AND "
End If
If txtSname.Text "" Then
strTemp = strTemp & " 品名 " & _
AnalyseCondition(txtSname.Text, True) & " AND "
End If
If strTemp "" Then
'去掉末尾的 " AND "
sSQL = sSQL & " WHERE " & Mid(strTemp, 1, Len(strTemp) - 4)
End If
sSQL = sSQL & " ORDER BY 商品编码,商品条码,品名,单位,进价,税率,含税进价,零售价"
GenerateQuerySQL = sSQL
End Function
Private Sub cmdExit_Click()
Set Rs = Nothing
Set RsTemp = Nothing
Unload Me
End Sub
Private Sub cmdQuery_Click()
On Error Resume Next
sSQL = GenerateQuerySQL()
Set Rs = Nothing
Rs.Open sSQL, Conn, adOpenStatic, adLockReadOnly
If Rs.EOF Then
MsgBox "无匹配记录!", vbInformation, "提示窗口"
Exit Sub
End If
Set grdR.DataSource = Rs
grdR.Refresh
AD.Panels("MSG").Text = "查询结果数量为:" & Rs.RecordCount
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then SendKeys "{TAB}"
End Sub
Private Sub txtPrd_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Call cmdQuery_Click
End If
End Sub
Private Sub Form_Load()
Call SetFormToCenter(Me)
End Sub