www.pudn.com > jxc001.rar > FrmFindUnPr.frm
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmFindUnPr
BorderStyle = 3 'Fixed Dialog
Caption = "物品单价列表"
ClientHeight = 4545
ClientLeft = 45
ClientTop = 330
ClientWidth = 7005
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4545
ScaleWidth = 7005
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton CmdFind
Cancel = -1 'True
Caption = "取消(&C)"
Height = 315
Index = 1
Left = 5580
TabIndex = 2
Top = 1200
Width = 1155
End
Begin VB.CommandButton CmdFind
Caption = "确定(&O)"
Default = -1 'True
Height = 315
Index = 0
Left = 5580
TabIndex = 1
Top = 480
Width = 1155
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmFindUnPr.frx":0000
Height = 4515
Left = 0
TabIndex = 0
Top = 0
Width = 5235
_ExtentX = 9234
_ExtentY = 7964
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = -1 'True
HeadLines = 1
RowHeight = 15
TabAcrossSplits = -1 'True
TabAction = 2
WrapCellPointer = -1 'True
FormatLocked = -1 'True
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
DataMember = "ComMatDetail"
ColumnCount = 3
BeginProperty Column00
DataField = "p_id"
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 = "qty"
Caption = "数量"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "#,##0.0000"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "unit_price"
Caption = "单价"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 1
Format = "0.00"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnAllowSizing= 0 'False
ColumnWidth = 1184.882
EndProperty
BeginProperty Column01
ColumnAllowSizing= 0 'False
ColumnWidth = 1275.024
EndProperty
BeginProperty Column02
ColumnAllowSizing= 0 'False
ColumnWidth = 2085.166
EndProperty
EndProperty
End
End
Attribute VB_Name = "FrmFindUnPr"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rsProUnPr As ADODB.Recordset
Public strFindUnPr As String
Private Sub CmdFind_Click(Index As Integer)
Select Case Index
Case 0
strFindUnPr = DataGrid1.Columns.Item(2).Value
Case 1
strFindUnPr = ""
End Select
Unload Me
End Sub
Private Sub Form_Load()
Set rsProUnPr = DEjxc.rsComMatDetail
If strFindUnPr = "" Then
rsProUnPr.Filter = "p_id<>''"
Else
rsProUnPr.Filter = "p_id='" & strFindUnPr & "'"
End If
If rsProUnPr.RecordCount = 0 Then
CmdFind(0).Enabled = False
Else
CmdFind(0).Enabled = True
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
rsProUnPr.Close
Set rsProUnPr = Nothing
End Sub