home *** CD-ROM | disk | FTP | other *** search
- on RVXSetCriteria x, a, b, C, d, e, f, g, h, i, j, k
- global RVXTable, RVXDB, RVXNothingfound, RVXHardList
- if getAt(RVXHardList, 1) = getAt(RVXHardList, 2) then
- set the member of sprite 34 to member "RVXCross"
- set the member of sprite 35 to member "RVXCross"
- set the loc of sprite 34 to point(400, 64)
- set the loc of sprite 35 to point(400, 91)
- set the ink of sprite 34 to 0
- set the ink of sprite 35 to 0
- setAt(RVXHardList, 1, 1)
- setAt(RVXHardList, 2, 1)
- set check to 0
- else
- if getAt(RVXHardList, 1) = 1 then
- set check to 1
- else
- set check to 2
- end if
- end if
- updateStage()
- set RVXTable to 0
- set RVXDB to 0
- set RVXfact to xtra("V12dbe")
- set RVXDB to new(RVXfact, the pathName & "PCWMGX.V12", "ReadWrite", "MGINDEX")
- if not objectp(RVXDB) then
- alert("Cannot create Database instance1. Err=" && RVXDB)
- exit
- end if
- set RVXfactTwo to xtra("V12table")
- set RVXTable to new(RVXfactTwo, mGetRef(RVXDB), "MGTABLE")
- if not objectp(RVXTable) then
- alert("Cannot create V12table instance2. Err=" && RVXTable)
- end if
- case x of
- 1:
- set err to mSetCriteria(RVXTable, a, b, C)
- case check of
- 1:
- set err to mSetCriteria(RVXTable, "and", "Software/Hardware", "=", "hardware")
- 2:
- set err to mSetCriteria(RVXTable, "and", "Software/Hardware", "=", "software")
- end case
- 2:
- set err to mSetCriteria(RVXTable, a, b, C)
- set err to mSetCriteria(RVXTable, d, e, f, g)
- case check of
- 1:
- set err to mSetCriteria(RVXTable, "and", "Software/Hardware", "=", "hardware")
- 2:
- set err to mSetCriteria(RVXTable, "and", "Software/Hardware", "=", "software")
- end case
- 3:
- set err to mSetCriteria(RVXTable, a, b, C)
- set err to mSetCriteria(RVXTable, d, e, f, g)
- set err to mSetCriteria(RVXTable, h, i, j, k)
- case check of
- 1:
- set err to mSetCriteria(RVXTable, "and", "Software/Hardware", "=", "hardware")
- 2:
- set err to mSetCriteria(RVXTable, "and", "Software/Hardware", "=", "software")
- end case
- end case
- RVXdoSelect()
- RVXAddSelection()
- if RVXNothingfound = 0 then
- RVXFieldResults()
- RVXShowResults()
- else
- case x of
- 1:
- set the member of sprite 7 to member "RVXANDORYellow"
- 2:
- set the member of sprite 11 to member "RVXANDORYellow"
- end case
- end if
- end
-
- on RVXdoSelect
- global RVXTable
- set err to mSelect(RVXTable)
- end
-
- on RVXAddSelection
- global RVXTable, RVXrecordsfound, RVXresultlist, RVXpageselect, RVXNothingfound, RVXSub
- set RVXresultlist to list()
- set RVXrecordsfound to mSelectCount(RVXTable)
- if RVXrecordsfound = 0 then
- set RVXNothingfound to 1
- set the member of sprite 32 to member "RVXNothingFound"
- set the loc of sprite 32 to point(295, 367)
- set the ink of sprite 32 to 36
- updateStage()
- else
- set RVXNothingfound to 0
- set temp to mGetPosition(RVXTable)
- mGoFirst(RVXTable)
- put EMPTY into field "RVXRESType"
- put EMPTY into field "RVXRESProd"
- put EMPTY into field "RVXRESSupp"
- put EMPTY into field "RVXRESDept"
- put EMPTY into field "RVXRESCate"
- put EMPTY into field "RVXRESissu"
- put EMPTY into field "RVXRESPage"
- put EMPTY into field "RVXRESCont"
- repeat with i = 1 to RVXrecordsfound
- set type to mGetField(RVXTable, "Software/Hardware")
- set Product to mGetField(RVXTable, "Product")
- set Supplier to mGetField(RVXTable, "Manufacturer/ Distributor")
- set depth to mGetField(RVXTable, "Depth")
- set Category to mGetField(RVXTable, "Product Category")
- set Issue to mGetField(RVXTable, "Issue")
- set Page to mGetField(RVXTable, "Page")
- set Contact to mGetField(RVXTable, "Contact/Phone Number")
- addAt(RVXresultlist, count(RVXresultlist) + 1, [type, Product, Supplier, depth, Category, Issue, Page, Contact])
- mGoNext(RVXTable)
- end repeat
- if RVXrecordsfound > 18 then
- set RVXpageselect to 1
- else
- set RVXpageselect to 0
- end if
- end if
- end
-