Module ORDENTRY.SRC
1//======================================================================
2// OrdEntry.Src - Order Entry main program
3//
4// This is our main order entry program. It contains three views: customer
5// entry, order entry, and sales person entry. Creating a main program
6// is pretty much a cut and paste affair. First, load the template
7// program named mainprog.tem. Next, find all of the ????? in the
8// template program and replace them with values that are meaningful
9// for your application. Add all the views required to make your
10// application work. Finally, compile your program and you are finished.
11//
12//======================================================================
13
14
15Use ALLENTRC
16Use ALLENTRY
17Use EXITAPP // Smarter exit. Checks and warns of changes.
18
19//send toggle_tracer to (tracer(self))
20set Application_name to "OrderEntry" // this is useful for the help system
21
22//************************* create backdrop ***************************
23
24Use BackGnd // Standard background and title...creates object
25Send Paint_Desktop to (Background(self)) ;
26 "Data Access Order Entry System - DD" // You set the title
27
28//************************* create main menu ***************************
29
30/Main_Menu
31 ______ ____ ___________ ____ ________ ____
32/View_Pull_Down
33┌─────────────────────────────┐
34│ ___________________________ │
35│ ___________________________ │
36│ ___________________________ │
37│ ___________________________ │
38│ ___________________________ │
39├─────────────────────────────┤
40│ ___________________________ │
41└─────────────────────────────┘
42/Maint_Pull_Down
43┌─────────────────────────────┐
44│ ___________________________ │
45└─────────────────────────────┘
46/*
47
48Create_Menu Main_Menu Location 1 0 Absolute
49
50 Set Action_Bar_Keys_Msg To Main_Menu_Keys
51
52 #INCLUDE RECDE_PD.INC
53
54 On_Item "View" Begin_Pull_Down View_Pull_Down
55 On_Item "&Customer Entry View\aAlt+1" Send Activate_Customer to desktop
56 On_Item "&Sales Person Entry View\aAlt+2" Send Activate_SalesP to desktop
57 On_Item "&Vendor Entry View\aAlt+3" Send Activate_Vendor to desktop
58 On_Item "&Inventory Item View\aAlt+4" Send Activate_Invt to desktop
59 On_Item "&Order Entry\aAlt+5" Send Activate_OrderEnt to desktop
60 On_Item "C&lose\aF3" Send Exit_Function
61 End_Pull_Down
62
63 On_Item "Maintenance" Begin_Pull_Down Maint_Pull_Down
64 On_Item "&Import/Delete Customers" Send Activate_Import_Delete_Customers to desktop
65 End_Pull_Down
66
67 #INCLUDE TXTW_PD.INC
68 #INCLUDE NAVI_PD.INC
69 #INCLUDE HELPA_PD.INC // modified help pulldown. Includes about.
70
71End_Menu
72
73// Hot key support
74Procedure Main_Menu_Keys For Desktop Integer Act_Obj
75 On_Key KEY_ALT+KEY_R Send Activate To (Record_Pull_Down(Act_Obj)) Private
76 On_Key KEY_ALT+KEY_V Send Activate To (View_Pull_Down(Act_Obj)) Private
77 On_Key KEY_ALT+KEY_T Send Activate To (Text_Pull_Down(Act_Obj)) Private
78 On_Key KEY_ALT+KEY_N Send Activate To (Navigate_Pull_Down(Act_Obj)) Private
79 On_Key KEY_ALT+KEY_H Send Activate To (Help_Pull_Down(Act_Obj)) Private
80 //
81 On_Key KEY_ALT+KEY_1 Send Activate_Customer to Desktop Private
82 On_Key KEY_ALT+KEY_2 Send Activate_SalesP to Desktop Private
83 On_Key KEY_ALT+KEY_3 Send Activate_Vendor to Desktop Private
84 On_Key KEY_ALT+KEY_4 Send Activate_Invt to Desktop Private
85 On_Key KEY_ALT+KEY_5 Send Activate_OrderEnt to Desktop Private
86 //
87End_Procedure
88
89
90//************************* Global Button Bar Object*************************
91
92Use MainBtn // Btn_bar desktop object
93
94//************************* View Packages/Objects ***************************
95
96Use OrdAbout.vw
97Use Customer.vw
98Use SalesP.vw
99Use Vendor.vw
100Use Invt.vw
101Use OrderEnt.vw
102
103Use ImpDelC.vw
104
105// always activate the btn bar before the action_bar
106Send Add_Focus to Btn_Bar Desktop
107Send Activate to Main_Menu
108
109Start_Ui (Main_Menu(self)) // start the program
110