getstartupaction Method
Class: tastrade
Expand/Collapse source code of procedure getstartupaction Source Code
*-- Returns the action to take based on the user level
*-- The action is just a Visual FoxPro command stored as a character
*-- string in the startup_action field of the user_level
*-- table.
LOCAL lnOldArea, ;
      lcAction, ;
      llCloseWhenDone

lnOldArea = SELECT()

IF !USED("user_level")
  USE user_level IN 0
  llCloseWhenDone = .T.
ENDIF

SELECT user_level
lcAction = LOOKUP(startup_action, ;
                UPPER(this.cUserLevel), ;
                description, ;
                "DESCRIPTIO")

IF llCloseWhenDone
  USE IN user_level
ENDIF

SELECT (lnOldArea)

RETURN lcAction