-
\MyProjects\
INFO465
|
+
gs9191.db
|
|
.
//Detailed in an attached ERD & Data Dictionary
|
|
|
+
Extended
Database
Attributes
|
+
Validation Rules
|
-
validate_ledger_id
|
.
//Requires number
in the range 1000-5999
|
|
|
-
validate_activity_id
|
.
//Requires number
in the range 100-999
|
|
|
|
|
+
Edit Styles
|
-
gs_classes
|
.
//DropDownList
Contains valid class for
gs table
|
|
|
-
gs_lookup
|
.
DDDW
Uses dw_gs_lookup to select everything
|
|
|
-
gs_sales_lookup
|
.
DDDW
Uses dw_gs_sales_lookup
to display only PriceListed
Goods & Services
|
|
|
-
gs_supplier_lookup
|
.
DDDW
Uses Retrieval Argument passed
to DataWindow Child to only
display Goods & Services offered
by the selected enterprise
|
|
|
-
ledger_lookup
|
.
//DropDownDataWindow
Uses dw_ledger_lookup
returns id from ledger table
|
|
|
-
other_lookups
|
|
.
//What's in your application
|
|
|
|
|
+
enterprise.def
|
.
//An ASCII file Containing
enterprise id, name, email addres, and description of trade
in asterisc-delimited fields
|
|
|
|
+
gs9191.pbl
|
+
Application Object
gs9191
|
-
Global Variables
|
.
//Each student please detail these
and comment them to describe their use
|
|
|
|
+
Functions
|
-
parseline
|
|
.
to be detailed by each student
|
|
|
|
.
others as used in the application
|
|
|
+
Windows
|
+
w_main_panel
|
+
@open
|
|
-
Process enterprise.def
|
|
.
//To be detailed by each student
|
|
|
|
+
Table maintenance
Buttons
|
-
cb_ldet
|
-
@getfocus
|
.
this.default <--true
st_helper.text <-- Helpful prompt
|
|
|
|
|
+
Order Entry
Buttons
|
-
cb_psx12_inbound
receive psX12 orders
|
.
//look to details about
to Ledger Engine for syntax
and logic you might adopt
|
|
|
-
cb_send_psX12
|
.
//Report any orders queued for psX12 and
//provide option for sending them
|
|
|
-
cb_psx12_send_cat
|
.
//script posted on website
//1 point penalty
//for false advertising
|
|
|
-
cb_psx12_request_cat
request psX12 catalog
|
|
|
+
Report
Buttons
|
-
cb_report_others_
in_your_application
|
|
|
+
Buttons for
Journals &
Financials
|
|
|
+
Table Maintenance
|
+
w_gs_maint
|
+
Instance
Variables
|
.
boolean FirstPass <-- TRUE
integer TheId
long TheRow
|
|
|
+
Event
Scripts
|
-
@open
|
-
SQLCA.SQLCODE <> 0 and
SQLCA.SQLCODE <> -1
|
.
MessageBox "SQLCODE ->" +
STRING(SQLCA.SQLCODE) + "<-",
SQLCA.SQLERRTEXT
Halt
|
|
|
.
//Get lookup window & buttons set for first use
dwc_lookup.SetTransObject(SQLCA)
dwc_lookup.Retrieve()
dwc_lookup.SetRow(1)
Enable Buttons for first use
dwc_maint.Enabled <-- false
cb_delete.Enabled <-- false
cb_save.Enabled <-- false
cb_update.Enabled <-- true
cb_new.Enabled <-- true
cb_cancel.Enabled <-- false
|
|
|
|
|
+
Controls
|
-
dwc_lookup
|
.
DataObject is dw_gs_lookup
|
|
|
-
dwc_maint
|
|
.
DataObject is dw_gs_maint
|
|
|
-
st_helper
|
|
.
//Text is used to display prompts for User
|
|
|
-
cb_save
|
|
-
@click
|
-
SQLCode = 1
|
.
COMMIT
//Set buttons and controls for next use
//
|
|
|
or
-
else
|
.
messagebox with SQLError
Halt
|
|
|
|
|
|
|
+
w_activity_maint
|
.
inherited from w_ldet_maint
dwc_lookup DataObject is dw_activity_lookup
|
|
|
|
+
Order Entry
|
+
w_order_entry
|
|
+
Controls
|
-
cb_go2order
|
|
-
@click
|
.
//This does several things,
detail them very clearly
|
|
|
|
-
cb_detail_ok
|
|
-
@click
|
.
//This does lots, too, including
inserting the new Detail into the database
detail it carefully
|
|
|
|
|
-
cb_tender
|
|
-
@click
|
|
.
//Make sure to show how it 'flips the sign' &c
|
|
|
|
|
|
|
+
w_salesorder_entry
|
|
.
This should show clearly
|
|
|
|
+
Reports
|
-
w_others
|
|
.
to be detailed later as appropriate for your Enterprise
|
|
|
|
+
Journals &
Financials
|
-
w_adate_maint
|
.
inherited from w_ldet_maint
|
|
.
modify local scripts dwc_lookup Clicked and cb_save to handle
date for id instead of integer
as in the rest of the series, see posted at website
|
|
-
@close
|
.
//edit that the date's details net zero
//select sum(qty*each) into net
|
|
-
net <> 0
|
.
messagebox No can do, gotta net zero
|
|
|
or
-
net <> 0
|
|
.
messagebox thanks & congratulations
|
|
|
|
-
dwc_lookup
|
.
DataObject is dw_adate_lookup
|
|
|
|
|
-
w_psX12_JV
|
.
//Hack together Email a CAT & Display a JV
//Make it email the JV instead of, along with,
//displaying it
|
|
|
|
|
|
+
Data Windows
|
+
Table Maintenance
|
-
dw_gs_lookup
|
|
.
Supplies gs id & name for Lookup
|
|
|
-
dw_gs_maint
|
|
.
Supplies fields in gs record that user can edit
|
|
|
-
dw_other_lookup
|
|
.
//Make yours as complete as the system tree
|
|
|
|
+
Order Entry
|
-
dw_sales_detail
|
|
.
//Only selects Price Listed G&S
|
|
|
|
-
dw_ordered_details
|
.
//tabular datawindow with Order's header info
in Header Band, Details in the Details band,
and a running total in the Summary band
|
|
.
Uses Retrieval Argument id2get to select
Details for the current order
|
|
|
|
+
Journals &
Financial
Statements
|
.
//Detail any in your application
|
|
|
|
|
|