Exercise 1
1. Create a data block called "Employee" based on the S_EMP table.
2. Create a canvas called "EMP_CANVAS" to display the data block.
3. START_DATE is a field in the S_EMP table. Initialize the value of START_DATE to be the current date.
4. Make COMMISSION_PCT a radio group, and add five radio buttons: 10, 12.5, 15, 17.5, 20 to the group. So that the user can choose from these values.
Exercise 2
You need to complete Forms Builder Tutorial Part I to finish this exercise. After you complete this exercise, you will be familiar with data block, canvas, control block, button, initial value, radio button.
Download and execute the script company.sql, it will create several tables. The figure below shows the relational schema of these tables. Also you can examine the tables in the Object Navigator under the Database Objects.
Exercise 4
You need to complete Forms Builder Tutorial Part II to finish this exercise. The objectives of this exercise are: trigger, LOV, sequence, program units and calculated values, alert.
A. The following exercises will use Works.fmb which you created in Exercise 2.
Create a "Save" button to save information and add a WHEN-BUTTON-PRESSED trigger.
Add an LOV which is connected to the "Department" button. The values returned by the LOV must be input into DNUM and DEPT_NAME in the form.
Make PNUMBER a system generated field after creating a database sequence. The value will be generated when you try to insert a new record (use a PRE-INSERT trigger). Please note that there are existing values in the column, and make sure your sequence follow the primary key constraint. Since this value will be auto generated it will no longer be a required field. Go to the Property Palette for Pnumber and change the "Required" field to "No".
Add a text item WAGE to data block WORKS_ON. Move the newly added text item around so that it aligns with other items in WORKS_ON data block.
Add a program unit called Get_Wage which calculates the wage based on the hours the employee worked on the project (wage=hours*20).
Add a POST-QUERY trigger to the WORKS_ON data block which calls the Get_Wage program unit.
Create an alert. Make sure that the alert will be called when the "Save" button is pressed and provide the option to submit or to cancel.
Save the form.
B. The following exercises will use Rental.fmb which you created in Exercise 3.
Create a "Save" button to save information and add a WHEN-BUTTON-PRESSED trigger on the Client Canvas.
Add an LOV which is connected to the "Client" button. The clientNo and the Client Last Name returned by the LOV must be input into clientNo and CLIENT_NAME in the form.
Create an alert. Make sure that the alert will be called when the "Save" button is pressed and provide the option to submit or to cancel.
Save the form.
Exercise 5
You need to complete Forms Builder Tutorial Part III to finish this exercise. The objectives of this exericse are: trigger, delete records, clear forms, close windows, switch between canvases.
A. The following exercises will use Works.fmb which you updated in Exercise 4.
Add a "Delete Project" button to delete the project information. Make sure you delete all the works_on information related to the deleted project.
Add a "Delete Works_On" button to delete the works_on information.
Add a "Clear" button to clear the whole form.
Create another canvas called EMP_CANVAS to manage the information of the employees. Add a data block called EMPLOYEE to EMP_CANVAS to display the employee information.
Add a "Employee Mangement" button to PROJECT_CANVAS, so that when the user click this button, he/she will be navigated to EMP_CANVAS.
B. The following exercises will use Rental.fmb which you updated in Exercise 4.
Add a "Delete Viewing" button to VIEW_CANVAS to delete the viewing information.
Add a "Clear" button to VIEW_CANVAS to clear the whole form.
Add a "Client Mangement" button to VIEW_CANVAS, so that when the user click this button, he/she will be navigated to CLIENT_CANVAS
1. Create a data block called "Employee" based on the S_EMP table.
2. Create a canvas called "EMP_CANVAS" to display the data block.
3. START_DATE is a field in the S_EMP table. Initialize the value of START_DATE to be the current date.
4. Make COMMISSION_PCT a radio group, and add five radio buttons: 10, 12.5, 15, 17.5, 20 to the group. So that the user can choose from these values.
Exercise 2
You need to complete Forms Builder Tutorial Part I to finish this exercise. After you complete this exercise, you will be familiar with data block, canvas, control block, button, initial value, radio button.
Download and execute the script company.sql, it will create several tables. The figure below shows the relational schema of these tables. Also you can examine the tables in the Object Navigator under the Database Objects.
Exercise 4
You need to complete Forms Builder Tutorial Part II to finish this exercise. The objectives of this exercise are: trigger, LOV, sequence, program units and calculated values, alert.
A. The following exercises will use Works.fmb which you created in Exercise 2.
Create a "Save" button to save information and add a WHEN-BUTTON-PRESSED trigger.
Add an LOV which is connected to the "Department" button. The values returned by the LOV must be input into DNUM and DEPT_NAME in the form.
Make PNUMBER a system generated field after creating a database sequence. The value will be generated when you try to insert a new record (use a PRE-INSERT trigger). Please note that there are existing values in the column, and make sure your sequence follow the primary key constraint. Since this value will be auto generated it will no longer be a required field. Go to the Property Palette for Pnumber and change the "Required" field to "No".
Add a text item WAGE to data block WORKS_ON. Move the newly added text item around so that it aligns with other items in WORKS_ON data block.
Add a program unit called Get_Wage which calculates the wage based on the hours the employee worked on the project (wage=hours*20).
Add a POST-QUERY trigger to the WORKS_ON data block which calls the Get_Wage program unit.
Create an alert. Make sure that the alert will be called when the "Save" button is pressed and provide the option to submit or to cancel.
Save the form.
B. The following exercises will use Rental.fmb which you created in Exercise 3.
Create a "Save" button to save information and add a WHEN-BUTTON-PRESSED trigger on the Client Canvas.
Add an LOV which is connected to the "Client" button. The clientNo and the Client Last Name returned by the LOV must be input into clientNo and CLIENT_NAME in the form.
Create an alert. Make sure that the alert will be called when the "Save" button is pressed and provide the option to submit or to cancel.
Save the form.
Exercise 5
You need to complete Forms Builder Tutorial Part III to finish this exercise. The objectives of this exericse are: trigger, delete records, clear forms, close windows, switch between canvases.
A. The following exercises will use Works.fmb which you updated in Exercise 4.
Add a "Delete Project" button to delete the project information. Make sure you delete all the works_on information related to the deleted project.
Add a "Delete Works_On" button to delete the works_on information.
Add a "Clear" button to clear the whole form.
Create another canvas called EMP_CANVAS to manage the information of the employees. Add a data block called EMPLOYEE to EMP_CANVAS to display the employee information.
Add a "Employee Mangement" button to PROJECT_CANVAS, so that when the user click this button, he/she will be navigated to EMP_CANVAS.
B. The following exercises will use Rental.fmb which you updated in Exercise 4.
Add a "Delete Viewing" button to VIEW_CANVAS to delete the viewing information.
Add a "Clear" button to VIEW_CANVAS to clear the whole form.
Add a "Client Mangement" button to VIEW_CANVAS, so that when the user click this button, he/she will be navigated to CLIENT_CANVAS
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}