CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Language: FoxPro

icwrouting msearch() checkpoints

214 Views
Copy Code Show/Hide Line Numbers
 
WITH this
   DO CASE
      CASE .aitemlist[.ncurrentsearchtype,1]= 'Item'
         nResult = thisform.oBizObj.oRl.mGetRlByItem('csRoutingListI',this.txtSearch.VALUE)
         
         
******
******
TRY 
    SELECT csRoutingListI
    MESSAGEBOX("Checkpoint1: " + ALIAS(SELECT()) + " reccount: " + ALLTRIM(STR(RECCOUNT())))
    BROWSE TITLE "Press ESC to continue..."
CATCH
    MESSAGEBOX("Error displaying checkpoint1." + CHR(13) + CHR(10) + MESSAGE())
ENDTRY 
******
******
         
         
******
******
TRY 
    SELECT csBomStructure
    MESSAGEBOX("Checkpoint2: " + ALIAS(SELECT()) + " reccount: " + ALLTRIM(STR(RECCOUNT())))
    BROWSE TITLE "Press ESC to continue..."
CATCH
    MESSAGEBOX("Error displaying checkpoint2." + CHR(13) + CHR(10) + MESSAGE())
ENDTRY 
******
******
         IF USED('csRoutingList')
            USE IN csRoutingList
         ENDIF
         SELECT a.*, IIF(!ISNULL(b.item), .t., .f.) as lbom ;
         FROM csRoutingListI a ;
            LEFT JOIN csBomStructure b ON b.item = IIF(SUBSTR(UPPER(ALLTRIM(a.item)),1,3)=="XXX", SUBSTR(alltrim(a.item),4), ALLTRIM(a.item)) ;
         INTO CURSOR csRoutingList READWRITE
         SELECT csRoutingList
                 
******
******
TRY 
    SELECT csRoutingList
    MESSAGEBOX("Checkpoint3: " + ALIAS(SELECT()) + " reccount: " + ALLTRIM(STR(RECCOUNT())))
    BROWSE TITLE "Press ESC to continue..."
CATCH
    MESSAGEBOX("Error displaying checkpoint3." + CHR(13) + CHR(10) + MESSAGE())
ENDTRY 
******
******         
         INDEX ON item TAG item
 
   ENDCASE   
ENDWITH 
 
   DO CASE
      CASE nResult > 0
         .lIsRecsRouting = .T.
          lRetVal  = .T.
 
      CASE nResult = 0
         .lIsRecsRouting = .F.
         WAIT WINDOW NOWAIT 'No records corresponding to criteria have been found.'
 
   ENDCASE
   SELECT csRoutingList
*   SCAN
*      thisform.mnew()
*   ENDSCAN
   GO top
   .mSetGridRouting()
   .ncurrentformmoderouting = 0 && view mode
   IF .lIsRecsRouting
      .pgFSEARCHGRIDEDIT.page1.grDSEARCHRESULTS.AfterRowColChange()
   ENDIF 
   .mtoggleobjs()
   
ENDWITH
by vlad tamas
  April 06, 2010 @ 7:14am

Add a comment


Report Abuse
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate