?? frmsaleorder.frm
字號(hào):
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmSaleOrder
Caption = "Form1"
ClientHeight = 7005
ClientLeft = 60
ClientTop = 345
ClientWidth = 9885
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 7005
ScaleWidth = 9885
Begin ClassSystem.ExcelGrid ExcelGrid1
Height = 3375
Left = 120
TabIndex = 0
Top = 720
Width = 7335
_extentx = 12938
_extenty = 5953
displaytoolbar = 0 'False
End
Begin MSComctlLib.Toolbar topToolbar
Align = 1 'Align Top
Height = 555
Left = 0
TabIndex = 1
Top = 0
Width = 9885
_ExtentX = 17436
_ExtentY = 979
ButtonWidth = 1058
ButtonHeight = 926
Appearance = 1
Style = 1
ImageList = "toolbarImageList1"
HotImageList = "toolbarImageList2"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 7
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "新加"
Key = "Insert"
Object.ToolTipText = "新加"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "修改"
Key = "Update"
Object.ToolTipText = "修改"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "作廢"
Key = "Delete"
Object.ToolTipText = "刪除"
ImageIndex = 4
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "審批"
Key = "App"
Object.ToolTipText = "生成相關(guān)出庫(kù)單"
ImageIndex = 5
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "歸檔"
ImageIndex = 6
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退貨"
ImageIndex = 7
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = " 退 出 "
Key = "Exit"
Object.ToolTipText = " 退 出"
ImageIndex = 11
EndProperty
EndProperty
BorderStyle = 1
Begin MSComctlLib.ImageList toolbarImageList2
Left = 8040
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 15
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 11
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":0542
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":0A84
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":0FC6
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":1162
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":16A4
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":19F8
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":1D4C
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":228E
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":27D0
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":2D12
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList toolbarImageList1
Left = 7320
Top = 0
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 15
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 11
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":2E1C
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":335E
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":38A0
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":3DE2
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":3F7C
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":44BE
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":4812
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":4B66
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":50A8
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":55EA
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmSaleOrder.frx":5B2C
Key = ""
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "frmSaleOrder"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public sCustID As String
Public sCustName As String
Private Sub Form_Load()
'button
If g_ButtonArrange Then
topToolbar.TextAlignment = tbrTextAlignBottom
Else
topToolbar.TextAlignment = tbrTextAlignRight
End If
'caption
Me.Caption = "客戶銷售訂單" + IIf(sCustID = "", "", "----[" + sCustName + "]")
RefreshData
End Sub
Private Sub Form_Unload(Cancel As Integer)
sCustID = ""
sCustName = ""
End Sub
Private Sub topToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim objOrder As New clsOrder
Select Case Button.Key
Case "Exit"
Unload Me
Case "Insert"
With frmSaleOrderInsert
.Show vbModal
End With
Case "Update"
With frmSaleOrderUpdate
.Show vbModal
End With
Case "Delete"
With objOrder
.m_OrderNo = Me.ExcelGrid1.DataRecordset.Fields("OrderNo").value
If .BatchSubmit(.Delete()) Then
Call RefreshData
End If
End With
Case "App"
objOrder.m_OrderNo = Me.ExcelGrid1.DataRecordset.Fields("OrderNo").value
If Me.ExcelGrid1.DataRecordset.Fields("WarehouseID").value = vbNullGUID Then
'自動(dòng)扣除在途的可用庫(kù)存
Call objOrder.BatchSubmit(objOrder.AppSQL() + objOrder.BuildCalculateQtySQL())
Else
'生成出入庫(kù)單(會(huì)自動(dòng)扣除可用庫(kù)存)
Call objOrder.BatchSubmit(objOrder.AppSQL() + objOrder.BuildWarehouseOrderSQL())
End If
End Select
Set objOrder = Nothing
End Sub
Private Sub Form_Resize()
On Error Resume Next
ExcelGrid1.Left = 10
ExcelGrid1.Width = Me.Width - 20
ExcelGrid1.Top = topToolbar.Top + topToolbar.Height + 100
ExcelGrid1.Height = Me.Height - ExcelGrid1.Top - 300
Err.Clear
End Sub
Public Sub RefreshData()
Dim objOrder As New clsOrder
ExcelGrid1.RelativeGrid objOrder.GetList(, IIf(sCustID = "", "OrderType='銷售訂單' ", "OrderType='銷售訂單' and CustomerID=" + CheckString(sCustID))), "OrderNo,OrderType,OrderStatus,CustomerID,Address,Contactee,Tel,Fax,Email,Fee,WarehouseID,CommodityID,Price,PQty,RQty,PAmount,RAmount", "OrderNo,OrderType,OrderStatus,CustomerID,Address,Contactee,Tel,Fax,Email,Fee,WarehouseID,CommodityID,Price,PQty,RQty,PAmount,RAmount"
If ExcelGrid1.DataRecordset.RecordCount = 0 Then
topToolbar.Buttons("Update").Enabled = False
topToolbar.Buttons("Delete").Enabled = False
Else
topToolbar.Buttons("Update").Enabled = True
topToolbar.Buttons("Delete").Enabled = True
End If
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -