REM *************************************************************************** REM **** Program Bridal Store
************************************************* REM *************************************************************************** REM *************************************************************************** REM **** Author Philip King
************************************************** REM *************************************************************************** REM *************************************************************************** REM *************************************************************************** REM **** Includes go here
***************************************************** REM ***************************************************************************
REM *************************************************************************** REM *************************************************************************** REM **** Sreen statements here
************************************************ REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** defines
for quick use
data types
************************************* REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** Listing of subs
and funtions
***************************************** REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** arrays decleared here
************************************************ REM *************************************************************************** imenu = 4
REM ***************************************************************************
REM *************************************************************************** REM **** arrays set
to data here
********************************************** REM ***************************************************************************
smenu(1) = "1) Edit Customer Info": smenu(2) = "3) Edit Inventory Data "
smenu(3) = "2) Edit Sales ": smenu(4) = "4) System Maintenance "
REM *************************************************************************** REM **** variables declares go here
******************************************* REM *************************************************************************** REM ***************************************************************************
REM *************************************************************************** REM **** customer info record
type ******************************************** REM *************************************************************************** REM ***************************************************************************
REM *************************************************************************** REM **** inventory record
type ************************************************ REM ***************************************************************************
REM ***************************************************************************
REM *************************************************************************** REM **** system data file record
********************************************** REM ***************************************************************************
REM *************************************************************************** REM **** point of sale
type *************************************************** REM *************************************************************************** REM *************************************************************************** lcustreclen
= LEN(custinforec
)lsystemreclen
= LEN(systemrec
)
'PRINT lsystemreclen
'END
REM *************************************************************************** REM **** main menu
loop ******************************************************* REM ***************************************************************************
menuloop:
'if sr="2" then gosub iv1
REM ***************************************************************************
REM *************************************************************************** REM **** Sytem Header
********************************************************* REM *************************************************************************** systemheader:
REM *************************************************************************** REM **** printes in
system erros
********************************************** REM *************************************************************************** sprintserrors:
IF se
= "" THEN se
= "INVALID RESPONSE" itemp1 = 40 - (itemp / 2)
'COLOR Yellow, Blue
idelay = 1.5
iflag2 = 1
REM ***************************************************************************
REM ***************************************************************************** REM **** numeric
input sub ****************************************************** REM ***************************************************************************** snumeric:
se = "INPUT OUT OF BOUNDS"
REM ***************************************************************************
REM *************************************************************************** REM **** alpha
input sub ****************************************************** REM *************************************************************************** salphainput:
iflag2 = 0
ilength2
= LEN(saction
) + 2
LOCATE 23, ilength2
' set prompt one space after action menu print COLOR Yellow
, Black:
PRINT SPC(ib
);
' changes color and prints ib spaces to screen for input lenght LOCATE 23, ilength2
' sets curser at the begining of input space from previouse line LINE INPUT sr: sr
= UCASE$(sr
) ' inputs data from user changes it to upper case
se = "ENVALID INPUT LENGTH"
sr = ""
iflag2 = 1
REM *************************************************************************** REM **** main menu
to the
screen ********************************************** REM *************************************************************************** printmain:
REM ***************************************************************************
REM *************************************************************************** REM **** menu prompts start here
********************************************** REM *************************************************************************** mainmenuchoice:
ib = 1
ihigh = 99
ilow = 1
saction = "Choose Menu Option or X to Quit "
REM ***************************************************************************
REM *************************************************************************** REM **** clean up the prompt area
********************************************* REM ***************************************************************************
clearprompt:
REM ***************************************************************************
REM *************************************************************************** REM **** customer
input modual
************************************************ REM *************************************************************************** s0:
PRINT LEFT$(custinforec.sphone
, 3) + "/";
MID$(custinforec.sphone
, 4, 3) + "/";
RIGHT$(custinforec.sphone
, 4) REM ******************************************************************** s1: saction = "Enter Customer ID X to Exit "
ib = 10
ilow = 1
ihigh = 999999999
iflag1 = 0
REM ******************************************************************** s2:
saction = "Enter First Name X to Exit - To Backup "
ib = 25
ilow = 99
ihigh = 99
iflag1 = 0
custinforec.sfirst_name
= sr:
GOSUB s0
REM *************************************************************************** s3:
saction = "Enter Last Name X to Exit - To Back up "
ib = 25
ilow = 99
ihigh = 99
iflag1 = 0
custinforec.slast_name
= sr:
GOSUB s0
REM *************************************************************************** s4:
saction = "Enter Address X to Exit - To Back up "
ib = 30
ilow = 99
ihigh = 99
iflag1 = 0
custinforec.saddress
= sr:
GOSUB s0
REM *************************************************************************** s5: saction = "Enter City Name X to Exit - To Back up "
ib = 25
ilow = 99
ihigh = 99
iflag1 = 0
custinforec.scity
= sr:
GOSUB s0
REM *************************************************************************** s6:
saction = "Enter State X to Exit - To Back up "
ib = 2
ilow = 99
ihigh = 99
iflag1 = 0
custinforec.sstate
= sr:
GOSUB s0
REM *************************************************************************** s7:
saction = "Enter Zip Code Name X to Exit - To Back up "
ib = 5
ilow = 99
ihigh = 99
iflag1 = 0
custinforec.szip
= sr:
GOSUB s0
REM *************************************************************************** s8:
saction = "Enter Phone Number X to Exit - To Back up "
ib = 10
ilow = 99
ihigh = 99
iflag1 = 0
custinforec.sphone
= sr:
GOSUB s0
'IF sr = "" OR sr = CHR$(13) goto next step
REM ***************************************************************************
REM *************************************************************************** REM *************************************************************************** puttorecord:
saction = "Commit Data to File Y/N"
ib = 1
ilow = 99
ihigh = 99
iflag1 = 0
REM *************************************************************************** REM **** inventory
input screen *********************************************** REM *************************************************************************** inv1:
REM *************************************************************************** REM **** set custinforrec variables
to zero
or null
*************************** REM *************************************************************************** custinforec_null:
custinforec.id = null
custinforec.sfirst_name = null
custinforec.slast_name = null
custinforec.saddress = null
custinforec.scity = null
custinforec.sstate = null
custinforec.szip = null
custinforec.sphone = null
REM ***************************************************************************
REM *************************************************************************** REM **** opens
random files *************************************************** REM *************************************************************************** randomfiles:
'IF zcustrecnum = 0 THEN zcustrecnum = 1 '
REM ***************************************************************************
REM *************************************************************************** REM **** inserts record into
random file
************************************** REM *************************************************************************** insertcustrec:
IF zcustrecnum
= 1 OR zcustrecnum
< 2 THEN
PUT #1, zcustrecnum
, custinforec
zcustrecnum = zcustrecnum + 1
PUT #1, zcustrecnum
, custinforec
REM ***************************************************************************
REM *************************************************************************** REM **** custinforec duplicate id search
************************************** REM *************************************************************************** dupidsearch:
'IF (LOF(1) / lcustreclen) = 0 THEN RETURN
'WHILE NOT LOF(1) / lcustreclen
'GET #1, zcustrecnum * lcusinforeclen, custinforec
'IF custinforec.id = sr THEN BEEP
'WEND
REM ***************************************************************************
REM *************************************************************************** REM **** main modual
********************************************************** REM *************************************************************************** main:
'END
COLOR LightCyan
, MidnightBlue
iflag2 = 0
iflag3 = 1
'SCREEN 12
mainloop:
'if sr="C" then gosub random files thingy
REM **************************************************************************
REM ************************************************************************** REM **** delay
loop ********************************************************** REM ************************************************************************** REM **************************************************************************