📄 mod_validate.bas
字号:
Attribute VB_Name = "Mod_Validate"
Public Function gfn_FillCombo(ByVal pComboControl As Object, ByVal pSql As String)
Dim rstfillCombo As ADODB.Recordset
Dim i As Integer
pComboControl.Clear
Set rstfillCombo = New ADODB.Recordset
If pSql = "" Then
fn_FillCombo = -1
Exit Function
End If
' Set rstfillCombo = CNimanager.Execute(pSql)
' If Not (rstfillCombo.EOF Or rstfillCombo.BOF) Then
' Do While Not rstfillCombo.EOF
' pComboControl.AddItem Trim(rstfillCombo(0))
' rstfillCombo.MoveNext
' Loop
'End If
Set rstfillCombo = Nothing
End Function
Public Function fn_CheckExistance(ByVal pSql As String) As Integer
Dim rstExistance As ADODB.Recordset
Set rstExistance = New ADODB.Recordset
Set rstExistance = CNimanager.Execute(pSql)
If Not (rstExistance.EOF Or rstExistance.BOF) Then
fn_CheckExistance = 1
Else
fn_CheckExistance = -1
End If
Set rstExistance = Nothing
End Function
Public Function fnCheckStockQty(ByVal pId As String) As Long
Dim rstStockQty As New ADODB.Recordset
Dim lSQL As String
Dim lStockQty As Long
Set rstStockQty = New ADODB.Recordset
lSQL = "Select b_Qty From aBookMaster where b_Id = '" & Trim(pId) & "'"
Set rstStockQty = CNimanager.Execute(lSQL)
If Not (rstStockQty.EOF And rstStockQty.BOF) Then
lStockQty = rstStockQty("b_Qty")
Else
lStockQty = 0
End If
fnCheckStockQty = lStockQty
Set rstStockQty = Nothing
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -