📄 frmbomexp.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{E684D8A3-716C-4E59-AA94-7144C04B0074}#1.1#0"; "GRIDEX20.OCX"
Begin VB.Form frmBomExp
Caption = "Form1"
ClientHeight = 8085
ClientLeft = 3930
ClientTop = 4590
ClientWidth = 11355
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 8085
ScaleWidth = 11355
Begin GridEX20.GridEX Grid
Height = 5790
Left = 600
TabIndex = 0
Top = 1050
Width = 9330
_ExtentX = 16457
_ExtentY = 10213
Version = "2.0"
BoundColumnIndex= ""
ReplaceColumnIndex= ""
MethodHoldFields= -1 'True
Options = 8
AllowColumnDrag = 0 'False
RecordsetType = 1
AllowEdit = 0 'False
GroupByBoxVisible= 0 'False
DataMode = 1
ColumnHeaderHeight= 270
IntProp2 = 0
ColumnsCount = 2
Column(1) = "frmBomExp.frx":0000
Column(2) = "frmBomExp.frx":00C8
FormatStylesCount= 5
FormatStyle(1) = "frmBomExp.frx":016C
FormatStyle(2) = "frmBomExp.frx":02B0
FormatStyle(3) = "frmBomExp.frx":0360
FormatStyle(4) = "frmBomExp.frx":0414
FormatStyle(5) = "frmBomExp.frx":04EC
ImageCount = 0
PrinterProperties= "frmBomExp.frx":05A4
End
Begin MSComctlLib.Toolbar Toolbar
Align = 1 'Align Top
Height = 555
Left = 0
TabIndex = 1
Top = 0
Width = 11355
_ExtentX = 20029
_ExtentY = 979
ButtonWidth = 820
ButtonHeight = 926
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 7
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "刷新"
Key = "tlbUpdate"
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "新增"
Key = "tlbNew"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "修改"
Key = "tlbModify"
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除"
Key = "tlbDelete"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "tlbClose"
EndProperty
EndProperty
BorderStyle = 1
End
End
Attribute VB_Name = "frmBomExp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rstGrid As New ADODB.Recordset
Private Sub Form_Load()
Me.Caption = "基础资料--仓库资料"
Me.Icon = frmMain.Icon
Update
With Me
'----- 设置 ToolBar 属性 -----
.Toolbar.ImageList = frmMain.Image
.Toolbar.Buttons.Item("tlbUpdate").Image = "Design"
.Toolbar.Buttons.Item("tlbNew").Image = "New"
.Toolbar.Buttons.Item("tlbModify").Image = "Modify"
.Toolbar.Buttons.Item("tlbDelete").Image = "Del"
.Toolbar.Buttons.Item("tlbClose").Image = "Store"
End With
End Sub
Public Sub Update()
If rstGrid.State = 1 Then rstGrid.Close
Set rstGrid = Nothing
rstGrid.CursorLocation = adUseClient
rstGrid.Open "select * from StockInfo", con, adOpenStatic, adLockOptimistic
Set Grid.ADORecordset = rstGrid
Grid.Columns(1).Visible = False
Grid.Columns(2).Caption = "物品编码"
Grid.Columns(3).Caption = "物品名称"
Grid.Columns(4).Caption = "单价"
Grid.Columns(5).Caption = "数量"
Grid.Columns(6).Caption = "金额"
Grid.Columns(7).Visible = False
ColumnCenter Grid
End Sub
Public Sub EditBill()
If rstGrid.RecordCount < 1 Then
Message "无可用信息!"
Exit Sub
End If
frmBomInput.ZOrder
frmBomInput.EditBill rstGrid.Fields("GoodsID")
End Sub
Private Sub Toolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "tlbUpdate"
Update
Case "tlbNew"
frmBomInput.ZOrder
frmBomInput.NewBill
Case "tlbModify"
EditBill
Case "tlbDelete"
If rstGrid.RecordCount < 1 Then
Message "无可用信息!"
Exit Sub
End If
If QueryDly("确定删除物品编码为<" & rstGrid.Fields("Goodscode") & ">?") = True Then
rstGrid.Delete
rstGrid.UpdateBatch
Update
End If
Case "tlbClose"
Unload Me
End Select
End Sub
Private Sub Grid_DblClick()
EditBill
End Sub
Private Sub Form_Resize()
On Error Resume Next
Grid.Move 0, Me.Toolbar.Height, Me.ScaleWidth, Me.ScaleHeight - Me.Toolbar.Height
End Sub
Private Sub Form_Unload(Cancel As Integer)
If rstGrid.State = 1 Then rstGrid.Close
Set rstGrid = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -