home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * Procedure VEPieces lets the user view/edit the Units or Media for the Item
- * currently selected.
- *******************************************************************************
- PROCEDURE VEPieces(Flag)
- LOCAL BUScreen
-
- IF (!Flag).AND.(UPDATED())
- IF YesNo("Save Changes to this Record?")
- LibItems->(LPutRecord(Buffer,RECNO()))
- BackupBuffer := ACLONE(Buffer)
- ENDIF
- ENDIF
-
- SELECT PIECES
- BUScreen := SAVESCREEN()
-
- DO CASE
- CASE "MED"$Buffer[4]
- CName := "Unit"
- CASE "WLM"$Buffer[4]
- CName := "White Label Media Set"
- CASE "DWG"$Buffer[4]
- CName := "Station Multiple"
- ENDCASE
- // set up SuperBrowse Object...
- SB := PiecesBrowser():New(17,0,23,79)
- SB:FileName := "PIECES"
- SB:IndexOrder := 1
- SB:Fields := {"Title","Revision","Location","Format","NumParts","Date_Arc","Date","License","Date_Rec","Comments"}
- SB:Headers := {"Media Title","Rev","Locat","Format","#Pt","Archived","CertDate","Lic","Received","Comments"}
- SB:Pictures := {"@!","@!","@!","@!","","","","","",""}
- SB:Title := " "+CName+"s Listed for "+ALLTRIM(LIBITEMS->ID)+" "
- SB:Colors := {"N/GR","B/BG","GR+/B","W+/R"}
- SB:WhileBlock := {|x| (ALLTRIM(PIECES->ID) == x)}
- SB:HasWhileBlock := .T.
- SB:FirstKey := ALLTRIM(LIBITEMS->ID+LIBITEMS->Type)
- SB:Hooks := { {K_DEL, {|| DelChild()} }, ;
- {K_F2, {|| NewChild()} }, ;
- {K_F4, {|| ArchiveItem()} } }
-
- @ 24,0 SAY SPACE(80)
- @ 24,2 SAY " F4 = Archive F2 = New Rec <DEL> = Delete/Restore Rec <ESC> = Exit"
- SETCOLOR("W+/RG,N/W")
-
- SB:Execute()
- SB:GoTop()
-
- SELECT LIBITEMS
- RESTSCREEN(,,,,BUScreen)
- RETURN // from VEPieces
-
- *******************************************************************************
- * Function ArchiveItem will toggle the Archive status bit of a media item.
- *
- *******************************************************************************
- FUNCTION ArchiveItem
- LOCAL APosition
-
- IF EMPTY(PIECES->Date_Arc)
- PIECES->Date_Arc := DATE()
- ELSE
- IF YesNo("This Piece is already Archived, Clear the Archive Date Out?")
- PIECES->Date_Arc := CTOD(" / / ")
- ENDIF
- ENDIF
- RETURN 1 // refresh current row's data only
-
-