General & System
Top  Previous  Next


These functions give you access to general information about Campground Master, or things outside of Campground Master such as Windows functions and files.



(Back to Function Types List)



Function:
   AppendFile   
Result-type:   Boolean
   
Arguments:   cFile, cText
   
Description:   Appends the contents of a text string to a file (after any existing contents). Note that newline characters in the text are written as carriage return-linefeed pairs. The file must already exist. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database.   


Function:   BackupDatabase   
Result-type:   Boolean
   
Arguments:   cFile [, fCompress]
   
Description:   Creates a backup of the database to the specified file (which should include the full path, file name and file extension). Compression is optional -- if fCompress is not specified then it will be compressed by default. Return indicates success of backup file creation.   


Function:   CurrentOpLevel   
Result-type:   Numeric
   
Arguments:   (none)
   
Description:   Returns the access level operator currently logged in. 0 = None logged in, 1 = Guest, 2 = Clerk, 3 = Reservations, 4 = Manager, 5 = Administrator   


Function:   CurrentOpName   
Result-type:   Text
   
Arguments:   (none)
   
Description:   Returns the name of the operator currently logged in, if any   


Function:   CurrentOpRec   
Result-type:   Record
   
Arguments:   (none)
   
Description:   Returns the Operator record for the operator currently logged in, if any   


Function:   DatabaseName   
Result-type:   Text
   
Arguments:   (none)
   
Description:   Returns the name of the currently open database (the title only, no path or extension)   


Function:   DatabasePath   
Result-type:   Text
   
Arguments:   (none)
   
Description:   Returns the path of the currently open database (includes the ending backslash, e.g. 'C:\' or 'C:\MyData\'   


Function:   DeleteFile   
Result-type:   Boolean
   
Arguments:   cFile
   
Description:   Deletes the file by the given name. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database. Returns True if the file existed before DeleteFile was called, False if it did not.   


Function:   FileExists   
Result-type:   Boolean
   
Arguments:   cFile
   
Description:   Checks to see if a file exists by the given name. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database.   


Function:   MasterWorkstation   
Result-type:   Numeric
   
Arguments:   (none)
   
Description:   Returns the Workstation ID for 'Master' computer   


Function:   MaxWorkstations   
Result-type:   Numeric
   
Arguments:   (none)
   
Description:   Returns the maximum number of workstations licensed for this installation   


Function:   MessageBox   
Result-type:   Numeric
   
Arguments:   cMessage [, nButtons [, nIcon]]
   
Description:   Shows a message in a prompt window. The nButtons parameter can be 0 for OK, 1 for OK & Cancel, 2 for Yes & No, or 3 for Yes, No, & Cancel. The nIcon parameter can be 0 for none, 1 for Warning/Exclamation, 2 for Error/Stop, or 3 for Information. Returns the button clicked : 0 = Cancel, 1 = OK, 2 = Yes, 3 = No.   


Function:   ReadFile   
Result-type:   Text
   
Arguments:   cFile
   
Description:   Reads the entire contents of a file into a text string. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database. The maximum file size is 1,000,000 bytes.   


Function:   RefreshDisplay   
Result-type:   Boolean
   
Arguments:   (none)
   
Description:   Refreshes the main display (e.g. the current Tab View being displayed). This may need to be used after changing reservation information so the changes are reflected on the Rack, for instance. Always returns True.   


Function:   SendEmail   
Result-type:   Boolean
   
Arguments:   bPreview, cFromName, cFromAddress, cToName, cToAddress, cSubject, cBody
   
Description:   Sends an E-mail message, using the internal SMTP functionality. The Online Setup for the SMTP settings must be configured and enabled. If the bPreview flag is set, the message will be shown in a window first, where it can be edited. If the From name & address are blank, it will use the defaults from the SMTP settings. The return value indicates whether it was successful.   


Function:   SetVar   
Result-type:   Boolean
   
Arguments:   cVarName, eExpression
   
Description:   Creates and/or sets a variable which can be used in subsequent expressions. Will also work with pre-existing global variables (assuming no local variable by that name also exists), but if a variable does not exist then it will be created for the 'local' context only. Variable names can contain 'A'-'Z', 'a'-'z', '0'-'9', or '_' characters. Returns .T. is successful, .F. if variable cannot be created or set.   


Function:   SetVarGlobal   
Result-type:   Boolean
   
Arguments:   cVarName, eExpression
   
Description:   Creates and/or sets a global variable which will be available to any expressions until the program is shut down. Variable names can contain 'A'-'Z', 'a'-'z', '0'-'9', or '_' characters. Returns .T. is successful, .F. if variable cannot be created or set.   


Function:   ShellExecute   
Result-type:   Boolean
   
Arguments:   cOperation, cFile, cParams, cDir
   
Description:   Uses the system 'ShellExecute' function to open a document, execute a program, explore a folder or other functions. See Windows development specifications for details.   


Function:   VarExists   
Result-type:   Boolean
   
Arguments:   cVarName
   
Description:   Checks to see if a variable exists either in the current context or as a global variable (does not distinguish the type).   


Function:   VarExistsGlobal   
Result-type:   Boolean
   
Arguments:   cVarName
   
Description:   Checks to see if a global variable exists.   


Function:   Workstation   
Result-type:   Numeric
   
Arguments:   (none)
   
Description:   Returns the Workstation ID for this computer   


Function:   WriteFile   
Result-type:   Boolean
   
Arguments:   cFile, cText
   
Description:   Writes the contents of a text string to a file. Creates the file if necessary, and overwrites it if it already exists. Note that newline characters in the text are written as carriage return-linefeed pairs. The filename parameter can either have a complete path or just a filename -- if just a filename, it must be in the same folder as the current database.   







Page URL http://CampgroundMaster.com/shelp/generalsystem.html

Campground Master Home