📄 frmshipmentsinvoicesub.frm
字号:
VERSION 5.00
Object = "{4932CEF1-2CAA-11D2-A165-0060081C43D9}#2.0#0"; "Actbar2.OCX"
Begin VB.Form frmShipmentsInvoiceSub
Caption = "修改明细"
ClientHeight = 3900
ClientLeft = 60
ClientTop = 450
ClientWidth = 4035
LinkTopic = "Form1"
ScaleHeight = 3900
ScaleWidth = 4035
StartUpPosition = 3 'Windows Default
Begin ActiveBar2LibraryCtl.ActiveBar2 ActiveBar21
Height = 3900
Left = 0
TabIndex = 0
Top = 0
Width = 4035
_LayoutVersion = 1
_ExtentX = 7117
_ExtentY = 6879
_DataPath = ""
Bands = "frmShipmentsInvoiceSub.frx":0000
Begin VB.Frame Frame1
Height = 3375
Left = 60
TabIndex = 1
Top = 480
Width = 3915
Begin VB.TextBox txtInvoiceNo
Height = 315
Left = 1560
TabIndex = 13
Top = 720
Width = 1995
End
Begin VB.TextBox txtLayoutColor
BackColor = &H00FFFFFF&
Height = 315
Left = 1560
MaxLength = 20
TabIndex = 7
Top = 1200
Width = 1995
End
Begin VB.CommandButton cmdClose
Caption = "關閉 &C"
Height = 315
Left = 2400
TabIndex = 6
Top = 2820
Width = 735
End
Begin VB.CommandButton cmdOk
Caption = "確定 &A"
Height = 315
Left = 660
TabIndex = 5
Top = 2820
Width = 735
End
Begin VB.TextBox txtContractNo
BackColor = &H00C0C0FF&
Height = 315
Left = 1560
MaxLength = 20
TabIndex = 4
Top = 240
Width = 1995
End
Begin VB.TextBox txtQuantity
BackColor = &H00C0FFC0&
Height = 315
Left = 1560
MaxLength = 20
TabIndex = 3
Top = 1680
Width = 1995
End
Begin VB.TextBox txtPrice
BackColor = &H00C0FFC0&
Height = 315
Left = 1560
TabIndex = 2
Top = 2280
Width = 1995
End
Begin VB.Label Label5
Caption = "出货发票"
Height = 255
Left = 240
TabIndex = 12
Top = 720
Width = 855
End
Begin VB.Label Label3
Caption = "颜色花型"
Height = 255
Index = 4
Left = 240
TabIndex = 11
Top = 1200
Width = 1035
End
Begin VB.Label Label1
Caption = "合約編號"
Height = 255
Left = 240
TabIndex = 10
Top = 240
Width = 855
End
Begin VB.Label Label2
Caption = "出货数量"
Height = 315
Left = 240
TabIndex = 9
Top = 1740
Width = 915
End
Begin VB.Label Label4
BackColor = &H00C0C0C0&
Caption = "单价"
Height = 255
Left = 240
TabIndex = 8
Top = 2280
Width = 915
End
End
End
End
Attribute VB_Name = "frmShipmentsInvoiceSub"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public lngrow As Integer
Public newItem As Boolean
Private Sub ActiveBar21_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)
Select Case Tool.Name
Case "cmdSave":
cmdOk_Click
Case "cmdCancel":
Unload Me
End Select
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub spModiInvoice(ByVal spContractNo As String, ByVal spQuantity As Integer, ByVal spInvoiceNo As String, ByVal spFlag As Boolean)
Dim mycomm As ADODB.Command
Set mycomm = New ADODB.Command
With mycomm
.ActiveConnection = Cn
.CommandText = "pModiInvoice"
.CommandType = 4
.Prepared = True
.Parameters.Append .CreateParameter("@iContractNo", adVarChar, adParamInput, 20, spContractNo)
.Parameters.Append .CreateParameter("@iModiQuantity", adBigInt, adParamInput, 8, spQuantity)
.Parameters.Append .CreateParameter("@iInvoiceNo", adVarChar, adParamInput, 20, spInvoiceNo)
.Parameters.Append .CreateParameter("@iFlag", adBoolean, adParamInput, 1, spFlag)
.Execute
End With
End Sub
Private Sub cmdOk_Click()
With frmShipmentsInvoiceInfo
.MSHF1.TextMatrix(lngrow, 3) = txtQuantity
.MSHF1.TextMatrix(lngrow, 4) = txtPrice
.MSHF1.TextMatrix(lngrow, 6) = CInt(txtQuantity) * CInt(txtPrice)
MsgBox "修改成功", vbInformation + vbOKOnly, "提示"
End With
spModiInvoice txtContractNo, txtQuantity, txtInvoiceNo, newItem
Unload Me
End Sub
Private Sub Form_Load()
Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
InitTitle
End Sub
Private Sub InitTitle()
Label1.Caption = "合約編號"
Label2.Caption = "出货数量"
Label3.item(4).Caption = "颜色花型"
Label4.Caption = "单价"
Label5.Caption = "出货发票"
cmdOk.Caption = "確定 &O"
cmdClose.Caption = "關閉 &C"
Me.Caption = "編輯打印信息"
End Sub
Private Sub txtShipmentsPatternAmount_KeyPress(KeyAscii As Integer)
If KeyAscii <> 8 And KeyAscii <> 13 And KeyAscii <> 46 Then
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -