www.pudn.com > Pepsi_five.rar > FrmSetMattmp.frm
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmSetMattmp
BorderStyle = 3 'Fixed Dialog
Caption = "期初库存情况录入"
ClientHeight = 5325
ClientLeft = 45
ClientTop = 330
ClientWidth = 4995
ControlBox = 0 'False
Icon = "FrmSetMattmp.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5325
ScaleWidth = 4995
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Caption = "状态提示"
Height = 615
Left = 60
TabIndex = 2
Top = 4080
Width = 4875
Begin VB.Label LblPro
Height = 255
Left = 180
TabIndex = 3
Top = 240
Width = 4455
End
End
Begin VB.CommandButton ComExit
Caption = "返回"
Height = 315
Left = 1860
TabIndex = 1
Top = 4860
Width = 1215
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "FrmSetMattmp.frx":0442
Height = 3975
Left = 60
TabIndex = 0
Top = 60
Width = 4875
_ExtentX = 8599
_ExtentY = 7011
_Version = 393216
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 = "ComMatHead"
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 = "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
Locked = -1 'True
WrapText = -1 'True
ColumnWidth = 900.284
EndProperty
BeginProperty Column01
Alignment = 1
ColumnAllowSizing= 0 'False
WrapText = -1 'True
ColumnWidth = 1500.095
EndProperty
BeginProperty Column02
Alignment = 1
ColumnAllowSizing= 0 'False
WrapText = -1 'True
ColumnWidth = 1800
EndProperty
EndProperty
End
End
Attribute VB_Name = "FrmSetMattmp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private rsPro As ADODB.Recordset
Private rsMat As ADODB.Recordset
Private Sub ComExit_Click()
Unload Me
End Sub
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
With rsPro
If .RecordCount <> 0 Then
.MoveFirst
.Find "p_id='" & Trim(DataGrid1.Columns.Item(0).Value) & "'"
LblPro.Caption = !product_name & " " & !product_model
End If
End With
End Sub
Private Sub Form_Load()
Set rsPro = DEjxc.rsComProduct
Set rsMat = DEjxc.rsComMatHead
rsPro.Open
End Sub
Private Sub Form_Unload(Cancel As Integer)
rsMat.UpdateBatch
rsPro.Close
rsMat.Close
Set rsPro = Nothing
Set rsMat = Nothing
End Sub