📄 invworkdlg.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form InvWorkDlg
Caption = "耗用存货录入"
ClientHeight = 6375
ClientLeft = 60
ClientTop = 345
ClientWidth = 9285
LinkTopic = "Form1"
ScaleHeight = 6375
ScaleWidth = 9285
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox TextSum
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
BorderStyle = 0 'None
Enabled = 0 'False
Height = 270
Left = 7320
TabIndex = 4
Top = 5880
Width = 1575
End
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
Appearance = 0 'Flat
BackColor = &H00C0FFFF&
BorderStyle = 0 'None
Enabled = 0 'False
Height = 270
Left = 6240
TabIndex = 3
Text = "合计:"
Top = 5880
Width = 975
End
Begin Project1.InventoryGrid m_Grid
Height = 3015
Left = 360
TabIndex = 0
Top = 2760
Width = 8655
_extentx = 15266
_extenty = 5741
End
Begin Project1.WorkHead m_WorkHead
Height = 5505
Left = 0
TabIndex = 1
Top = 720
Width = 9150
_extentx = 16140
_extenty = 9710
End
Begin MSComctlLib.Toolbar Toolbar
Align = 1 'Align Top
Height = 630
Left = 0
TabIndex = 2
Top = 0
Width = 9285
_ExtentX = 16378
_ExtentY = 1111
ButtonWidth = 820
ButtonHeight = 953
AllowCustomize = 0 'False
Appearance = 1
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 7
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "打印"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "预览"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "增行"
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删行"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 4
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出"
EndProperty
EndProperty
BorderStyle = 1
End
End
Attribute VB_Name = "InvWorkDlg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private m_MainId As Long
Private m_Edit As Boolean
Public Function DoModal(ByVal MainId As Long, pEdit As Boolean)
m_MainId = MainId
m_Edit = pEdit
Me.Show vbModal
End Function
Private Sub Form_Load()
If m_WorkHead.FindData("AutoId=" & CStr(m_MainId), g_Conn) Then
m_WorkHead.Enabled = False
TextSum.Text = FormatNumber(m_WorkHead.InventorySum)
m_Grid.LoadRepairItem g_Conn, m_MainId
m_Grid.Enabled = m_Edit
Toolbar.Buttons.Item(4).Enabled = m_Edit
Toolbar.Buttons.Item(5).Enabled = m_Edit
m_WorkHead.ShowData
Else
MsgBox "该维修单已不存在,请联系软件代理商", vbCritical Or vbOKOnly, "错误"
Unload Me
End If
m_Grid.ShowData
End Sub
Private Sub m_Grid_ChangeSum()
m_WorkHead.InventorySum = m_Grid.InventorySum
m_WorkHead.Save
TextSum.Text = FormatNumber(m_Grid.InventorySum)
End Sub
Private Sub m_Grid_PopupFind(pComm As String, pVal As TextBox)
Dim t_findDlg As FindDlg
Set t_findDlg = New FindDlg
If t_findDlg.DoModal(pComm) = RC_OK Then
pVal.Text = t_findDlg.FindResult
End If
End Sub
Private Sub m_WorkHead_PopupFind(pComm As String, pVal As TextBox)
Dim t_findDlg As FindDlg
Set t_findDlg = New FindDlg
If t_findDlg.DoModal(pComm) = RC_OK Then
pVal.Text = t_findDlg.FindResult
End If
End Sub
Private Sub Toolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1
Case 2
Case 4
m_Grid.WorkMianId = m_WorkHead.GetWorkId()
m_Grid.AddRow
Case 5
Case 7
Unload Me
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -