Re: Budget Builder - file: register.ex part 3, edit 1
- Posted by Senator
Oct 05, 2020
---------------- register.ex part 3, edit 1
procedure quit() db_close() abort(0) end procedure
constant PRIOR=1, CURRENT=0
procedure main()
sequence text
integer s
datetime dt = now()
set_background_color(BGC)
list()
while 1 do
-- if equal(current_table, REGISTER) then check_autolog_flag() end if
set_foreground_color(MC) -- MC = Menu Color
text = text:format("[]",{db_current_table()})
puts(1,"\n\n\t\t\t\tBudget Builder: ") hilite(text,YELLOW,1)
puts(1,"\n\t\t\t\t")
dt = now()
set_foreground_color(BLUE)
text = datetime:format(dt, "%A, %B %d '%y %l:%M%P")
display(text,{},0) --hilite("*",YELLOW,0)
-- display menu
puts(1,"\n\n")
set_foreground_color(MC)
s = prompt_number(MENU,{0,22})
switch s do
case 0 then quit()
case 1 then add_record()
case 2 then delete_record()
case 3 then list() -- list all
case 4 then display_full_note() any_key("\n")
case 5 then toggle_tables()
case 6 then select_cash_table()
case 7 then autolog_budget()
case 8 then edit_record_data()
case 9 then DbDump()
case 10 then list_tables()
case 11 then rename_table()
case 12 then select_table()
case 13 then backup_prj_files()
case 14 then search() -- search all-- 13 = select switch
case 15 then search(13,13) -- select search YEAR/MONTH
case 16 then dt=now() -- search current
search(dt[YEAR],dt[MONTH]) -- YEAR/MONTH
case 17 then list()
case 18 then list(13,13) -- select YEAR/MONTH to list
case 19 then list_month(CURRENT) -- list current YEAR/MONTH
case 20 then list_month(PRIOR) -- list current year/PRIOR MONTH
case 21 then db_compress()
case 22 then check_AUTOLOG_DAT()
case else any_key("\n\tThat key does nothing - Press Any Key to continue...")
end switch
end while
end procedure
main()
-- end register.ex part 3, edit 1
-- end register.ex
Not Categorized, Please Help
|
|