📄 frmcostpricecheck.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Object = "{F6125AB1-8AB1-11CE-A77F-08002B2F4E98}#2.0#0"; "MSRDC20.OCX"
Begin VB.Form frmCostPriceCheck
Caption = "选择单据"
ClientHeight = 4290
ClientLeft = 60
ClientTop = 345
ClientWidth = 7965
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4290
ScaleWidth = 7965
StartUpPosition = 3 '窗口缺省
Begin MSRDC.MSRDC datCostPrice
Height = 375
Left = 6720
Top = 3450
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 661
_Version = 393216
Options = 0
CursorDriver = 0
BOFAction = 0
EOFAction = 0
RecordsetType = 1
LockType = 3
QueryType = 0
Prompt = 3
Appearance = 1
QueryTimeout = 30
RowsetSize = 100
LoginTimeout = 15
KeysetSize = 0
MaxRows = 0
ErrorThreshold = -1
BatchSize = 15
BackColor = -2147483643
ForeColor = -2147483640
Enabled = -1 'True
ReadOnly = 0 'False
Appearance = -1 'True
DataSourceName = ""
RecordSource = ""
UserName = ""
Password = ""
Connect = ""
LogMessages = ""
Caption = "MSRDC1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.CommandButton cmdCostPrice
Height = 375
Index = 5
Left = 6660
Style = 1 'Graphical
TabIndex = 6
Top = 2295
UseMaskColor = -1 'True
Visible = 0 'False
Width = 1215
End
Begin VB.CommandButton cmdCostPrice
Caption = "全部取消(&U)"
Height = 375
Index = 4
Left = 6660
TabIndex = 5
Top = 1845
Width = 1215
End
Begin VB.CommandButton cmdCostPrice
Caption = "全部选择(&A)"
Height = 375
Index = 3
Left = 6660
TabIndex = 4
Top = 1440
Width = 1215
End
Begin VB.CommandButton cmdCostPrice
Caption = "筛选单据(&F)"
Height = 375
Index = 2
Left = 6660
TabIndex = 3
Top = 1035
Width = 1215
End
Begin VB.CommandButton cmdCostPrice
Height = 375
Index = 1
Left = 6690
Style = 1 'Graphical
TabIndex = 2
Top = 585
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdCostPrice
Height = 375
Index = 6
Left = 6660
Style = 1 'Graphical
TabIndex = 1
Top = 180
UseMaskColor = -1 'True
Width = 1215
End
Begin MSFlexGridLib.MSFlexGrid msgGrid
Bindings = "frmCostPriceCheck.frx":0000
Height = 3825
Left = 90
TabIndex = 0
Top = 300
Width = 6465
_ExtentX = 11404
_ExtentY = 6747
_Version = 393216
Cols = 30
FixedCols = 4
BackColor = 16777215
SelectionMode = 1
End
Begin VB.Label Label1
Height = 180
Left = 150
TabIndex = 7
Top = 60
Width = 6390
End
End
Attribute VB_Name = "frmCostPriceCheck"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'选择单据入库
'作者: 唐吉禹
'1998-7-20
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private mclsGrid1 As New Grid '声明GRID类模块
Private mstrItemID As String '商品ID字符串
Private blnIsCancel As Boolean '按钮退出吗
Private mlngID() As Long '明细ID数组
Private Const intfixl = 7 '偏移数量
Dim mstrCond As String
Private m_blnFirst As Boolean
Dim blnOldSelect() As Boolean '已选择标志
'Private blnShowFilter As Boolean '进行筛选标志
Private Sub cmdCostPrice_Click(Index As Integer)
'响应窗体按钮动作
Dim lngID As Long
Select Case Index
Case 6 '确定存盘
blnIsCancel = True
' If msgGrid.Rows > 1 Then
Call Select_OK
' Else
Unload Me
' End If
Case 1 '取消
blnIsCancel = True
Unload Me
Case 2 '筛选
Call Select_Some
Case 3 '全部选择
Call Select_All("√")
Case 4 '全部取消
Call Select_All("")
Case 5 '关联
With msgGrid
If .Rows > 1 Then
lngID = .TextMatrix(.Row, 0)
lngID = Balance.Get_MyItemActivityID(lngID)
If lngID > 0 Then
Unload Me
FrmStockBill.ShowAOldBill lngID
Else
ShowMsg Me.hWnd, "该商品资料对应的采购单不存在", vbInformation, Me.Caption
End If
Else
ShowMsg Me.hWnd, "无商品资料可以关联", vbInformation, Me.Caption
End If
End With
End Select
End Sub
Private Sub Form_Activate()
If m_blnFirst = True Then
m_blnFirst = False
Call RefreshGrid(True)
Me.Left = (Screen.width - Me.width) / 2
End If
SetHelpID C2lng(Me.HelpContextID)
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyEscape Then
blnIsCancel = True
Unload Me
End If
End Sub
Private Sub Form_Load()
Me.Left = -32000
Set mclsGrid1 = New Grid
Set mclsGrid1.Grid = msgGrid
mclsGrid1.ColOfs = 4
mclsGrid1.ListSet.ViewId = 109
Me.HelpContextID = 14010
' SetHelpID Me.hwnd, 14010
blnIsCancel = False
' Call RefreshGrid(True)
m_blnFirst = True
Set cmdCostPrice(6).Picture = Utility.GetFormResPicture(1001, 0)
Set cmdCostPrice(1).Picture = Utility.GetFormResPicture(1002, 0)
Set cmdCostPrice(5).Picture = Utility.GetFormResPicture(1010, 0)
Set msgGrid.MouseIcon = Utility.GetFormResPicture(2001, 2)
msgGrid.SelectionMode = flexSelectionByRow
If msgGrid.Rows > 1 Then
msgGrid.col = 3 '对第一列进行排序
msgGrid.ColSel = 3
msgGrid.Row = 1
msgGrid.RowSel = 1
msgGrid.Sort = 6
End If
Me.top = (Screen.Height - Me.Height) / 2
' Me.Left = (Screen.width - Me.width) / 2
Me.KeyPreview = True
Set Me.Icon = Utility.GetFormResPicture(139, vbResIcon)
End Sub
'刷新Grid
Private Sub RefreshGrid(ByVal blnWhere As Boolean)
'入参:blnWhere;blnWhere=True,则为筛选中调用,需把筛选条件加上;否则为常规调用
'功能:从对应视图取SQL语句并打开、初始化之
Dim strSelect As String
Dim strFrom As String
Dim strSQL As String
Dim recRecordset As rdoResultset
Dim strWhere As String
Dim datBegine As Date
Dim datEnd As Date
Dim bytPeriod As Byte
Dim intYear As Integer
Dim lngNaturalCurID As Long
Dim strDecodeID As String
Dim strInID As String
Dim i As Integer
Dim j As Integer
lngNaturalCurID = gclsBase.NaturalCurId
intYear = Year(gclsBase.BaseDate)
bytPeriod = gclsBase.Period
Call gclsBase.DateOfPeriod(intYear, bytPeriod, datBegine, datEnd)
'will delete
' datBegine = #1/1/98#
' datEnd = #12/31/98#
'
strInID = ""
strDecodeID = ""
If UBound(mlngID) > 0 Then
i = 0
j = UBound(mlngID)
strInID = "("
For i = 0 To j Step 1
strInID = strInID & mlngID(i) & ","
Next i
strInID = Left(strInID, Len(strInID) - 1)
strInID = strInID & ")"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -