home *** CD-ROM | disk | FTP | other *** search
- <<* SIMPROC.INC *>>
-
- <<procedure ProcedureBody>>
- <<string prgname,fpath,fname,fext>>
- <<begin>>
- <<filespec( program,fpath,fname,fext )>>
- <<prgname := fname + '.' + fext>>
- * Program.: {prgname}
- * Author..: {Author}
- * Date....: {date}
- * Notice..: Copyright (c) 1987, {Copyright}, All Rights Reserved
- * Notes...: Procedures for simple database application.
- *
-
- PROCEDURE DispForm
- CLEAR
- SET COLOR TO {StatusColor}
- @ 0, 0 SAY SPACE(80)
- @ 0,72 SAY DATE()
- SET COLOR TO {WindowColor}
- <<DisplayFormat>>
- RETURN
-
-
- PROCEDURE DispRec
- SET COLOR TO {StatusColor}
- @ 0, 0 SAY "Record: "+SUBSTR(STR(RECNO()+1000000,7),2)
- IF DELETED()
- @ 0,50 SAY "*DELETED*"
- ELSE
- @ 0,50 SAY " "
- ENDIF
- SET COLOR TO {WindowColor}
- <<DisplayRecord>>
- CLEAR GETS
- RETURN
-
-
- PROCEDURE EditRec
- <<EditRecord( false )>>
- READ
- RETURN
-
-
- PROCEDURE BlankRec
- <<BlankRecord>>
- RETURN
-
-
- PROCEDURE ReplRec
- <<forall fldget and (fldtyp $ 'CDLN')>>
- REPLACE {fldnam} WITH m{fldnam}
- <<endfor>>
- RETURN
-
-
- PROCEDURE AddRec
- * ---Initialize memvars.
- DO BlankRec
- @ 24,0
- @ 24,0 SAY "Press {Ctrl-W} to Exit"
- * ---Read into memvars.
- SET COLOR TO {WindowColor}
- <<EditRecord( true )>>
- READ
- * ---Confirm that user wants to append this record.
- choice = " "
- SET COLOR TO {PromptColor}
- @ 24,0
- @ 24,0 SAY "SELECT: {A}ccept {I}gnore";
- GET choice PICTURE "!" VALID( choice $ "AI" )
- READ
- IF choice = "A"
- * ---Add the new record.
- APPEND BLANK
- * ---Replace from memvars.
- DO ReplRec
- ENDIF
- RETURN
-
- * EOF: {prgname}
- <<end>> <<*ProcedureBody*>>
-
- <<* SIMPROC.INC *>>