📄 frmhwod.frm
字号:
EndProperty
BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "前移"
Key = "PRE_SYSTABLE"
ImageIndex = 6
EndProperty
BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "后移"
Key = "NEX_SYSTABLE"
ImageIndex = 7
EndProperty
BeginProperty Button13 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "最后"
Key = "LAS_SYSTABLE"
ImageIndex = 8
EndProperty
BeginProperty Button14 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button15 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "查找"
Key = "FIN_SYSTABLE"
ImageIndex = 2
EndProperty
BeginProperty Button16 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button17 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
Key = "PRN_SYSTABLE"
ImageIndex = 1
EndProperty
BeginProperty Button18 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button19 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "帮助"
Key = "HLP_SYSTABLE"
ImageIndex = 10
EndProperty
BeginProperty Button20 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button21 {66833FEA-8583-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Button22 {66833FEA-8583-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Button23 {66833FEA-8583-11D1-B16A-00C0F0283628}
EndProperty
BeginProperty Button24 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
Key = "EXI_SYSTABLE"
ImageIndex = 11
EndProperty
EndProperty
BorderStyle = 1
End
Begin MSComctlLib.ImageList Img
Index = 0
Left = 0
Top = 300
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 21
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":0542
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":0A84
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":0FC6
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":10D8
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":162A
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":1B7C
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":20CE
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2620
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2732
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2844
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2956
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2A68
Key = ""
EndProperty
BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2B7A
Key = ""
EndProperty
BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2C8C
Key = ""
EndProperty
BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2D9E
Key = ""
EndProperty
BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":2EB0
Key = ""
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":31CA
Key = ""
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":32DC
Key = ""
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":33F0
Key = ""
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmHwod.frx":3504
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mFile
Caption = "文件(&F)"
Begin VB.Menu muFile
Caption = ""
Index = 0
End
End
Begin VB.Menu mEdit
Caption = "编辑(&E)"
Begin VB.Menu muEdit
Caption = ""
Index = 0
End
End
Begin VB.Menu mView
Caption = "查看(&V)"
Begin VB.Menu muView
Caption = ""
Index = 0
End
End
Begin VB.Menu mHelp
Caption = "帮助(&H)"
Begin VB.Menu muHelp
Caption = ""
Index = 0
End
End
End
Attribute VB_Name = "frmHwod"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Const TlbHwod = 0
Const ImgHwod = 0
Const SbarHwod = 0
Const FrmHwodh = 0
Const FlexHwodh = 1
Const FlexHwod = 0
Const TxtHwodhDocno = 0
Const TxtHwodhDat = 6
Const TxtHwodh_CwqjCode = 5
Const CBxHwodh_HwIoRcCode = 0
Const TxtTotalQty = 1
Const TxtTotalAmt = 2
Dim mCurColOldValue As String
Dim oHwodhs As Hwodhs
Dim oHwodh As Hwodh
Dim oHwod As Hwod
Public Sub LetDocno(vDocno As String)
On Error GoTo Errorhandle
Text(TxtHwodhDocno).Text = vDocno
Text_LostFocus TxtHwodhDocno
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub Combo_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
On Error GoTo Errorhandle
gPublicFunction.FormKeyDown Me, KeyCode, Shift, Combo(Index)
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_AfterEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long)
On Error GoTo Errorhandle
SetControlToFlex
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_BeforeEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long, Cancel As Boolean)
On Error GoTo Errorhandle
If Tlbaction(TlbHwod).Tag = "" Then
Cancel = True
End If
If oHwodh Is Nothing Then
Cancel = True
End If
mCurColOldValue = Trim(Flex(FlexHwod).TextMatrix(Flex(FlexHwod).Row, Flex(FlexHwod).Col))
Select Case Flex(FlexHwod).ColKey(Col)
Case "HWBMCODE"
Case "HWCKMC", "HWOD_HWDWCONV", "HWODQTY", "HWODPRICE", "HWODAMT", "HWODBZ"
If oHwod Is Nothing Then
Cancel = True
End If
Case "HWDWCODE"
If oHwod Is Nothing Then
Cancel = True
End If
Case Else
Cancel = True
End Select
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
On Error GoTo Errorhandle
gPublicFunction.FlexKeyDown Flex(Index), KeyCode
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_KeyDownEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long, KeyCode As Integer, ByVal Shift As Integer)
On Error GoTo Errorhandle
gPublicFunction.FlexKeyDown Flex(Index), KeyCode
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Flex_KeyPressEdit(Index As Integer, ByVal Row As Long, ByVal Col As Long, KeyAscii As Integer)
On Error GoTo Errorhandle
gPublicFunction.FlexInputCheck Me, Flex(Index), KeyAscii
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Form_Activate()
On Error GoTo Errorhandle
Text(TxtHwodhDocno).SetFocus
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub Form_Load()
On Error GoTo Errorhandle
Flex(FlexHwod).Editable = flexEDKbdMouse
Flex(FlexHwod).ColKey(1) = "HWBMCODE"
Flex(FlexHwod).ColKey(2) = "HWBMMC"
Flex(FlexHwod).ColKey(3) = "HWDWCODE"
Flex(FlexHwod).ColKey(4) = "HWOD_HWDWCONV"
Flex(FlexHwod).ColKey(5) = "HWCKMC"
Flex(FlexHwod).ColKey(6) = "HWODQTY"
Flex(FlexHwod).ColKey(7) = "HWODPRICE"
Flex(FlexHwod).ColKey(8) = "HWODAMT"
Flex(FlexHwod).ColKey(9) = "HWODBZ"
gPublicFunction.LoadFormSet Me, Tlbaction(TlbHwod), Img(ImgHwod), SBar(SbarHwod)
gPublicCommon.gForms(UCase(Me.Name)).ControlBegEnds.Add "Hwod", "TXTHwodHDOCNO", "CBXHWIORCCODE"
gPublicCommon.gForms(UCase(Me.Name)).ControlStatus.Add "", Flex(FlexHwod), Text(TxtHwodhDocno)
gPublicCommon.gForms(UCase(Me.Name)).ControlStatus.Add "ADD", Text(TxtTotalQty), Text(TxtTotalAmt)
gPublicCommon.gForms(UCase(Me.Name)).ControlStatus.Add "CHG", Text(TxtTotalQty), Text(TxtTotalAmt)
gPublicCommon.PublicFunction.EnableControl Me, ""
gPublicFunction.FillComboWithSql Me, Combo(CBxHwodh_HwIoRcCode), "SELECT HwIoRcCODE,HwIoRcNO FROM HwIoRcREC ORDER BY HwIoRcCODE", "HwIoRcNO", 0
Exit Sub
Errorhandle:
MsgBox Err.Description
End Sub
Private Sub LoadDataIntoGrid()
Dim ItemStr As String
Dim mHwodh As Hwodh
Dim mHwod As Hwod
On Error GoTo Errorhandle
Flex(FlexHwod).Rows = 1
Flex(FlexHwod).AddItem ""
oHwodh.Hwods.FillbyDb oHwodh
For Each mHwod In oHwodh.Hwods
ItemStr = vbTab & mHwod.Hwod_HwBmCode & vbTab & mHwod.Hwod_HwBmMc
ItemStr = ItemStr & vbTab & mHwod.Hwod_HwDwCode & vbTab & mHwod.Hwod_HwDwConv & vbTab & mHwod.Hwod_HwCkMc
ItemStr = ItemStr & vbTab & mHwod.HwodQty & vbTab & mHwod.HwodPrice & vbTab & mHwod.HwodAmt & vbTab & mHwod.HwodBz
Flex(FlexHwod).AddItem ItemStr, Flex(FlexHwod).Rows - 1
Flex(FlexHwod).RowData(Flex(FlexHwod).Rows - 2) = mHwod.HwodKey
Next
If Flex(FlexHwod).Rows > 2 Then
Flex(FlexHwod).Row = 1
Set oHwod = oHwodh.Hwods(CStr(Flex(FlexHwod).RowData(1)))
Else
Set oHwod = Nothing
End If
gPublicFunction.SumFlexQtyAmt Flex(FlexHwod), "HWODQTY,HWODAMT", Text(TxtTotalQty), Text(TxtTotalAmt)
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub AddRecord(RecordName As String)
On Error GoTo Errorhandle
Set oHwodh = New Hwodh
Set oHwod = Nothing
Clearcontrol
Text(TxtHwodhDocno).SetFocus
If Text(TxtHwodhDat).Text = "" Then
Text(TxtHwodhDat).Text = gPublicCommon.PublicSysDatas("SYSTEMDATE").SysDataValue
End If
oHwodh.HwodhDat = Trim(Text(TxtHwodhDat).Text)
Text(TxtHwodh_CwqjCode).Text = oHwodh.Hwodh_CwQjCode
gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwod), RecordName
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub ChgRecord(RecordName As String)
On Error GoTo Errorhandle
If oHwodh Is Nothing Then
Exit Sub
End If
Text(TxtHwodhDocno).SetFocus
gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwod), RecordName
Exit Sub
Errorhandle:
Err.Raise vbObjectError + 1, , Err.Description
End Sub
Private Sub CancelRecord(RecordName As String)
On Error GoTo Errorhandle
If oHwodh.HwodhId = -1 Then
Clearcontrol
Set oHwod = Nothing
Set oHwodh = Nothing
Else
oHwodh.Requery oHwodh.HwodhDocno
SetValueToControl
End If
gPublicFunction.SetToolbarStatu Me, Tlbaction(TlbHwod), RecordName
Exit Sub
Errorhandle:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -