Demo 4
Functions
d4_cust.4gl File Reference

Functions

function customer ()
 The customer function has the menu, which can be used to perform client-related tasks. More...
 
function add_customer (repeat)
 The add_customer function has the ability to add data on one or several customers to the database. More...
 
function input_cust ()
 You can enter new customer data in the INPUT operator in the unput_cust function. More...
 
function query_customer (mrow)
 In the CONSTRUCT operator in the query_customer function, the customer search criteria is entered. More...
 
function update_customer ()
 You can change customer data in the INPUT operator in update_customer function. More...
 
function delete_customer ()
 The ability to delete a customer is implemented in the delete_customer function. More...
 
function customer_help ()
 Context help is implemented in the customer_help function. More...
 
function statehelp ()
 The ability to choose a number and a name of a state is implemented in the statehelp function. More...
 

Function Documentation

function d4_cust::update_customer ( )

You can change customer data in the INPUT operator in update_customer function.

Edited data is saved in the customer table.

Returns
No value

dot_d4_cust_F_update_customer.png

function d4_cust::customer ( )

The customer function has the menu, which can be used to perform client-related tasks.

Returns
No value

dot_d4_cust_F_customer.png

function d4_cust::statehelp ( )

The ability to choose a number and a name of a state is implemented in the statehelp function.

The function is activated after exiting the 'state' field.

Returns
No value

dot_d4_cust_F_statehelp.png

function d4_cust::delete_customer ( )

The ability to delete a customer is implemented in the delete_customer function.

A client with at least one order can not be deleted. Before deleting a client, you have to delete all the orders from the client.

Returns
No value

dot_d4_cust_F_delete_customer.png

function d4_cust::customer_help ( )

Context help is implemented in the customer_help function.

The help can be called with F1 key or CONTROL-W combination. The help content is stored in helpdemo.src file.

Returns
No value

dot_d4_cust_F_customer_help.png

function d4_cust::add_customer (   repeat)

The add_customer function has the ability to add data on one or several customers to the database.

Parameters
repeatINTEGER If non-zero value is provided then user will be prompted for customer data repeatedly
Returns
No value

dot_d4_cust_F_add_customer.png

function d4_cust::query_customer (   mrow)

In the CONSTRUCT operator in the query_customer function, the customer search criteria is entered.

If the customer is found, the data is displayed in a form with the ability to scroll through records. Scrolling is implemented using 'customer_set' SCROLL-cursor and "BROWSE" menu.

Parameters
mrowSMALLINT message row position
Returns
TRUE if query was successful or FALSE if error occurred.

dot_d4_cust_F_query_customer.png

function d4_cust::input_cust ( )

You can enter new customer data in the INPUT operator in the unput_cust function.

Entered data is written to customer table.

Returns
TRUE if data was provided by user and written to customer table. Otherwise returns FALSE.

dot_d4_cust_F_input_cust.png