Anlage des Repos
This commit is contained in:
35
current/Modules/GetWinLineProductInfoByProductNumber.vbs
Normal file
35
current/Modules/GetWinLineProductInfoByProductNumber.vbs
Normal file
@@ -0,0 +1,35 @@
|
||||
Function GetWinLineProductInfoByProductNumber(ProductNumber, WinLineMandatorNr, WinLineYear)
|
||||
|
||||
'Version Date 23.09.2020
|
||||
|
||||
On Error Resume Next
|
||||
|
||||
If (ProductNumber <> "") Then
|
||||
|
||||
SQLTable_WinLineProductInfo = "V021"
|
||||
SQLQuery_WinLineProductInfo = "c011 = '"& ProductNumber &"' and c002 = c011 and MESOCOMP = '"& WinLineMandatorNr &"' AND MESOYEAR = '"& WinLineCurrentYear &"'"
|
||||
|
||||
Set SQLResult_WinLineProductInfo = CWLStart.CurrentCompany.SearchRecord (SQLTable_WinLineProductInfo, SQLQuery_WinLineProductInfo)
|
||||
|
||||
If (DEBUG_ON = True) or (DebugMode = "Enabled" ) Then
|
||||
AddDebugLine "Querying for Article Number.. " & vbNewline
|
||||
AddDebugLine "Result Columns: " & SQLResult_WinLineProductInfo
|
||||
AddDebugLine "Result Rows: " & SQLResult_WinLineProductInfo.RowCount
|
||||
AddDebugLine "SQL: " & SQLQuery_WinLineProductInfo
|
||||
|
||||
ShowDebugBox "GetWinLineInternalProductNumber"
|
||||
End If
|
||||
|
||||
If (SQLResult_WinLineProductInfo.RowCount = -1) or (SQLResult_WinLineProductInfo.RowCount = 0) Then
|
||||
|
||||
GetWinLineProductInfoByProductNumber = 0
|
||||
|
||||
Elseif (SQLResult_WinLineProductInfo.RowCount >= 1) Then
|
||||
|
||||
Set GetWinLineProductInfoByProductNumber = SQLResult_WinLineProductInfo
|
||||
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
End Function ' GetWinLineProductInfoByProductNumber
|
||||
Reference in New Issue
Block a user