├── 01 - Progress DCA ├── Base │ ├── Sports.b1 │ ├── Sports.d1 │ ├── Sports.db │ ├── Sports.lg │ ├── Sports.st │ ├── Sports_10.d1 │ ├── Sports_11.d1 │ ├── Sports_7.d1 │ ├── Sports_8.d1 │ └── Sports_9.d1 ├── Hello-Word │ ├── Hello-Word-01.i │ ├── Hello-Word.p │ ├── teste.r │ └── teste.w └── Laboratório │ ├── 01_01_l-add1.p │ ├── 01_02_l-add2.p │ ├── 02_01_l-add3.p │ ├── 02_02_l-chg1.p │ ├── 03_01_l-chg2.p │ ├── 03_02_l-chg3.p │ ├── 03_03_l-chg4.p │ ├── 03_04_l-disp.p │ ├── 03_05_l-disp1.p │ ├── 03_06_l-sort1.p │ ├── 03_07_l-names.p │ ├── 03_08_l-match.p │ ├── 04_01_l-cred2.p │ ├── 04_02_l-xferj.p │ ├── 04_03_l-disp2.p │ ├── 04_04_l-chg5.p │ ├── 04_05_l-orders.p │ ├── 05_01_l-del.p │ ├── 05_02_l-addchg.p │ ├── 05_03_l-orderdel.p │ ├── 05_04_l-disp3.p │ ├── 05_05_l-disp4.p │ ├── 05_06_l-disp5.p │ ├── 05_07_l-disp6.p │ ├── 05_08_l-disp7.p │ ├── 05_09_l-del2.p │ ├── 05_10_l-del3.p │ ├── 05_11_l-buffer.p │ ├── 06_01_l-updrep.p │ ├── 06_02_l-disord.p │ ├── 06_03_l-dcust.p │ ├── 06_04_l-ucust.p │ ├── 06_05_l-col1.p │ ├── 06_06_l-col2.p │ ├── 06_07_l-mltfrm.p │ ├── 07_01_l-include.i │ ├── 07_01_l-include.p │ ├── 07_02_l-inc2.p │ ├── 08_01_l-break1.p │ └── Database - Sports.txt ├── 02 - Progress ADE └── Apostila Progress ADE.pdf ├── 03 - Progress ACE └── Progress ACE - Apostila e Laboratórios.pdf ├── 06 - DDKGUI ├── spbrw │ ├── b01sp007.r │ ├── b01sp007.w │ ├── b01sp008.r │ ├── b01sp008.w │ ├── b02sp008.r │ └── b02sp008.w ├── spgo │ ├── g01sp008.r │ └── g01sp008.w ├── sports │ ├── Sports.lg │ ├── Sports.st │ ├── Sports_10.d1 │ └── Sports_9.d1 ├── spp │ ├── sp0011.r │ ├── sp0011.w │ ├── sp0012.r │ ├── sp0012.w │ ├── sp0012a.w │ ├── sp0081.r │ └── sp0081.w ├── spqry │ ├── q01sp001.r │ ├── q01sp001.w │ ├── q01sp007.r │ ├── q01sp007.w │ └── q01sp008.r ├── spvwr │ ├── v01sp001.r │ ├── v01sp001.w │ ├── v01sp007.r │ ├── v01sp007.w │ ├── v01sp008.r │ ├── v01sp008.w │ ├── v02sp001.r │ ├── v02sp001.w │ ├── v02sp007.r │ ├── v02sp007.w │ ├── v03sp001.r │ └── v03sp001.w └── spzoom │ ├── z01sp008.r │ └── z01sp008.w └── README.md /01 - Progress DCA/Base/Sports.b1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports.b1 -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports.d1 -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports.db -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports.lg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports.lg -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports.st: -------------------------------------------------------------------------------- 1 | # 2 | b !"D:\2015-00-DEV\Study\Study-Progress\01 - Progress DCA\Base\" 3 | # 4 | d "Schema Area":6,32;1 !"D:\2015-00-DEV\Study\Study-Progress\01 - Progress DCA\Base\" 5 | # 6 | d "Info Area":7,32;1 !"D:\2015-00-DEV\Study\Study-Progress\01 - Progress DCA\Base\" 7 | # 8 | d "Customer/Order Area":8,32;8 !"D:\2015-00-DEV\Study\Study-Progress\01 - Progress DCA\Base\" 9 | # 10 | d "Primary Index Area":9,1;8 !"D:\2015-00-DEV\Study\Study-Progress\01 - Progress DCA\Base\" 11 | # 12 | d "Customer Index Area":10,1;64 !"D:\2015-00-DEV\Study\Study-Progress\01 - Progress DCA\Base\" 13 | # 14 | d "Order Index Area":11,32;64 !"D:\2015-00-DEV\Study\Study-Progress\01 - Progress DCA\Base\" 15 | -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports_10.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports_10.d1 -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports_11.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports_11.d1 -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports_7.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports_7.d1 -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports_8.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports_8.d1 -------------------------------------------------------------------------------- /01 - Progress DCA/Base/Sports_9.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Base/Sports_9.d1 -------------------------------------------------------------------------------- /01 - Progress DCA/Hello-Word/Hello-Word-01.i: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /01 - Progress DCA/Hello-Word/Hello-Word.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Hello-Word/Hello-Word.p -------------------------------------------------------------------------------- /01 - Progress DCA/Hello-Word/teste.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Hello-Word/teste.r -------------------------------------------------------------------------------- /01 - Progress DCA/Hello-Word/teste.w: -------------------------------------------------------------------------------- 1 | &ANALYZE-SUSPEND _VERSION-NUMBER AB_v10r12 GUI 2 | &ANALYZE-RESUME 3 | &Scoped-define WINDOW-NAME C-Win 4 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS C-Win 5 | /*------------------------------------------------------------------------ 6 | 7 | File: 8 | 9 | Description: 10 | 11 | Input Parameters: 12 | 13 | 14 | Output Parameters: 15 | 16 | 17 | Author: 18 | 19 | Created: 20 | 21 | ------------------------------------------------------------------------*/ 22 | /* This .W file was created with the Progress AppBuilder. */ 23 | /*----------------------------------------------------------------------*/ 24 | 25 | /* Create an unnamed pool to store all the widgets created 26 | by this procedure. This is a good default which assures 27 | that this procedure's triggers and internal procedures 28 | will execute in this procedure's storage, and that proper 29 | cleanup will occur on deletion of the procedure. */ 30 | 31 | CREATE WIDGET-POOL. 32 | 33 | /* *************************** Definitions ************************** */ 34 | 35 | /* Parameters Definitions --- */ 36 | 37 | /* Local Variable Definitions --- */ 38 | 39 | /* _UIB-CODE-BLOCK-END */ 40 | &ANALYZE-RESUME 41 | 42 | 43 | &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK 44 | 45 | /* ******************** Preprocessor Definitions ******************** */ 46 | 47 | &Scoped-define PROCEDURE-TYPE Window 48 | &Scoped-define DB-AWARE no 49 | 50 | /* Name of designated FRAME-NAME and/or first browse and/or first query */ 51 | &Scoped-define FRAME-NAME DEFAULT-FRAME 52 | 53 | /* Standard List Definitions */ 54 | &Scoped-Define ENABLED-OBJECTS RADIO-SET-1 55 | &Scoped-Define DISPLAYED-OBJECTS RADIO-SET-1 56 | 57 | /* Custom List Definitions */ 58 | /* List-1,List-2,List-3,List-4,List-5,List-6 */ 59 | 60 | /* _UIB-PREPROCESSOR-BLOCK-END */ 61 | &ANALYZE-RESUME 62 | 63 | 64 | 65 | /* *********************** Control Definitions ********************** */ 66 | 67 | /* Define the widget handle for the window */ 68 | DEFINE VAR C-Win AS WIDGET-HANDLE NO-UNDO. 69 | 70 | /* Definitions of the field level widgets */ 71 | DEFINE VARIABLE RADIO-SET-1 AS INTEGER 72 | VIEW-AS RADIO-SET HORIZONTAL 73 | RADIO-BUTTONS 74 | "Comandos do Progress", 1, 75 | "Frame B", 2, 76 | "Frame C", 3 77 | SIZE 78 BY 1.12 NO-UNDO. 78 | 79 | 80 | /* ************************ Frame Definitions *********************** */ 81 | 82 | DEFINE FRAME DEFAULT-FRAME 83 | RADIO-SET-1 AT ROW 1.27 COL 2 NO-LABEL WIDGET-ID 6 84 | WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY 85 | SIDE-LABELS NO-UNDERLINE THREE-D 86 | AT COL 1 ROW 1 87 | SIZE 80 BY 16 WIDGET-ID 100. 88 | 89 | DEFINE FRAME FRAME-A 90 | WITH 1 DOWN KEEP-TAB-ORDER OVERLAY 91 | SIDE-LABELS NO-UNDERLINE THREE-D 92 | AT COL 2 ROW 2.62 93 | SIZE 78 BY 14.27 94 | TITLE "Frame A" WIDGET-ID 200. 95 | 96 | 97 | /* *********************** Procedure Settings ************************ */ 98 | 99 | &ANALYZE-SUSPEND _PROCEDURE-SETTINGS 100 | /* Settings for THIS-PROCEDURE 101 | Type: Window 102 | Allow: Basic,Browse,DB-Fields,Window,Query 103 | Other Settings: COMPILE 104 | */ 105 | &ANALYZE-RESUME _END-PROCEDURE-SETTINGS 106 | 107 | /* ************************* Create Window ************************** */ 108 | 109 | &ANALYZE-SUSPEND _CREATE-WINDOW 110 | IF SESSION:DISPLAY-TYPE = "GUI":U THEN 111 | CREATE WINDOW C-Win ASSIGN 112 | HIDDEN = YES 113 | TITLE = "Hello Word!" 114 | HEIGHT = 16 115 | WIDTH = 80 116 | MAX-HEIGHT = 16 117 | MAX-WIDTH = 80 118 | VIRTUAL-HEIGHT = 16 119 | VIRTUAL-WIDTH = 80 120 | RESIZE = yes 121 | SCROLL-BARS = no 122 | STATUS-AREA = no 123 | BGCOLOR = ? 124 | FGCOLOR = ? 125 | KEEP-FRAME-Z-ORDER = yes 126 | THREE-D = yes 127 | MESSAGE-AREA = no 128 | SENSITIVE = yes. 129 | ELSE {&WINDOW-NAME} = CURRENT-WINDOW. 130 | /* END WINDOW DEFINITION */ 131 | &ANALYZE-RESUME 132 | 133 | 134 | 135 | /* *********** Runtime Attributes and AppBuilder Settings *********** */ 136 | 137 | &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES 138 | /* SETTINGS FOR WINDOW C-Win 139 | VISIBLE,,RUN-PERSISTENT */ 140 | /* REPARENT FRAME */ 141 | ASSIGN FRAME FRAME-A:FRAME = FRAME DEFAULT-FRAME:HANDLE. 142 | 143 | /* SETTINGS FOR FRAME DEFAULT-FRAME 144 | FRAME-NAME */ 145 | 146 | DEFINE VARIABLE XXTABVALXX AS LOGICAL NO-UNDO. 147 | 148 | ASSIGN XXTABVALXX = FRAME FRAME-A:MOVE-AFTER-TAB-ITEM (RADIO-SET-1:HANDLE IN FRAME DEFAULT-FRAME) 149 | /* END-ASSIGN-TABS */. 150 | 151 | /* SETTINGS FOR FRAME FRAME-A 152 | */ 153 | IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win) 154 | THEN C-Win:HIDDEN = no. 155 | 156 | /* _RUN-TIME-ATTRIBUTES-END */ 157 | &ANALYZE-RESUME 158 | 159 | 160 | 161 | 162 | 163 | /* ************************ Control Triggers ************************ */ 164 | 165 | &Scoped-define SELF-NAME C-Win 166 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL C-Win C-Win 167 | ON END-ERROR OF C-Win /* Hello Word! */ 168 | OR ENDKEY OF {&WINDOW-NAME} ANYWHERE DO: 169 | /* This case occurs when the user presses the "Esc" key. 170 | In a persistently run window, just ignore this. If we did not, the 171 | application would exit. */ 172 | IF THIS-PROCEDURE:PERSISTENT THEN RETURN NO-APPLY. 173 | END. 174 | 175 | /* _UIB-CODE-BLOCK-END */ 176 | &ANALYZE-RESUME 177 | 178 | 179 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL C-Win C-Win 180 | ON WINDOW-CLOSE OF C-Win /* Hello Word! */ 181 | DO: 182 | /* This event will close the window and terminate the procedure. */ 183 | APPLY "CLOSE":U TO THIS-PROCEDURE. 184 | RETURN NO-APPLY. 185 | END. 186 | 187 | /* _UIB-CODE-BLOCK-END */ 188 | &ANALYZE-RESUME 189 | 190 | 191 | &UNDEFINE SELF-NAME 192 | 193 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK C-Win 194 | 195 | 196 | /* *************************** Main Block *************************** */ 197 | 198 | /* Set CURRENT-WINDOW: this will parent dialog-boxes and frames. */ 199 | ASSIGN CURRENT-WINDOW = {&WINDOW-NAME} 200 | THIS-PROCEDURE:CURRENT-WINDOW = {&WINDOW-NAME}. 201 | 202 | /* The CLOSE event can be used from inside or outside the procedure to */ 203 | /* terminate it. */ 204 | ON CLOSE OF THIS-PROCEDURE 205 | RUN disable_UI. 206 | 207 | /* Best default for GUI applications is... */ 208 | PAUSE 0 BEFORE-HIDE. 209 | 210 | /* Now enable the interface and wait for the exit condition. */ 211 | /* (NOTE: handle ERROR and END-KEY so cleanup code will always fire. */ 212 | MAIN-BLOCK: 213 | DO ON ERROR UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK 214 | ON END-KEY UNDO MAIN-BLOCK, LEAVE MAIN-BLOCK: 215 | RUN enable_UI. 216 | IF NOT THIS-PROCEDURE:PERSISTENT THEN 217 | WAIT-FOR CLOSE OF THIS-PROCEDURE. 218 | END. 219 | 220 | /* _UIB-CODE-BLOCK-END */ 221 | &ANALYZE-RESUME 222 | 223 | 224 | /* ********************** Internal Procedures *********************** */ 225 | 226 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI C-Win _DEFAULT-DISABLE 227 | PROCEDURE disable_UI : 228 | /*------------------------------------------------------------------------------ 229 | Purpose: DISABLE the User Interface 230 | Parameters: 231 | Notes: Here we clean-up the user-interface by deleting 232 | dynamic widgets we have created and/or hide 233 | frames. This procedure is usually called when 234 | we are ready to "clean-up" after running. 235 | ------------------------------------------------------------------------------*/ 236 | /* Delete the WINDOW we created */ 237 | IF SESSION:DISPLAY-TYPE = "GUI":U AND VALID-HANDLE(C-Win) 238 | THEN DELETE WIDGET C-Win. 239 | IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. 240 | END PROCEDURE. 241 | 242 | /* _UIB-CODE-BLOCK-END */ 243 | &ANALYZE-RESUME 244 | 245 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE enable_UI C-Win _DEFAULT-ENABLE 246 | PROCEDURE enable_UI : 247 | /*------------------------------------------------------------------------------ 248 | Purpose: ENABLE the User Interface 249 | Parameters: 250 | Notes: Here we display/view/enable the widgets in the 251 | user-interface. In addition, OPEN all queries 252 | associated with each FRAME and BROWSE. 253 | These statements here are based on the "Other 254 | Settings" section of the widget Property Sheets. 255 | ------------------------------------------------------------------------------*/ 256 | DISPLAY RADIO-SET-1 257 | WITH FRAME DEFAULT-FRAME IN WINDOW C-Win. 258 | ENABLE RADIO-SET-1 259 | WITH FRAME DEFAULT-FRAME IN WINDOW C-Win. 260 | {&OPEN-BROWSERS-IN-QUERY-DEFAULT-FRAME} 261 | VIEW FRAME FRAME-A IN WINDOW C-Win. 262 | {&OPEN-BROWSERS-IN-QUERY-FRAME-A} 263 | VIEW C-Win. 264 | END PROCEDURE. 265 | 266 | /* _UIB-CODE-BLOCK-END */ 267 | &ANALYZE-RESUME 268 | 269 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/01_01_l-add1.p: -------------------------------------------------------------------------------- 1 | INSERT customer WITH 1 COLUMN. 2 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/01_02_l-add2.p: -------------------------------------------------------------------------------- 1 | /* 2 | INSERT customer WITH 1 COLUMN. 3 | 4 | 5 | INSERT = CREATE DISPLAY PROMPT-FOR ASSIGN 6 | UPDATE = DISPLAY PROMPT-FOR ASSIGN 7 | SET = PROMPT-FOR ASSIGN 8 | 9 | */ 10 | 11 | CREATE customer. 12 | DISPLAY customer WITH 1 COLUMN. 13 | PROMPT-FOR customer. 14 | ASSIGN customer. 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/02_01_l-add3.p: -------------------------------------------------------------------------------- 1 | REPEAT: 2 | INSERT customer WITH 1 COLUMN. 3 | END. 4 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/02_02_l-chg1.p: -------------------------------------------------------------------------------- 1 | FOR EACH customer: 2 | UPDATE customer WITH 1 COLUMN. 3 | END. 4 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_01_l-chg2.p: -------------------------------------------------------------------------------- 1 | REPEAT: 2 | PROMPT-FOR customer.cust-num. 3 | FIND customer USING cust-num. 4 | UPDATE customer WITH 1 COLUMN. 5 | END. 6 | 7 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_02_l-chg3.p: -------------------------------------------------------------------------------- 1 | REPEAT: 2 | PROMPT-FOR customer.cust-num. 3 | FIND customer USING cust-num. 4 | DISPLAY customer WITH 1 COLUMN. 5 | SET customer. 6 | END. 7 | 8 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_03_l-chg4.p: -------------------------------------------------------------------------------- 1 | REPEAT: 2 | PROMPT-FOR customer.cust-num. 3 | FIND customer USING cust-num. 4 | DISPLAY customer WITH 1 COLUMN. 5 | PROMPT-FOR customer. 6 | ASSIGN customer. 7 | END. 8 | 9 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_04_l-disp.p: -------------------------------------------------------------------------------- 1 | FOR EACH customer 2 | WHERE customer.country BEGINS "F": 3 | DISPLAY customer.cust-num 4 | customer.NAME 5 | customer.country. 6 | END. 7 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_05_l-disp1.p: -------------------------------------------------------------------------------- 1 | FOR EACH customer 2 | WHERE customer.country BEGINS "F" 3 | AND customer.postal-code BEGINS "7": 4 | DISPLAY customer.cust-num 5 | customer.NAME 6 | customer.country 7 | customer.postal-code. 8 | END. 9 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_06_l-sort1.p: -------------------------------------------------------------------------------- 1 | FOR EACH customer BY customer.country BY customer.NAME: 2 | DISPLAY customer.cust-num 3 | customer.country 4 | customer.NAME 5 | customer.credit-limit. 6 | END. 7 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_07_l-names.p: -------------------------------------------------------------------------------- 1 | PROMPT-FOR customer.NAME. 2 | FIND FIRST customer WHERE customer.NAME BEGINS INPUT customer.NAME NO-ERROR. 3 | IF AVAILABLE customer THEN DO: 4 | DISPLAY customer.cust-num customer.NAME customer.country. 5 | REPEAT: 6 | FIND NEXT customer. 7 | DISPLAY customer.cust-num customer.NAME customer.country. 8 | END. 9 | END. 10 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/03_08_l-match.p: -------------------------------------------------------------------------------- 1 | PROMPT-FOR customer.NAME. 2 | FOR EACH customer WHERE customer.NAME MATCHES "*" + INPUT customer.NAME + "*": 3 | DISPLAY customer.cust-num customer.NAME customer.sales-rep. 4 | END. 5 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/04_01_l-cred2.p: -------------------------------------------------------------------------------- 1 | PROMPT-FOR customer.cust-num. 2 | FIND FIRST customer USING INPUT customer.cust-num NO-ERROR. 3 | IF AVAILABLE customer THEN DO: 4 | DISP customer.cust-num customer.NAME customer.credit-limit. 5 | DEF VARIABLE limite LIKE customer.credit-limit. 6 | ASSIGN limite = customer.credit-limit. 7 | FOR EACH customer WHERE customer.credit-limit >= limite BY customer.credit-limit DESC: 8 | DISP customer.cust-num customer.NAME customer.credit-limit. 9 | END. 10 | END. 11 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/04_02_l-xferj.p: -------------------------------------------------------------------------------- 1 | DEF VAR rep-old LIKE salesrep.sales-rep. 2 | DEF VAR rep-new LIKE salesrep.sales-rep. 3 | PROMPT-FOR rep-old LABEL "Representante velho: ". 4 | ASSIGN rep-old. 5 | PROMPT-FOR rep-new LABEL "Representante novo: ". 6 | ASSIGN rep-new. 7 | FOR EACH customer WHERE customer.sales-rep = rep-old: 8 | ASSIGN customer.sales-rep = rep-new. 9 | DISP customer.sales-rep customer.cust-num customer.NAME. 10 | END. 11 | 12 | 13 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/04_03_l-disp2.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE c-nome AS CHAR FORMAT "x(1)" LABEL "Primeiro Caracter do Nome". 2 | DEFINE VARIABLE de-limite LIKE customer.credit-limit LABEL "Limite de Credito". 3 | UPDATE c-nome de-limite. 4 | FOR EACH customer WHERE customer.NAME BEGINS c-nome AND customer.credit-limit > de-limite: 5 | DISP customer.cust-num 6 | customer.NAME 7 | customer.credit-limit. 8 | END. 9 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/04_04_l-chg5.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE i-cust-num LIKE customer.cust-num. 2 | REPEAT: 3 | PROMPT-FOR i-cust-num. 4 | FIND FIRST customer WHERE customer.cust-num = INPUT i-cust-num NO-ERROR. 5 | IF AVAILABLE customer THEN 6 | UPDATE customer WITH 1 COLUMN. 7 | END. 8 | 9 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/04_05_l-orders.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE i-ano-ini AS INTEGER FORMAT "9999" LABEL "Ano Inicial" NO-UNDO. 2 | DEFINE VARIABLE i-ano-fim AS INTEGER FORMAT "9999" LABEL "Ano Final" NO-UNDO. 3 | REPEAT : 4 | UPDATE i-ano-ini 5 | i-ano-fim. 6 | FOR EACH order 7 | WHERE order.order-date > DATE(1,1,i-ano-ini) 8 | AND order.order-date <= DATE(12,31,i-ano-fim): 9 | DISP order.order-num order.cust-num order.order-date. 10 | END. 11 | END. 12 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_01_l-del.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE l-resp AS LOGICAL. 2 | FOR EACH customer: 3 | DISPLAY customer WITH 1 COLUMN. 4 | ASSIGN l-resp = NO. 5 | MESSAGE "Deseja excluir este cliente? " UPDATE l-resp. 6 | IF l-resp = YES THEN DO: 7 | DELETE customer. 8 | MESSAGE "o Cliente foi excluido!". 9 | END. 10 | END. 11 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_02_l-addchg.p: -------------------------------------------------------------------------------- 1 | REPEAT : 2 | PROMPT-FOR customer.cust-num WITH 1 COLUMN. 3 | FIND FIRST customer USING customer.cust-num NO-ERROR. 4 | IF NOT AVAILABLE customer THEN DO: 5 | CREATE customer. 6 | ASSIGN customer.cust-num. 7 | END. 8 | UPDATE customer EXCEPT customer.cust-num WITH 1 COLUMN. 9 | END. 10 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_03_l-orderdel.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE l-resp AS LOGICAL. 2 | FOR EACH order: 3 | DISPLAY order WITH 1 COLUMN 1 DOWN. 4 | MESSAGE "Deseja Eliminar o Pedido?" 5 | UPDATE l-resp. 6 | IF l-resp THEN DO: 7 | FOR EACH order-line OF order: 8 | DELETE order-line. 9 | END. 10 | DELETE order. 11 | MESSAGE "Pedido Eliminado". 12 | END. 13 | END. 14 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_04_l-disp3.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE i-item LIKE ITEM.item-num. 2 | REPEAT: 3 | PROMPT-FOR i-item. 4 | FIND FIRST ITEM WHERE ITEM.item-num = INPUT i-item NO-ERROR. 5 | IF AVAILABLE ITEM THEN DO: 6 | DISPLAY item.item-num 7 | ITEM.item-name 8 | ITEM.price 9 | ITEM.on-hand. 10 | FOR EACH order-line OF ITEM: 11 | FIND FIRST order OF order-line NO-ERROR. 12 | IF AVAILABLE order THEN DO: 13 | DISP order.order-num 14 | order.order-date 15 | order-line.qty. 16 | END. 17 | END. 18 | END. 19 | END. 20 | 21 | 22 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_05_l-disp4.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE i-item LIKE ITEM.item-num. 2 | REPEAT: 3 | PROMPT-FOR i-item. 4 | FIND FIRST ITEM WHERE ITEM.item-num = INPUT i-item NO-ERROR. 5 | IF AVAILABLE ITEM THEN DO: 6 | DISPLAY item.item-num 7 | ITEM.item-name 8 | ITEM.price 9 | ITEM.on-hand. 10 | FOR EACH order-line WHERE order-line.item-num = item.item-num: 11 | FIND FIRST order WHERE order.order-num = order-line.order-num NO-ERROR. 12 | IF AVAILABLE order THEN DO: 13 | DISP order.order-num 14 | order.order-date 15 | order-line.qty. 16 | END. 17 | END. 18 | END. 19 | END. 20 | 21 | 22 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_06_l-disp5.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE i-item LIKE ITEM.item-num. 2 | REPEAT: 3 | PROMPT-FOR i-item. 4 | FIND FIRST ITEM WHERE ITEM.item-num = INPUT i-item NO-ERROR. 5 | IF AVAILABLE ITEM THEN DO: 6 | DISPLAY item.item-num 7 | ITEM.item-name 8 | ITEM.price 9 | ITEM.on-hand. 10 | FOR EACH order-line OF ITEM BY order-line.qty DESC: 11 | FIND FIRST order OF order-line NO-ERROR. 12 | IF AVAILABLE order THEN DO: 13 | DISP order.order-num 14 | order.order-date 15 | order-line.qty. 16 | END. 17 | END. 18 | END. 19 | END. 20 | 21 | 22 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_07_l-disp6.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE i-item LIKE ITEM.item-num. 2 | REPEAT: 3 | PROMPT-FOR i-item. 4 | FIND FIRST ITEM WHERE ITEM.item-num = INPUT i-item NO-ERROR. 5 | IF AVAILABLE ITEM THEN DO: 6 | DISPLAY item.item-num 7 | ITEM.item-name 8 | ITEM.price 9 | ITEM.on-hand. 10 | FOR EACH order-line OF ITEM, 11 | EACH order OF order-line 12 | BY order-line.qty DESCENDING 13 | BY order-date: 14 | DISP order.order-num 15 | order.order-date 16 | order-line.qty. 17 | END. 18 | END. 19 | END. 20 | 21 | 22 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_08_l-disp7.p: -------------------------------------------------------------------------------- 1 | FOR EACH salesrep: 2 | DISP salesrep.rep-name. 3 | FOR EACH customer OF salesrep: 4 | DISP customer.cust-num customer.NAME. 5 | FOR EACH order OF customer, 6 | EACH order-line OF order, 7 | EACH ITEM OF order-line: 8 | DISPLAY order.order-date 9 | order-line.qty 10 | ITEM.item-name. 11 | END. 12 | END. 13 | END. 14 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_09_l-del2.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE l-resp AS LOGICAL. 2 | FOR EACH customer: 3 | DISPLAY customer WITH 1 COLUMN. 4 | ASSIGN l-resp = NO. 5 | MESSAGE "Deseja excluir este cliente? " UPDATE l-resp. 6 | IF l-resp = YES THEN DO: 7 | FIND FIRST order OF customer NO-ERROR. 8 | IF AVAILABLE order THEN DO: 9 | MESSAGE "o Cliente possui Pedido". 10 | /* poderia usar o comando NEXT para pular para a 11 | proxima interacao e nao precisar usar o ELSE como o anunciado pede. 12 | */ 13 | END. 14 | ELSE DO: 15 | DELETE customer. 16 | MESSAGE "o Cliente foi excluido!". 17 | END. 18 | END. 19 | END. 20 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_10_l-del3.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE l-resp AS LOGICAL. 2 | FOR EACH customer: 3 | DISPLAY customer WITH 1 COLUMN. 4 | ASSIGN l-resp = NO. 5 | MESSAGE "Deseja excluir este cliente? " UPDATE l-resp. 6 | IF l-resp = YES THEN DO: 7 | FIND FIRST order OF customer NO-ERROR. 8 | IF AVAILABLE order THEN DO: 9 | ASSIGN l-resp = NO. 10 | MESSAGE "O cliente possui Pedido. Deseja excluir o Cliente e seus Pedidos? " UPDATE l-resp. 11 | IF l-resp = YES THEN DO: 12 | FOR EACH order OF customer: 13 | FOR EACH order-line OF order: 14 | DELETE order-line. 15 | END. 16 | DELETE order. 17 | END. 18 | DELETE customer. 19 | MESSAGE "o Cliente foi excluido e seus pedidos!". 20 | END. 21 | END. 22 | ELSE DO: 23 | DELETE customer. 24 | MESSAGE "o Cliente foi excluido!". 25 | END. 26 | END. 27 | END. 28 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/05_11_l-buffer.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Laboratório/05_11_l-buffer.p -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/06_01_l-updrep.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE l-resp AS LOGICAL INITIAL NO LABEL "Deseja alterar ou incluir outro representante? ". 2 | REPEAT : 3 | PROMPT-FOR salesrep.sales-rep WITH FRAME frame1. 4 | FIND FIRST salesrep WHERE salesrep.sales-rep = INPUT salesrep.sales-rep NO-ERROR. 5 | IF NOT AVAILABLE salesrep THEN DO: 6 | CREATE salesrep. 7 | ASSIGN salesrep.sales-rep. 8 | MESSAGE "Novo Representante Criado.". 9 | END. 10 | UPDATE salesrep EXCEPT salesrep.sales-rep WITH FRAME frame2 2 COLUMN SIDE-LABELS. 11 | 12 | UPDATE l-resp WITH FRAME frame3 NO-ERROR. 13 | IF l-resp = NO THEN DO: 14 | LEAVE. 15 | END. 16 | END. 17 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/06_02_l-disord.p: -------------------------------------------------------------------------------- 1 | REPEAT: 2 | PROMPT-FOR order.order-num WITH FRAM f-order. 3 | FIND FIRST order USING order-num NO-ERROR. 4 | IF AVAILABLE order THEN DO: 5 | HIDE FRAME f-order. 6 | DISP order.order-num 7 | order.cust-num. 8 | FOR EACH order-line OF order WITH FRAME f-order2: 9 | DISPLAY order-line.order-num 10 | order-line.line-num 11 | order-line.item-num 12 | order-line.qty. 13 | END. 14 | END. 15 | END. 16 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/06_03_l-dcust.p: -------------------------------------------------------------------------------- 1 | FORM 2 | customer.cust-num NAME COLON 20 3 | customer.sales-rep AT 55 4 | address COLON 20 5 | address2 NO-LABEL COLON 20 SKIP 6 | city COLON 20 customer.state COLON 39 7 | postal-code COLON 20 customer.country COLON 39 SKIP(1) 8 | credit-limit COLON 20 9 | balance COLON 39 SKIP 10 | customer.terms COLON 20 SKIP 11 | customer.discount COLON 20 12 | comments 13 | WITH FRAME cust-frame TITLE "customer" SIDE-LABELS. 14 | 15 | FOR EACH customer: 16 | DISPLAY customer EXCEPT contact phone WITH FRAME cust-frame. 17 | DOWN WITH FRAME cust-frame. 18 | END. 19 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/06_04_l-ucust.p: -------------------------------------------------------------------------------- 1 | DEFINE FRAME cust-frame 2 | customer.cust-num NAME COLON 20 3 | customer.sales-rep AT 55 4 | address COLON 20 5 | address2 NO-LABEL COLON 20 SKIP 6 | city COLON 20 customer.state COLON 39 7 | postal-code COLON 20 customer.country COLON 39 SKIP(1) 8 | credit-limit COLON 20 9 | balance COLON 39 SKIP 10 | customer.terms COLON 20 SKIP 11 | customer.discount COLON 20 12 | comments 13 | WITH TITLE "customer" SIDE-LABELS. 14 | 15 | FOR EACH customer: 16 | DISPLAY customer.cust-num customer.sales-rep WITH FRAME cust-frame. 17 | UPDATE customer.address 18 | customer.NAME 19 | customer.city 20 | customer.state 21 | customer.country 22 | customer.postal-code 23 | customer.balance 24 | customer.credit-limit 25 | customer.discount 26 | customer.terms 27 | customer.comments 28 | WITH FRAME cust-frame. 29 | END. 30 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/06_05_l-col1.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Laboratório/06_05_l-col1.p -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/06_06_l-col2.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE cust-rep AS CHARACTER FORMAT "x(26)". 2 | DEFINE VARIABLE ord-date AS DATE INIT TODAY LABEL "Data do Pedido". 3 | 4 | UPDATE ord-date WITH SIDE-LABELS CENTERED ROW 2. 5 | 6 | FOR EACH order: 7 | FIND FIRST customer OF order NO-ERROR. 8 | IF AVAILABLE customer THEN DO: 9 | cust-rep = customer.NAME + " - " + order.sales-rep. 10 | DISPLAY order.order-num AT 10 column-label "Order!Number" 11 | order.order-date AT 21 COLUMN-LABEL "Order!Date" 12 | order.cust-num AT 34 COLUMN-LABEL "Customer!Number" 13 | cust-rep AT 50 COLUMN-LABEL "Customer name!Sales rep". 14 | IF order.order-date < ord-date THEN DO: 15 | COLOR DISPLAY messages order.order-num 16 | order.order-date 17 | order.cust-num 18 | cust-rep. 19 | END. 20 | END. 21 | END. 22 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/06_07_l-mltfrm.p: -------------------------------------------------------------------------------- 1 | DEFINE VARIABLE i-total AS integer LABEL "Ord. num". 2 | 3 | FOR EACH customer: 4 | DISPLAY NAME WITH FRAME f-cliente DOWN OVERLAY. 5 | i-total = 0. 6 | 7 | FOR EACH order OF customer: 8 | i-total = i-total + 1. 9 | DISPLAY order.order-num 10 | order.order-date 11 | WITH FRAME f-ordem 5 DOWN COLUMN 43 OVERLAY. 12 | DISPLAY i-total WITH FRAME f-cliente OVERLAY. 13 | END. 14 | 15 | FIND FIRST salesrep OF customer NO-ERROR. 16 | IF AVAILABLE salesrep THEN DO: 17 | DISPLAY salesrep.sales-rep 18 | salesrep.region 19 | WITH FRAME f-rep COLUMN 43 SIDE-LABELS 1 COLUMN OVERLAY. 20 | END. 21 | END. 22 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/07_01_l-include.i: -------------------------------------------------------------------------------- 1 | FOR EACH {&tabela}: 2 | DISPLAY {&tabela}.{&campo1} 3 | {&tabela}.{&campo2}. 4 | END. 5 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/07_01_l-include.p: -------------------------------------------------------------------------------- 1 | 2 | {07_01_l-include.i &tabela="customer" 3 | &campo1="cust-num" 4 | &campo2="name"} 5 | -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/07_02_l-inc2.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Laboratório/07_02_l-inc2.p -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/08_01_l-break1.p: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/01 - Progress DCA/Laboratório/08_01_l-break1.p -------------------------------------------------------------------------------- /01 - Progress DCA/Laboratório/Database - Sports.txt: -------------------------------------------------------------------------------- 1 | 14/07/15 14:07:31 PROGRESS Report 2 | Database: Sports (PROGRESS) 3 | 4 | 5 | Table Name Description 6 | ---------------------------------------------------------------------------- 7 | Customer Customer information 8 | Invoice This contains transactions for the Receivables system 9 | Item Item file 10 | Local-Default 11 | Order Order header information 12 | Order-Line Order line information 13 | Ref-Call 14 | Salesrep Sales representative information 15 | State Table of state abbreviation with sales regions 16 | 17 | 18 | ========================================================================= 19 | ============================= Table: Customer =========================== 20 | 21 | Table Flags: "f" = frozen, "s" = a SQL table 22 | 23 | 24 | Table Table Field Index Table 25 | Name Flags Count Count Label 26 | -------------------------------- ----- ----- ----- ------------------------ 27 | Customer 16 5 ? 28 | 29 | Dump Name: customer 30 | Description: Customer information 31 | Storage Area: Customer/Order Area 32 | 33 | Trigger Event Trigger Procedure Overridable? Check CRC? 34 | ------------- -------------------- ------------ ---------- 35 | CREATE sports/crcust.p no no 36 | DELETE sports/delcust.p no no 37 | WRITE sports/wrcust.p no no 38 | 39 | 40 | ============================= FIELD SUMMARY ============================= 41 | ============================= Table: Customer =========================== 42 | 43 | Flags: ase sensitive, ndex component, andatory, iew component 44 | 45 | Order Field Name Data Type Flags 46 | ----- -------------------------------- ----------- ----- 47 | 10 Cust-Num inte i 48 | 15 Country char i 49 | 30 Name char i 50 | 40 Address char 51 | 50 Address2 char 52 | 60 City char 53 | 70 State char 54 | 80 Postal-Code char i 55 | 110 Contact char 56 | 115 Phone char 57 | 125 Sales-Rep char i 58 | 130 Credit-Limit deci-2 59 | 140 Balance deci-2 60 | 150 Terms char 61 | 170 Discount inte 62 | 180 Comments char i 63 | 64 | Field Name Format 65 | -------------------------------- ----------------------------- 66 | Cust-Num >>>>9 67 | Country x(20) 68 | Name x(20) 69 | Address x(20) 70 | Address2 x(20) 71 | City x(12) 72 | State x(20) 73 | Postal-Code x(10) 74 | Contact x(20) 75 | Phone x(20) 76 | Sales-Rep X(4) 77 | Credit-Limit ->,>>>,>>9 78 | Balance ->,>>>,>>9.99 79 | Terms x(20) 80 | Discount >>9% 81 | Comments x(60) 82 | 83 | Field Name Initial 84 | -------------------------------- ----------------------------- 85 | Cust-Num 0 86 | Country USA 87 | Name 88 | Address 89 | Address2 90 | City 91 | State 92 | Postal-Code 93 | Contact 94 | Phone 95 | Sales-Rep 96 | Credit-Limit 1500 97 | Balance 0 98 | Terms Net30 99 | Discount 0 100 | Comments 101 | 102 | Field Name Label Column Label 103 | ------------------------------ ---------------------- ---------------------- 104 | Cust-Num ? ? 105 | Country ? ? 106 | Name ? ? 107 | Address ? ? 108 | Address2 ? ? 109 | City ? ? 110 | State ? ? 111 | Postal-Code ? ? 112 | Contact ? ? 113 | Phone ? ? 114 | Sales-Rep ? ? 115 | Credit-Limit ? ? 116 | Balance ? ? 117 | Terms ? ? 118 | Discount ? ? 119 | Comments ? ? 120 | 121 | 122 | ============================= INDEX SUMMARY ============================= 123 | ============================= Table: Customer =========================== 124 | 125 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 126 | 127 | Flags Index Name Cnt Field Name 128 | ----- -------------------------------- --- --------------------------------- 129 | w Comments 1 + Comments 130 | 131 | Country-Post 2 + Country 132 | + Postal-Code 133 | 134 | pu Cust-Num 1 + Cust-Num 135 | 136 | Name 1 + Name 137 | 138 | Sales-Rep 1 + Sales-Rep 139 | 140 | ** Index Name: Comments 141 | Storage Area: Customer Index Area 142 | ** Index Name: Country-Post 143 | Storage Area: Customer Index Area 144 | ** Index Name: Cust-Num 145 | Storage Area: Primary Index Area 146 | ** Index Name: Name 147 | Storage Area: Customer Index Area 148 | ** Index Name: Sales-Rep 149 | Storage Area: Customer/Order Area 150 | 151 | 152 | ============================= FIELD DETAILS ============================= 153 | ============================= Table: Customer =========================== 154 | 155 | ** Field Name: Cust-Num 156 | Val-Msg: Customer number must be greater than zero 157 | Val-Exp: cust-num > 0 158 | 159 | ** Field Name: State 160 | Description: Label/Valexp/Valmsg/Help are set based on value of NON-US 161 | field! 162 | Help: Enter standard state abbreviation 163 | 164 | Trigger Event Trigger Procedure Overridable? Check CRC? 165 | ------------- -------------------- ------------ ---------- 166 | ASSIGN sports/asstate.p no no 167 | 168 | ** Field Name: Postal-Code 169 | Description: Format/Label/Help Message based on status of NON-US field. 170 | Help: Please enter the appropriate Postal Code. 171 | 172 | ** Field Name: Phone 173 | Description: Format/Label/Help based on status of NON-US field. 174 | 175 | ** Field Name: Sales-Rep 176 | Val-Msg: The Sales Rep's name you've entered must exist in the 177 | Salesrep table. 178 | Val-Exp: CAN-FIND(Salesrep OF Customer) 179 | 180 | ** Field Name: Credit-Limit 181 | Description: Maximum credit 182 | Help: Please enter a Credit Limit 183 | Val-Msg: Credit Limit must be >= 0 and <= 9,999,999 184 | Val-Exp: Credit-Limit >= 0 AND Credit-Limit <= 9999999 185 | 186 | ** Field Name: Discount 187 | Help: Enter a percentage from 0 to 999 188 | Val-Msg: Discount must be greater or equal to 0 189 | Val-Exp: Discount >= 0 190 | 191 | 192 | 193 | ========================================================================= 194 | ============================= Table: Invoice ============================ 195 | 196 | Table Flags: "f" = frozen, "s" = a SQL table 197 | 198 | 199 | Table Table Field Index Table 200 | Name Flags Count Count Label 201 | -------------------------------- ----- ----- ----- ------------------------ 202 | Invoice 8 4 ? 203 | 204 | Dump Name: invoice 205 | Description: This contains transactions for the Receivables system 206 | Storage Area: Info Area 207 | 208 | Trigger Event Trigger Procedure Overridable? Check CRC? 209 | ------------- -------------------- ------------ ---------- 210 | CREATE sports/crinv.p no no 211 | DELETE sports/delinv.p no no 212 | 213 | 214 | ============================= FIELD SUMMARY ============================= 215 | ============================= Table: Invoice ============================ 216 | 217 | Flags: ase sensitive, ndex component, andatory, iew component 218 | 219 | Order Field Name Data Type Flags 220 | ----- -------------------------------- ----------- ----- 221 | 10 Invoice-Num inte i 222 | 20 Cust-Num inte i 223 | 30 Invoice-Date date i 224 | 40 Amount deci-2 225 | 50 Total-Paid deci-2 226 | 60 Adjustment deci-2 227 | 80 Order-Num inte i 228 | 120 Ship-Charge deci-2 229 | 230 | Field Name Format 231 | -------------------------------- ----------------------------- 232 | Invoice-Num >>>>>9 233 | Cust-Num >>>>9 234 | Invoice-Date 99/99/99 235 | Amount ->>,>>9.99 236 | Total-Paid ->>,>>9.99 237 | Adjustment ->>,>>9.99 238 | Order-Num >>>>9 239 | Ship-Charge ->>,>>9.99 240 | 241 | Field Name Initial 242 | -------------------------------- ----------------------------- 243 | Invoice-Num 0 244 | Cust-Num 0 245 | Invoice-Date ? 246 | Amount 0 247 | Total-Paid 0 248 | Adjustment 0 249 | Order-Num 0 250 | Ship-Charge 0 251 | 252 | Field Name Label Column Label 253 | ------------------------------ ---------------------- ---------------------- 254 | Invoice-Num ? ? 255 | Cust-Num ? ? 256 | Invoice-Date ? ? 257 | Amount ? ? 258 | Total-Paid ? ? 259 | Adjustment ? ? 260 | Order-Num ? ? 261 | Ship-Charge ? ? 262 | 263 | 264 | ============================= INDEX SUMMARY ============================= 265 | ============================= Table: Invoice ============================ 266 | 267 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 268 | 269 | Flags Index Name Cnt Field Name 270 | ----- -------------------------------- --- --------------------------------- 271 | Cust-Num 1 + Cust-Num 272 | 273 | Invoice-Date 1 + Invoice-Date 274 | 275 | pu Invoice-Num 1 + Invoice-Num 276 | 277 | Order-Num 1 + Order-Num 278 | 279 | ** Index Name: Cust-Num 280 | Storage Area: Info Area 281 | ** Index Name: Invoice-Date 282 | Storage Area: Info Area 283 | ** Index Name: Invoice-Num 284 | Storage Area: Info Area 285 | ** Index Name: Order-Num 286 | Storage Area: Info Area 287 | 288 | 289 | ============================= FIELD DETAILS ============================= 290 | ============================= Table: Invoice ============================ 291 | 292 | ** Field Name: Invoice-Num 293 | Val-Msg: Invoice number cannot be zero 294 | Val-Exp: invoice-num > 0 295 | 296 | ** Field Name: Cust-Num 297 | Val-Msg: The Customer number entered must be a valid one. 298 | Val-Exp: CAN-FIND(customer OF invoice) 299 | 300 | ** Field Name: Amount 301 | Help: Enter total invoice amount including shipping and sales tax 302 | 303 | ** Field Name: Order-Num 304 | Val-Msg: The Order number entered must be a valid one. 305 | 306 | 307 | 308 | ========================================================================= 309 | ============================= Table: Item =============================== 310 | 311 | Table Flags: "f" = frozen, "s" = a SQL table 312 | 313 | 314 | Table Table Field Index Table 315 | Name Flags Count Count Label 316 | -------------------------------- ----- ----- ----- ------------------------ 317 | Item 9 3 ? 318 | 319 | Dump Name: item 320 | Description: Item file 321 | Val-Exp: NOT (CAN-FIND(FIRST order-line OF item)) 322 | Val-Msg: Cannot delete Item, order-line records exist with this item 323 | Storage Area: Info Area 324 | 325 | Trigger Event Trigger Procedure Overridable? Check CRC? 326 | ------------- -------------------- ------------ ---------- 327 | CREATE sports/critem.p no no 328 | WRITE sports/writem.p no no 329 | 330 | 331 | ============================= FIELD SUMMARY ============================= 332 | ============================= Table: Item =============================== 333 | 334 | Flags: ase sensitive, ndex component, andatory, iew component 335 | 336 | Order Field Name Data Type Flags 337 | ----- -------------------------------- ----------- ----- 338 | 10 Item-num inte i 339 | 20 Item-Name char i 340 | 22 Price deci-2 341 | 50 On-hand inte 342 | 60 Allocated inte 343 | 80 Re-Order inte 344 | 90 On-Order inte 345 | 100 Cat-Page inte 346 | 110 Cat-Description char i 347 | 348 | Field Name Format 349 | -------------------------------- ----------------------------- 350 | Item-num 99999 351 | Item-Name x(15) 352 | Price ->,>>>,>>9.99 353 | On-hand ->>>>9 354 | Allocated ->>>>9 355 | Re-Order ->>>>9 356 | On-Order ->>>>9 357 | Cat-Page >>9 358 | Cat-Description x(200) 359 | 360 | Field Name Initial 361 | -------------------------------- ----------------------------- 362 | Item-num 0 363 | Item-Name 364 | Price 0 365 | On-hand 0 366 | Allocated 0 367 | Re-Order 0 368 | On-Order 0 369 | Cat-Page 0 370 | Cat-Description 371 | 372 | Field Name Label Column Label 373 | ------------------------------ ---------------------- ---------------------- 374 | Item-num ? ? 375 | Item-Name ? ? 376 | Price ? ? 377 | On-hand ? ? 378 | Allocated ? ? 379 | Re-Order ? ? 380 | On-Order ? ? 381 | Cat-Page ? ? 382 | Cat-Description Cat-Description ? 383 | 384 | 385 | ============================= INDEX SUMMARY ============================= 386 | ============================= Table: Item =============================== 387 | 388 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 389 | 390 | Flags Index Name Cnt Field Name 391 | ----- -------------------------------- --- --------------------------------- 392 | w Cat-Description 1 + Cat-Description 393 | 394 | w Item-Name 1 + Item-Name 395 | 396 | pu Item-Num 1 + Item-num 397 | 398 | ** Index Name: Cat-Description 399 | Storage Area: Info Area 400 | ** Index Name: Item-Name 401 | Storage Area: Info Area 402 | ** Index Name: Item-Num 403 | Storage Area: Info Area 404 | 405 | 406 | ============================= FIELD DETAILS ============================= 407 | ============================= Table: Item =============================== 408 | 409 | ** Field Name: Item-num 410 | Help: Enter a number between 1 and 99999 411 | Val-Msg: Item number must be greater or equal to 0 412 | Val-Exp: item-num >= 0 413 | 414 | 415 | 416 | ========================================================================= 417 | ============================= Table: Local-Default ====================== 418 | 419 | Table Flags: "f" = frozen, "s" = a SQL table 420 | 421 | 422 | Table Table Field Index Table 423 | Name Flags Count Count Label 424 | -------------------------------- ----- ----- ----- ------------------------ 425 | Local-Default 8 1 ? 426 | 427 | Dump Name: country 428 | Val-Exp: NOT (CAN-FIND(FIRST Customer WHERE Customer.Country = 429 | 430 | Local-Default.Country)) 431 | Val-Msg: This record cannot be deleted if used in at least one 432 | Customer record. 433 | Storage Area: Info Area 434 | 435 | 436 | ============================= FIELD SUMMARY ============================= 437 | ============================= Table: Local-Default ====================== 438 | 439 | Flags: ase sensitive, ndex component, andatory, iew component 440 | 441 | Order Field Name Data Type Flags 442 | ----- -------------------------------- ----------- ----- 443 | 10 Country char 444 | 20 Region1-Label char 445 | 30 Region2-Label char 446 | 40 Postal-Label char 447 | 50 Postal-Format char 448 | 60 Tel-Format char 449 | 70 Currency-Symbol char 450 | 80 Date-Format char 451 | 452 | Field Name Format 453 | -------------------------------- ----------------------------- 454 | Country x(20) 455 | Region1-Label x(12) 456 | Region2-Label x(15) 457 | Postal-Label x(15) 458 | Postal-Format x(15) 459 | Tel-Format x(15) 460 | Currency-Symbol x(6) 461 | Date-Format x(8) 462 | 463 | Field Name Initial 464 | -------------------------------- ----------------------------- 465 | Country 466 | Region1-Label 467 | Region2-Label 468 | Postal-Label 469 | Postal-Format 470 | Tel-Format 471 | Currency-Symbol 472 | Date-Format MDY 473 | 474 | Field Name Label Column Label 475 | ------------------------------ ---------------------- ---------------------- 476 | Country ? ? 477 | Region1-Label ? ? 478 | Region2-Label ? ? 479 | Postal-Label ? ? 480 | Postal-Format ? ? 481 | Tel-Format ? ? 482 | Currency-Symbol ? ? 483 | Date-Format ? ? 484 | 485 | 486 | ============================= INDEX SUMMARY ============================= 487 | ============================= Table: Local-Default ====================== 488 | 489 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 490 | 491 | Flags Index Name Cnt Field Name 492 | ----- -------------------------------- --- --------------------------------- 493 | p default 0 + 494 | 495 | ** Index Name: default 496 | Storage Area: Schema Area 497 | 498 | 499 | ============================= FIELD DETAILS ============================= 500 | ============================= Table: Local-Default ====================== 501 | 502 | 503 | 504 | ========================================================================= 505 | ============================= Table: Order ============================== 506 | 507 | Table Flags: "f" = frozen, "s" = a SQL table 508 | 509 | 510 | Table Table Field Index Table 511 | Name Flags Count Count Label 512 | -------------------------------- ----- ----- ----- ------------------------ 513 | Order 10 4 ? 514 | 515 | Dump Name: order 516 | Description: Order header information 517 | Val-Exp: 1 = 1 518 | Storage Area: Customer/Order Area 519 | 520 | Trigger Event Trigger Procedure Overridable? Check CRC? 521 | ------------- -------------------- ------------ ---------- 522 | CREATE sports/crord.p no no 523 | 524 | 525 | ============================= FIELD SUMMARY ============================= 526 | ============================= Table: Order ============================== 527 | 528 | Flags: ase sensitive, ndex component, andatory, iew component 529 | 530 | Order Field Name Data Type Flags 531 | ----- -------------------------------- ----------- ----- 532 | 10 Order-num inte i 533 | 20 Cust-Num inte i 534 | 90 Order-Date date i 535 | 100 Ship-Date date 536 | 110 Promise-Date date 537 | 120 Carrier char 538 | 130 Instructions char 539 | 140 PO char 540 | 150 Terms char 541 | 160 Sales-Rep char i 542 | 543 | Field Name Format 544 | -------------------------------- ----------------------------- 545 | Order-num >>>>9 546 | Cust-Num >>>>9 547 | Order-Date 99/99/99 548 | Ship-Date 99/99/99 549 | Promise-Date 99/99/99 550 | Carrier x(20) 551 | Instructions x(20) 552 | PO x(20) 553 | Terms x(20) 554 | Sales-Rep x(4) 555 | 556 | Field Name Initial 557 | -------------------------------- ----------------------------- 558 | Order-num 0 559 | Cust-Num 0 560 | Order-Date TODAY 561 | Ship-Date ? 562 | Promise-Date ? 563 | Carrier 564 | Instructions 565 | PO 566 | Terms Net30 567 | Sales-Rep 568 | 569 | Field Name Label Column Label 570 | ------------------------------ ---------------------- ---------------------- 571 | Order-num ? ? 572 | Cust-Num ? ? 573 | Order-Date Ordered ? 574 | Ship-Date Shipped ? 575 | Promise-Date Promised ? 576 | Carrier ? ? 577 | Instructions ? ? 578 | PO ? ? 579 | Terms ? ? 580 | Sales-Rep ? ? 581 | 582 | 583 | ============================= INDEX SUMMARY ============================= 584 | ============================= Table: Order ============================== 585 | 586 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 587 | 588 | Flags Index Name Cnt Field Name 589 | ----- -------------------------------- --- --------------------------------- 590 | u Cust-Order 2 + Cust-Num 591 | + Order-num 592 | 593 | Order-Date 1 + Order-Date 594 | 595 | pu Order-Num 1 + Order-num 596 | 597 | Sales-Rep 1 + Sales-Rep 598 | 599 | ** Index Name: Cust-Order 600 | Storage Area: Customer/Order Area 601 | ** Index Name: Order-Date 602 | Storage Area: Order Index Area 603 | ** Index Name: Order-Num 604 | Storage Area: Primary Index Area 605 | ** Index Name: Sales-Rep 606 | Storage Area: Order Index Area 607 | 608 | 609 | ============================= FIELD DETAILS ============================= 610 | ============================= Table: Order ============================== 611 | 612 | ** Field Name: Order-num 613 | Help: Enter an order number between 1 and 99999 614 | Val-Msg: Order number must be greater than zero 615 | Val-Exp: order-num > 0 616 | 617 | ** Field Name: Cust-Num 618 | Description: 619 | Help:Name 620 | Help: Enter an existing customer number 621 | Val-Msg: Customer must already exist 622 | Val-Exp: CAN-FIND(customer OF order) 623 | 624 | ** Field Name: Order-Date 625 | Help: Date of order 626 | 627 | ** Field Name: Carrier 628 | Description: Should lookup valid carriers. 629 | 630 | ** Field Name: Terms 631 | Description: This should default to the TERMS specified by the CUSTOMER 632 | record. 633 | 634 | 635 | 636 | ========================================================================= 637 | ============================= Table: Order-Line ========================= 638 | 639 | Table Flags: "f" = frozen, "s" = a SQL table 640 | 641 | 642 | Table Table Field Index Table 643 | Name Flags Count Count Label 644 | -------------------------------- ----- ----- ----- ------------------------ 645 | Order-Line 8 2 ? 646 | 647 | Dump Name: order-li 648 | Description: Order line information 649 | Storage Area: Customer/Order Area 650 | 651 | Trigger Event Trigger Procedure Overridable? Check CRC? 652 | ------------- -------------------- ------------ ---------- 653 | CREATE sports/crordl.p no no 654 | DELETE sports/delordl.p no no 655 | WRITE sports/wrordl.p no no 656 | 657 | 658 | ============================= FIELD SUMMARY ============================= 659 | ============================= Table: Order-Line ========================= 660 | 661 | Flags: ase sensitive, ndex component, andatory, iew component 662 | 663 | Order Field Name Data Type Flags 664 | ----- -------------------------------- ----------- ----- 665 | 10 Order-num inte i 666 | 20 Line-num inte i 667 | 30 Item-num inte i 668 | 40 Price deci-2 669 | 50 Qty inte 670 | 70 Discount inte 671 | 80 Extended-Price deci-2 672 | 90 Backorder logi 673 | 674 | Field Name Format 675 | -------------------------------- ----------------------------- 676 | Order-num >>>>9 677 | Line-num >>9 678 | Item-num 99999 679 | Price ->,>>>,>>9.99 680 | Qty ->>>>9 681 | Discount >>9% 682 | Extended-Price ->>,>>9.99 683 | Backorder yes/no 684 | 685 | Field Name Initial 686 | -------------------------------- ----------------------------- 687 | Order-num 0 688 | Line-num 0 689 | Item-num 0 690 | Price 0 691 | Qty 0 692 | Discount 0 693 | Extended-Price 0 694 | Backorder no 695 | 696 | Field Name Label Column Label 697 | ------------------------------ ---------------------- ---------------------- 698 | Order-num ? ? 699 | Line-num ? ? 700 | Item-num ? ? 701 | Price ? ? 702 | Qty ? ? 703 | Discount ? ? 704 | Extended-Price ? ? 705 | Backorder Back Order ? 706 | 707 | 708 | ============================= INDEX SUMMARY ============================= 709 | ============================= Table: Order-Line ========================= 710 | 711 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 712 | 713 | Flags Index Name Cnt Field Name 714 | ----- -------------------------------- --- --------------------------------- 715 | item-num 1 + Item-num 716 | 717 | pu order-line 2 + Order-num 718 | + Line-num 719 | 720 | ** Index Name: item-num 721 | Storage Area: Order Index Area 722 | ** Index Name: order-line 723 | Storage Area: Primary Index Area 724 | 725 | 726 | ============================= FIELD DETAILS ============================= 727 | ============================= Table: Order-Line ========================= 728 | 729 | ** Field Name: Order-num 730 | Help: Order number for this order line 731 | Val-Msg: Order must exist 732 | Val-Exp: CAN-FIND(order OF order-line) 733 | 734 | ** Field Name: Line-num 735 | Description: To be generated automatically by key value generator! 736 | 737 | ** Field Name: Item-num 738 | Description: 739 | Help:Idesc 740 | Help: Item number 741 | Val-Msg: Item must be on file 742 | Val-Exp: CAN-FIND(item OF order-line) 743 | 744 | ** Field Name: Price 745 | Description: This field should get its default from the ITEM file's 746 | price field. 747 | 748 | ** Field Name: Backorder 749 | Description: Whether this order item is on back order 750 | 751 | 752 | 753 | ========================================================================= 754 | ============================= Table: Ref-Call =========================== 755 | 756 | Table Flags: "f" = frozen, "s" = a SQL table 757 | 758 | 759 | Table Table Field Index Table 760 | Name Flags Count Count Label 761 | -------------------------------- ----- ----- ----- ------------------------ 762 | Ref-Call 6 4 ? 763 | 764 | Dump Name: ref-call 765 | Storage Area: Info Area 766 | 767 | Trigger Event Trigger Procedure Overridable? Check CRC? 768 | ------------- -------------------- ------------ ---------- 769 | CREATE sports/ref_call.p no no 770 | 771 | 772 | ============================= FIELD SUMMARY ============================= 773 | ============================= Table: Ref-Call =========================== 774 | 775 | Flags: ase sensitive, ndex component, andatory, iew component 776 | 777 | Order Field Name Data Type Flags 778 | ----- -------------------------------- ----------- ----- 779 | 10 Call-Num char i 780 | 20 Cust-Num inte i 781 | 30 Call-Date date 782 | 40 Sales-Rep char 783 | 50 Parent char i 784 | 60 Txt char i 785 | 786 | Field Name Format 787 | -------------------------------- ----------------------------- 788 | Call-Num X(6) 789 | Cust-Num >>>>9 790 | Call-Date 99/99/99 791 | Sales-Rep x(4) 792 | Parent X(6) 793 | Txt X(300) 794 | 795 | Field Name Initial 796 | -------------------------------- ----------------------------- 797 | Call-Num 798 | Cust-Num 0 799 | Call-Date ? 800 | Sales-Rep 801 | Parent 802 | Txt 803 | 804 | Field Name Label Column Label 805 | ------------------------------ ---------------------- ---------------------- 806 | Call-Num ? ? 807 | Cust-Num ? ? 808 | Call-Date ? ? 809 | Sales-Rep ? ? 810 | Parent ? ? 811 | Txt ? ? 812 | 813 | 814 | ============================= INDEX SUMMARY ============================= 815 | ============================= Table: Ref-Call =========================== 816 | 817 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 818 | 819 | Flags Index Name Cnt Field Name 820 | ----- -------------------------------- --- --------------------------------- 821 | pu Call-Num 1 + Call-Num 822 | 823 | u Cust-Num 2 + Cust-Num 824 | + Call-Num 825 | 826 | ua Sibling 2 + Parent 827 | + Call-Num 828 | 829 | w Txt 1 + Txt 830 | 831 | ** Index Name: Call-Num 832 | Storage Area: Info Area 833 | ** Index Name: Cust-Num 834 | Storage Area: Info Area 835 | ** Index Name: Sibling 836 | Storage Area: Info Area 837 | ** Index Name: Txt 838 | Storage Area: Info Area 839 | 840 | 841 | ============================= FIELD DETAILS ============================= 842 | ============================= Table: Ref-Call =========================== 843 | 844 | ** Field Name: Cust-Num 845 | Val-Msg: Customer number must be greater than zero 846 | Val-Exp: cust-num > 0 847 | 848 | 849 | 850 | ========================================================================= 851 | ============================= Table: Salesrep =========================== 852 | 853 | Table Flags: "f" = frozen, "s" = a SQL table 854 | 855 | 856 | Table Table Field Index Table 857 | Name Flags Count Count Label 858 | -------------------------------- ----- ----- ----- ------------------------ 859 | Salesrep 4 1 ? 860 | 861 | Dump Name: salesrep 862 | Description: Sales representative information 863 | Val-Exp: NOT CAN-FIND(FIRST Customer Of Salesrep) 864 | Val-Msg: Cannot delete if used in one or more customer records. 865 | Storage Area: Info Area 866 | 867 | 868 | ============================= FIELD SUMMARY ============================= 869 | ============================= Table: Salesrep =========================== 870 | 871 | Flags: ase sensitive, ndex component, andatory, iew component 872 | 873 | Order Field Name Data Type Flags 874 | ----- -------------------------------- ----------- ----- 875 | 1 Sales-Rep char i 876 | 20 Rep-Name char 877 | 30 Region char 878 | 40 Month-Quota inte[12] 879 | 880 | Field Name Format 881 | -------------------------------- ----------------------------- 882 | Sales-Rep x(4) 883 | Rep-Name x(30) 884 | Region x(8) 885 | Month-Quota ->,>>>,>>9 886 | 887 | Field Name Initial 888 | -------------------------------- ----------------------------- 889 | Sales-Rep 890 | Rep-Name 891 | Region 892 | Month-Quota 0 893 | 894 | Field Name Label Column Label 895 | ------------------------------ ---------------------- ---------------------- 896 | Sales-Rep ? ? 897 | Rep-Name ? ? 898 | Region ? ? 899 | Month-Quota ? ? 900 | 901 | 902 | ============================= INDEX SUMMARY ============================= 903 | ============================= Table: Salesrep =========================== 904 | 905 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 906 | 907 | Flags Index Name Cnt Field Name 908 | ----- -------------------------------- --- --------------------------------- 909 | pu Sales-Rep 1 + Sales-Rep 910 | 911 | ** Index Name: Sales-Rep 912 | Storage Area: Info Area 913 | 914 | 915 | ============================= FIELD DETAILS ============================= 916 | ============================= Table: Salesrep =========================== 917 | 918 | ** Field Name: Rep-Name 919 | Help: Name of Salesman 920 | 921 | ** Field Name: Region 922 | Help: Sales Region covered by this salesman 923 | 924 | 925 | 926 | ========================================================================= 927 | ============================= Table: State ============================== 928 | 929 | Table Flags: "f" = frozen, "s" = a SQL table 930 | 931 | 932 | Table Table Field Index Table 933 | Name Flags Count Count Label 934 | -------------------------------- ----- ----- ----- ------------------------ 935 | State 3 1 ? 936 | 937 | Dump Name: state 938 | Description: Table of state abbreviation with sales regions 939 | Val-Exp: NOT (CAN-FIND(FIRST customer OF state)) 940 | Val-Msg: This state record is used by at least one Customer record. 941 | Storage Area: Info Area 942 | 943 | 944 | ============================= FIELD SUMMARY ============================= 945 | ============================= Table: State ============================== 946 | 947 | Flags: ase sensitive, ndex component, andatory, iew component 948 | 949 | Order Field Name Data Type Flags 950 | ----- -------------------------------- ----------- ----- 951 | 10 State char i 952 | 20 State-Name char 953 | 30 Region char 954 | 955 | Field Name Format 956 | -------------------------------- ----------------------------- 957 | State !! 958 | State-Name x(15) 959 | Region x(8) 960 | 961 | Field Name Initial 962 | -------------------------------- ----------------------------- 963 | State 964 | State-Name 965 | Region 966 | 967 | Field Name Label Column Label 968 | ------------------------------ ---------------------- ---------------------- 969 | State ? ? 970 | State-Name ? ? 971 | Region ? ? 972 | 973 | 974 | ============================= INDEX SUMMARY ============================= 975 | ============================= Table: State ============================== 976 | 977 | Flags:

rimary, nique, ord, bbreviated, nactive, + asc, - desc 978 | 979 | Flags Index Name Cnt Field Name 980 | ----- -------------------------------- --- --------------------------------- 981 | pu State 1 + State 982 | 983 | ** Index Name: State 984 | Storage Area: Info Area 985 | 986 | 987 | ============================= FIELD DETAILS ============================= 988 | ============================= Table: State ============================== 989 | 990 | ** Field Name: State 991 | Help: State abbreviation 992 | 993 | ** Field Name: State-Name 994 | Help: Full state name 995 | 996 | ** Field Name: Region 997 | Help: Sales region for state 998 | 999 | 1000 | 1001 | ============================= SEQUENCES ================================= 1002 | 1003 | Initial Max/Min 1004 | Sequence Name Value Increment Value Cycle? 1005 | -------------------------------- ---------- ---------- ----------- ------ 1006 | Next-Cust-Num 1000 5 ? no 1007 | Next-Inv-Num 1000 1 ? no 1008 | Next-Item-Num 100 10 ? no 1009 | Next-Ord-Num 1000 5 ? no 1010 | Next-Ref-Num 1 1 ? no 1011 | -------------------------------------------------------------------------------- /02 - Progress ADE/Apostila Progress ADE.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/02 - Progress ADE/Apostila Progress ADE.pdf -------------------------------------------------------------------------------- /03 - Progress ACE/Progress ACE - Apostila e Laboratórios.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/03 - Progress ACE/Progress ACE - Apostila e Laboratórios.pdf -------------------------------------------------------------------------------- /06 - DDKGUI/spbrw/b01sp007.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spbrw/b01sp007.r -------------------------------------------------------------------------------- /06 - DDKGUI/spbrw/b01sp007.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spbrw/b01sp007.w -------------------------------------------------------------------------------- /06 - DDKGUI/spbrw/b01sp008.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spbrw/b01sp008.r -------------------------------------------------------------------------------- /06 - DDKGUI/spbrw/b01sp008.w: -------------------------------------------------------------------------------- 1 | &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1 2 | &ANALYZE-RESUME 3 | /* Connected Databases 4 | sports PROGRESS 5 | */ 6 | &Scoped-define WINDOW-NAME CURRENT-WINDOW 7 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS B-table-Win 8 | /*:T ******************************************************************************* 9 | ** Copyright DATASUL S.A. (1997) 10 | ** Todos os Direitos Reservados. 11 | ** 12 | ** Este fonte e de propriedade exclusiva da DATASUL, sua reproducao 13 | ** parcial ou total por qualquer meio, so podera ser feita mediante 14 | ** autorizacao expressa. 15 | *******************************************************************************/ 16 | {include/i-prgvrs.i B99XX999 9.99.99.999} 17 | 18 | /* Create an unnamed pool to store all the widgets created 19 | by this procedure. This is a good default which assures 20 | that this procedure's triggers and internal procedures 21 | will execute in this procedure's storage, and that proper 22 | cleanup will occur on deletion of the procedure. */ 23 | 24 | CREATE WIDGET-POOL. 25 | 26 | /* *************************** Definitions ************************** */ 27 | &Scop adm-attribute-dlg support/browserd.w 28 | 29 | /* Parameters Definitions --- */ 30 | 31 | /* Local Variable Definitions --- */ 32 | define variable c-lista-valor as character init '':U no-undo. 33 | 34 | /* _UIB-CODE-BLOCK-END */ 35 | &ANALYZE-RESUME 36 | 37 | 38 | &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK 39 | 40 | /* ******************** Preprocessor Definitions ******************** */ 41 | 42 | &Scoped-define PROCEDURE-TYPE SmartBrowser 43 | &Scoped-define DB-AWARE no 44 | 45 | &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target 46 | 47 | /* Name of designated FRAME-NAME and/or first browse and/or first query */ 48 | &Scoped-define FRAME-NAME F-Main 49 | &Scoped-define BROWSE-NAME br-table 50 | 51 | /* Internal Tables (found by Frame, Query & Browse Queries) */ 52 | &Scoped-define INTERNAL-TABLES Salesrep 53 | 54 | /* Definitions for BROWSE br-table */ 55 | &Scoped-define FIELDS-IN-QUERY-br-table Salesrep.Sales-Rep ~ 56 | Salesrep.Rep-Name Salesrep.Region 57 | &Scoped-define ENABLED-FIELDS-IN-QUERY-br-table 58 | &Scoped-define QUERY-STRING-br-table FOR EACH Salesrep ~ 59 | WHERE salesrep.sales-rep >= c-ini-sales-rep and ~ 60 | salesrep.sales-rep <= c-fin-sales-rep NO-LOCK INDEXED-REPOSITION 61 | &Scoped-define OPEN-QUERY-br-table OPEN QUERY br-table FOR EACH Salesrep ~ 62 | WHERE salesrep.sales-rep >= c-ini-sales-rep and ~ 63 | salesrep.sales-rep <= c-fin-sales-rep NO-LOCK INDEXED-REPOSITION. 64 | &Scoped-define TABLES-IN-QUERY-br-table Salesrep 65 | &Scoped-define FIRST-TABLE-IN-QUERY-br-table Salesrep 66 | 67 | 68 | /* Definitions for FRAME F-Main */ 69 | 70 | /* Standard List Definitions */ 71 | &Scoped-Define ENABLED-OBJECTS IMAGE-1 IMAGE-2 c-ini-Sales-Rep ~ 72 | c-fin-Sales-Rep bt-confirma br-table 73 | &Scoped-Define DISPLAYED-OBJECTS c-ini-Sales-Rep c-fin-Sales-Rep 74 | 75 | /* Custom List Definitions */ 76 | /* List-1,List-2,List-3,List-4,List-5,List-6 */ 77 | 78 | /* _UIB-PREPROCESSOR-BLOCK-END */ 79 | &ANALYZE-RESUME 80 | 81 | 82 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" B-table-Win _INLINE 83 | /* Actions: ? adm/support/keyedit.w ? ? ? */ 84 | /* STRUCTURED-DATA 85 | 86 | &BROWSE-NAME 87 | 88 | 89 | Sales-Rep||y|Sports.Salesrep.Sales-Rep 90 | 91 | 92 | ************************** 93 | * Set attributes related to FOREIGN KEYS 94 | */ 95 | RUN set-attribute-list ( 96 | 'Keys-Accepted = , 97 | Keys-Supplied = "Sales-Rep"':U). 98 | 99 | /* Tell the ADM to use the OPEN-QUERY-CASES. */ 100 | &Scoped-define OPEN-QUERY-CASES RUN dispatch ('open-query-cases':U). 101 | /************************** 102 | */ 103 | /* _UIB-CODE-BLOCK-END */ 104 | &ANALYZE-RESUME 105 | 106 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Advanced Query Options" B-table-Win _INLINE 107 | /* Actions: ? adm/support/advqedit.w ? ? ? */ 108 | /* STRUCTURED-DATA 109 | 110 | &BROWSE-NAME 111 | 112 | 113 | 114 | 115 | ************************ 116 | * Set attributes related to SORTBY-OPTIONS */ 117 | RUN set-attribute-list ( 118 | 'SortBy-Options = ""':U). 119 | /************************ 120 | 121 | 122 | ************************ 123 | * Initialize Filter Attributes */ 124 | RUN set-attribute-list IN THIS-PROCEDURE (' 125 | Filter-Value=':U). 126 | /************************ 127 | */ 128 | 129 | /* _UIB-CODE-BLOCK-END */ 130 | &ANALYZE-RESUME 131 | 132 | 133 | /* *********************** Control Definitions ********************** */ 134 | 135 | 136 | /* Definitions of the field level widgets */ 137 | DEFINE BUTTON bt-confirma 138 | IMAGE-UP FILE "image\im-sav":U 139 | LABEL "Button 1" 140 | SIZE 5.14 BY 1. 141 | 142 | DEFINE VARIABLE c-fin-Sales-Rep AS CHARACTER FORMAT "x(4)" INITIAL "ZZZZ" 143 | VIEW-AS FILL-IN 144 | SIZE 10.14 BY .88 NO-UNDO. 145 | 146 | DEFINE VARIABLE c-ini-Sales-Rep AS CHARACTER FORMAT "x(4)" 147 | VIEW-AS FILL-IN 148 | SIZE 10.14 BY .88 NO-UNDO. 149 | 150 | DEFINE IMAGE IMAGE-1 151 | FILENAME "image\ii-fir":U 152 | SIZE 2.86 BY 1. 153 | 154 | DEFINE IMAGE IMAGE-2 155 | FILENAME "image\ii-las":U 156 | SIZE 2.86 BY 1. 157 | 158 | /* Query definitions */ 159 | &ANALYZE-SUSPEND 160 | DEFINE QUERY br-table FOR 161 | Salesrep SCROLLING. 162 | &ANALYZE-RESUME 163 | 164 | /* Browse definitions */ 165 | DEFINE BROWSE br-table 166 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br-table B-table-Win _STRUCTURED 167 | QUERY br-table NO-LOCK DISPLAY 168 | Salesrep.Sales-Rep FORMAT "x(4)":U 169 | Salesrep.Rep-Name FORMAT "x(30)":U 170 | Salesrep.Region FORMAT "x(8)":U 171 | /* _UIB-CODE-BLOCK-END */ 172 | &ANALYZE-RESUME 173 | WITH NO-ASSIGN SEPARATORS SIZE 80 BY 9. 174 | 175 | 176 | /* ************************ Frame Definitions *********************** */ 177 | 178 | DEFINE FRAME F-Main 179 | c-ini-Sales-Rep AT ROW 1 COL 2.43 COLON-ALIGNED NO-LABEL 180 | c-fin-Sales-Rep AT ROW 1 COL 42.43 COLON-ALIGNED NO-LABEL 181 | bt-confirma AT ROW 1 COL 76 182 | br-table AT ROW 2.17 COL 1 183 | IMAGE-1 AT ROW 1 COL 15 184 | IMAGE-2 AT ROW 1 COL 41 185 | WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY 186 | SIDE-LABELS NO-UNDERLINE THREE-D 187 | AT COL 1 ROW 1 SCROLLABLE 188 | BGCOLOR 8 FGCOLOR 0 WIDGET-ID 100. 189 | 190 | 191 | /* *********************** Procedure Settings ************************ */ 192 | 193 | &ANALYZE-SUSPEND _PROCEDURE-SETTINGS 194 | /* Settings for THIS-PROCEDURE 195 | Type: SmartBrowser 196 | Allow: Basic,Browse 197 | Frames: 1 198 | Add Fields to: EXTERNAL-TABLES 199 | Other Settings: PERSISTENT-ONLY COMPILE 200 | */ 201 | 202 | /* This procedure should always be RUN PERSISTENT. Report the error, */ 203 | /* then cleanup and return. */ 204 | IF NOT THIS-PROCEDURE:PERSISTENT THEN DO: 205 | MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U 206 | VIEW-AS ALERT-BOX ERROR BUTTONS OK. 207 | RETURN. 208 | END. 209 | 210 | &ANALYZE-RESUME _END-PROCEDURE-SETTINGS 211 | 212 | /* ************************* Create Window ************************** */ 213 | 214 | &ANALYZE-SUSPEND _CREATE-WINDOW 215 | /* DESIGN Window definition (used by the UIB) 216 | CREATE WINDOW B-table-Win ASSIGN 217 | HEIGHT = 10.17 218 | WIDTH = 80.14. 219 | /* END WINDOW DEFINITION */ 220 | */ 221 | &ANALYZE-RESUME 222 | 223 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB B-table-Win 224 | /* ************************* Included-Libraries *********************** */ 225 | 226 | {src/adm/method/browser.i} 227 | {include/c-brwzoo.i} 228 | {utp/ut-glob.i} 229 | 230 | /* _UIB-CODE-BLOCK-END */ 231 | &ANALYZE-RESUME 232 | 233 | 234 | 235 | 236 | /* *********** Runtime Attributes and AppBuilder Settings *********** */ 237 | 238 | &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES 239 | /* SETTINGS FOR WINDOW B-table-Win 240 | NOT-VISIBLE,,RUN-PERSISTENT */ 241 | /* SETTINGS FOR FRAME F-Main 242 | NOT-VISIBLE FRAME-NAME Size-to-Fit L-To-R */ 243 | /* BROWSE-TAB br-table bt-confirma F-Main */ 244 | ASSIGN 245 | FRAME F-Main:SCROLLABLE = FALSE 246 | FRAME F-Main:HIDDEN = TRUE. 247 | 248 | /* _RUN-TIME-ATTRIBUTES-END */ 249 | &ANALYZE-RESUME 250 | 251 | 252 | /* Setting information for Queries and Browse Widgets fields */ 253 | 254 | &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br-table 255 | /* Query rebuild information for BROWSE br-table 256 | _TblList = "Sports.Salesrep" 257 | _Options = "NO-LOCK INDEXED-REPOSITION" 258 | _Where[1] = "salesrep.sales-rep >= c-ini-sales-rep and 259 | salesrep.sales-rep <= c-fin-sales-rep" 260 | _FldNameList[1] = Sports.Salesrep.Sales-Rep 261 | _FldNameList[2] = Sports.Salesrep.Rep-Name 262 | _FldNameList[3] = Sports.Salesrep.Region 263 | _Query is NOT OPENED 264 | */ /* BROWSE br-table */ 265 | &ANALYZE-RESUME 266 | 267 | &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main 268 | /* Query rebuild information for FRAME F-Main 269 | _Options = "NO-LOCK" 270 | _Query is NOT OPENED 271 | */ /* FRAME F-Main */ 272 | &ANALYZE-RESUME 273 | 274 | 275 | 276 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartBrowserCues" B-table-Win _INLINE 277 | /* Actions: adecomm/_so-cue.w ? adecomm/_so-cued.p ? adecomm/_so-cuew.p */ 278 | /*:T SmartBrowser,uib,50010 279 | Destroy on next read */ 280 | /* _UIB-CODE-BLOCK-END */ 281 | &ANALYZE-RESUME 282 | 283 | 284 | 285 | /* ************************ Control Triggers ************************ */ 286 | 287 | &Scoped-define BROWSE-NAME br-table 288 | &Scoped-define SELF-NAME br-table 289 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 290 | ON MOUSE-SELECT-DBLCLICK OF br-table IN FRAME F-Main 291 | DO: 292 | RUN New-State('DblClick':U). 293 | END. 294 | 295 | /* _UIB-CODE-BLOCK-END */ 296 | &ANALYZE-RESUME 297 | 298 | 299 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 300 | ON ROW-ENTRY OF br-table IN FRAME F-Main 301 | DO: 302 | /* This code displays initial values for newly added or copied rows. */ 303 | {src/adm/template/brsentry.i} 304 | 305 | run new-state('New-Line|':U + string(rowid({&FIRST-TABLE-IN-QUERY-{&BROWSE-NAME}}))). 306 | run seta-valor. 307 | END. 308 | 309 | /* _UIB-CODE-BLOCK-END */ 310 | &ANALYZE-RESUME 311 | 312 | 313 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 314 | ON ROW-LEAVE OF br-table IN FRAME F-Main 315 | DO: 316 | /* Do not disable this code or no updates will take place except 317 | by pressing the Save button on an Update SmartPanel. */ 318 | {src/adm/template/brsleave.i} 319 | END. 320 | 321 | /* _UIB-CODE-BLOCK-END */ 322 | &ANALYZE-RESUME 323 | 324 | 325 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 326 | ON VALUE-CHANGED OF br-table IN FRAME F-Main 327 | DO: 328 | /* This ADM trigger code must be preserved in order to notify other 329 | objects when the browser's current row changes. */ 330 | {src/adm/template/brschnge.i} 331 | run new-state('New-Line|':U + string(rowid({&FIRST-TABLE-IN-QUERY-{&BROWSE-NAME}}))). 332 | run new-state('Value-Changed|':U + string(this-procedure)). 333 | END. 334 | 335 | /* _UIB-CODE-BLOCK-END */ 336 | &ANALYZE-RESUME 337 | 338 | 339 | &Scoped-define SELF-NAME bt-confirma 340 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL bt-confirma B-table-Win 341 | ON CHOOSE OF bt-confirma IN FRAME F-Main /* Button 1 */ 342 | DO: 343 | assign input frame {&frame-name} c-ini-sales-rep c-fin-sales-rep. 344 | RUN dispatch IN THIS-PROCEDURE ('open-query':U). 345 | apply 'value-changed':U to {&browse-name}. 346 | END. 347 | 348 | /* _UIB-CODE-BLOCK-END */ 349 | &ANALYZE-RESUME 350 | 351 | 352 | &UNDEFINE SELF-NAME 353 | 354 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win 355 | 356 | 357 | /* *************************** Main Block *************************** */ 358 | 359 | &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN 360 | RUN dispatch IN THIS-PROCEDURE ('initialize':U). 361 | &ENDIF 362 | 363 | /* _UIB-CODE-BLOCK-END */ 364 | &ANALYZE-RESUME 365 | 366 | 367 | /* ********************** Internal Procedures *********************** */ 368 | 369 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-open-query-cases B-table-Win adm/support/_adm-opn.p 370 | PROCEDURE adm-open-query-cases : 371 | /*------------------------------------------------------------------------------ 372 | Purpose: Opens different cases of the query based on attributes 373 | such as the 'Key-Name', or 'SortBy-Case' 374 | Parameters: 375 | ------------------------------------------------------------------------------*/ 376 | DEF VAR Filter-Value AS CHAR NO-UNDO. 377 | 378 | /* Copy 'Filter-Attributes' into local variables. */ 379 | RUN get-attribute ('Filter-Value':U). 380 | Filter-Value = RETURN-VALUE. 381 | 382 | /* No Foreign keys are accepted by this SmartObject. */ 383 | 384 | {&OPEN-QUERY-{&BROWSE-NAME}} 385 | 386 | END PROCEDURE. 387 | 388 | /* _UIB-CODE-BLOCK-END */ 389 | &ANALYZE-RESUME 390 | 391 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available B-table-Win _ADM-ROW-AVAILABLE 392 | PROCEDURE adm-row-available : 393 | /*------------------------------------------------------------------------------ 394 | Purpose: Dispatched to this procedure when the Record- 395 | Source has a new row available. This procedure 396 | tries to get the new row (or foriegn keys) from 397 | the Record-Source and process it. 398 | Parameters: 399 | ------------------------------------------------------------------------------*/ 400 | 401 | /* Define variables needed by this internal procedure. */ 402 | {src/adm/template/row-head.i} 403 | 404 | /* Process the newly available records (i.e. display fields, 405 | open queries, and/or pass records on to any RECORD-TARGETS). */ 406 | {src/adm/template/row-end.i} 407 | 408 | END PROCEDURE. 409 | 410 | /* _UIB-CODE-BLOCK-END */ 411 | &ANALYZE-RESUME 412 | 413 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI B-table-Win _DEFAULT-DISABLE 414 | PROCEDURE disable_UI : 415 | /*------------------------------------------------------------------------------ 416 | Purpose: DISABLE the User Interface 417 | Parameters: 418 | Notes: Here we clean-up the user-interface by deleting 419 | dynamic widgets we have created and/or hide 420 | frames. This procedure is usually called when 421 | we are ready to "clean-up" after running. 422 | ------------------------------------------------------------------------------*/ 423 | /* Hide all frames. */ 424 | HIDE FRAME F-Main. 425 | IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. 426 | END PROCEDURE. 427 | 428 | /* _UIB-CODE-BLOCK-END */ 429 | &ANALYZE-RESUME 430 | 431 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-view B-table-Win 432 | PROCEDURE local-view : 433 | /*------------------------------------------------------------------------------ 434 | Purpose: Override standard ADM method 435 | Notes: 436 | ------------------------------------------------------------------------------*/ 437 | 438 | /* Code placed here will execute PRIOR to standard behavior. */ 439 | 440 | /* Dispatch standard ADM method. */ 441 | RUN dispatch IN THIS-PROCEDURE ( INPUT 'view':U ) . 442 | 443 | /* Code placed here will execute AFTER standard behavior. */ 444 | apply 'value-changed':U to {&browse-name} in frame {&frame-name}. 445 | 446 | END PROCEDURE. 447 | 448 | /* _UIB-CODE-BLOCK-END */ 449 | &ANALYZE-RESUME 450 | 451 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pi-retorna-valor B-table-Win 452 | PROCEDURE pi-retorna-valor : 453 | DEFINE INPUT PARAMETER P-CAMPO AS CHARACTER NO-UNDO. 454 | 455 | DEFINE VARIABLE P-VALOR AS CHAR INIT "" NO-UNDO. 456 | 457 | if avail Sports.Salesrep then do: 458 | case p-campo: 459 | when "Sales-Rep" then 460 | assign p-valor = string(Salesrep.Sales-Rep). 461 | end. 462 | end. 463 | return p-valor. 464 | END PROCEDURE. 465 | 466 | /* _UIB-CODE-BLOCK-END */ 467 | &ANALYZE-RESUME 468 | 469 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-key B-table-Win adm/support/_key-snd.p 470 | PROCEDURE send-key : 471 | /*------------------------------------------------------------------------------ 472 | Purpose: Sends a requested KEY value back to the calling 473 | SmartObject. 474 | Parameters: 475 | ------------------------------------------------------------------------------*/ 476 | 477 | /* Define variables needed by this internal procedure. */ 478 | {src/adm/template/sndkytop.i} 479 | 480 | /* Return the key value associated with each key case. */ 481 | {src/adm/template/sndkycas.i "Sales-Rep" "Salesrep" "Sales-Rep"} 482 | 483 | /* Close the CASE statement and end the procedure. */ 484 | {src/adm/template/sndkyend.i} 485 | 486 | END PROCEDURE. 487 | 488 | /* _UIB-CODE-BLOCK-END */ 489 | &ANALYZE-RESUME 490 | 491 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records B-table-Win _ADM-SEND-RECORDS 492 | PROCEDURE send-records : 493 | /*------------------------------------------------------------------------------ 494 | Purpose: Send record ROWID's for all tables used by 495 | this file. 496 | Parameters: see template/snd-head.i 497 | ------------------------------------------------------------------------------*/ 498 | 499 | /* Define variables needed by this internal procedure. */ 500 | {src/adm/template/snd-head.i} 501 | 502 | /* For each requested table, put it's ROWID in the output list. */ 503 | {src/adm/template/snd-list.i "Salesrep"} 504 | 505 | /* Deal with any unexpected table requests before closing. */ 506 | {src/adm/template/snd-end.i} 507 | 508 | END PROCEDURE. 509 | 510 | /* _UIB-CODE-BLOCK-END */ 511 | &ANALYZE-RESUME 512 | 513 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed B-table-Win 514 | PROCEDURE state-changed : 515 | /* ----------------------------------------------------------- 516 | Purpose: 517 | Parameters: 518 | Notes: 519 | -------------------------------------------------------------*/ 520 | DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO. 521 | DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO. 522 | 523 | CASE p-state: 524 | /* Object instance CASEs can go here to replace standard behavior 525 | or add new cases. */ 526 | {src/adm/template/bstates.i} 527 | END CASE. 528 | run pi-trata-state (p-issuer-hdl, p-state). 529 | END PROCEDURE. 530 | 531 | /* _UIB-CODE-BLOCK-END */ 532 | &ANALYZE-RESUME 533 | 534 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "RetornaValorCampo" B-table-Win _INLINE 535 | /* Actions: ? ? ? ? support/brwrtval.p */ 536 | /* Procedure desativada */ 537 | /* _UIB-CODE-BLOCK-END */ 538 | &ANALYZE-RESUME 539 | 540 | -------------------------------------------------------------------------------- /06 - DDKGUI/spbrw/b02sp008.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spbrw/b02sp008.r -------------------------------------------------------------------------------- /06 - DDKGUI/spbrw/b02sp008.w: -------------------------------------------------------------------------------- 1 | &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1 2 | &ANALYZE-RESUME 3 | /* Connected Databases 4 | sports PROGRESS 5 | */ 6 | &Scoped-define WINDOW-NAME CURRENT-WINDOW 7 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS B-table-Win 8 | /*:T ******************************************************************************* 9 | ** Copyright DATASUL S.A. (1997) 10 | ** Todos os Direitos Reservados. 11 | ** 12 | ** Este fonte e de propriedade exclusiva da DATASUL, sua reproducao 13 | ** parcial ou total por qualquer meio, so podera ser feita mediante 14 | ** autorizacao expressa. 15 | *******************************************************************************/ 16 | {include/i-prgvrs.i B99XX999 9.99.99.999} 17 | 18 | /* Create an unnamed pool to store all the widgets created 19 | by this procedure. This is a good default which assures 20 | that this procedure's triggers and internal procedures 21 | will execute in this procedure's storage, and that proper 22 | cleanup will occur on deletion of the procedure. */ 23 | 24 | CREATE WIDGET-POOL. 25 | 26 | /* *************************** Definitions ************************** */ 27 | &Scop adm-attribute-dlg support/browserd.w 28 | 29 | /* Parameters Definitions --- */ 30 | 31 | /* Local Variable Definitions --- */ 32 | define variable c-lista-valor as character init '':U no-undo. 33 | 34 | /* _UIB-CODE-BLOCK-END */ 35 | &ANALYZE-RESUME 36 | 37 | 38 | &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK 39 | 40 | /* ******************** Preprocessor Definitions ******************** */ 41 | 42 | &Scoped-define PROCEDURE-TYPE SmartBrowser 43 | &Scoped-define DB-AWARE no 44 | 45 | &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,TableIO-Target 46 | 47 | /* Name of designated FRAME-NAME and/or first browse and/or first query */ 48 | &Scoped-define FRAME-NAME F-Main 49 | &Scoped-define BROWSE-NAME br-table 50 | 51 | /* Internal Tables (found by Frame, Query & Browse Queries) */ 52 | &Scoped-define INTERNAL-TABLES Salesrep 53 | 54 | /* Definitions for BROWSE br-table */ 55 | &Scoped-define FIELDS-IN-QUERY-br-table Salesrep.Sales-Rep ~ 56 | Salesrep.Rep-Name Salesrep.Region 57 | &Scoped-define ENABLED-FIELDS-IN-QUERY-br-table 58 | &Scoped-define QUERY-STRING-br-table FOR EACH Salesrep ~ 59 | WHERE salesrep.rep-name >= c-ini-rep-name and ~ 60 | salesrep.rep-name <= c-fin-rep-name NO-LOCK ~ 61 | BY Salesrep.Rep-Name INDEXED-REPOSITION 62 | &Scoped-define OPEN-QUERY-br-table OPEN QUERY br-table FOR EACH Salesrep ~ 63 | WHERE salesrep.rep-name >= c-ini-rep-name and ~ 64 | salesrep.rep-name <= c-fin-rep-name NO-LOCK ~ 65 | BY Salesrep.Rep-Name INDEXED-REPOSITION. 66 | &Scoped-define TABLES-IN-QUERY-br-table Salesrep 67 | &Scoped-define FIRST-TABLE-IN-QUERY-br-table Salesrep 68 | 69 | 70 | /* Definitions for FRAME F-Main */ 71 | 72 | /* Standard List Definitions */ 73 | &Scoped-Define ENABLED-OBJECTS IMAGE-1 IMAGE-2 c-ini-rep-name ~ 74 | c-fin-rep-name bt-confirma br-table 75 | &Scoped-Define DISPLAYED-OBJECTS c-ini-rep-name c-fin-rep-name 76 | 77 | /* Custom List Definitions */ 78 | /* List-1,List-2,List-3,List-4,List-5,List-6 */ 79 | 80 | /* _UIB-PREPROCESSOR-BLOCK-END */ 81 | &ANALYZE-RESUME 82 | 83 | 84 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" B-table-Win _INLINE 85 | /* Actions: ? adm/support/keyedit.w ? ? ? */ 86 | /* STRUCTURED-DATA 87 | 88 | &BROWSE-NAME 89 | 90 | 91 | Sales-Rep||y|Sports.Salesrep.Sales-Rep 92 | 93 | 94 | ************************** 95 | * Set attributes related to FOREIGN KEYS 96 | */ 97 | RUN set-attribute-list ( 98 | 'Keys-Accepted = , 99 | Keys-Supplied = "Sales-Rep"':U). 100 | 101 | /* Tell the ADM to use the OPEN-QUERY-CASES. */ 102 | &Scoped-define OPEN-QUERY-CASES RUN dispatch ('open-query-cases':U). 103 | /************************** 104 | */ 105 | /* _UIB-CODE-BLOCK-END */ 106 | &ANALYZE-RESUME 107 | 108 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Advanced Query Options" B-table-Win _INLINE 109 | /* Actions: ? adm/support/advqedit.w ? ? ? */ 110 | /* STRUCTURED-DATA 111 | 112 | &BROWSE-NAME 113 | 114 | 115 | 116 | 117 | ************************ 118 | * Set attributes related to SORTBY-OPTIONS */ 119 | RUN set-attribute-list ( 120 | 'SortBy-Options = ""':U). 121 | /************************ 122 | 123 | 124 | ************************ 125 | * Initialize Filter Attributes */ 126 | RUN set-attribute-list IN THIS-PROCEDURE (' 127 | Filter-Value=':U). 128 | /************************ 129 | */ 130 | 131 | /* _UIB-CODE-BLOCK-END */ 132 | &ANALYZE-RESUME 133 | 134 | 135 | /* *********************** Control Definitions ********************** */ 136 | 137 | 138 | /* Definitions of the field level widgets */ 139 | DEFINE BUTTON bt-confirma 140 | IMAGE-UP FILE "image\im-sav":U 141 | LABEL "Button 1" 142 | SIZE 5.14 BY 1. 143 | 144 | DEFINE VARIABLE c-fin-rep-name AS CHARACTER FORMAT "x(30)" INITIAL "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ" 145 | VIEW-AS FILL-IN 146 | SIZE 40 BY .88 NO-UNDO. 147 | 148 | DEFINE VARIABLE c-ini-rep-name AS CHARACTER FORMAT "x(30)" 149 | VIEW-AS FILL-IN 150 | SIZE 10.14 BY .88 NO-UNDO. 151 | 152 | DEFINE IMAGE IMAGE-1 153 | FILENAME "image\ii-fir":U 154 | SIZE 2.86 BY 1. 155 | 156 | DEFINE IMAGE IMAGE-2 157 | FILENAME "image\ii-las":U 158 | SIZE 2.86 BY 1. 159 | 160 | /* Query definitions */ 161 | &ANALYZE-SUSPEND 162 | DEFINE QUERY br-table FOR 163 | Salesrep SCROLLING. 164 | &ANALYZE-RESUME 165 | 166 | /* Browse definitions */ 167 | DEFINE BROWSE br-table 168 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _DISPLAY-FIELDS br-table B-table-Win _STRUCTURED 169 | QUERY br-table NO-LOCK DISPLAY 170 | Salesrep.Sales-Rep FORMAT "x(4)":U 171 | Salesrep.Rep-Name FORMAT "x(30)":U 172 | Salesrep.Region FORMAT "x(8)":U 173 | /* _UIB-CODE-BLOCK-END */ 174 | &ANALYZE-RESUME 175 | WITH NO-ASSIGN SEPARATORS SIZE 80 BY 9. 176 | 177 | 178 | /* ************************ Frame Definitions *********************** */ 179 | 180 | DEFINE FRAME F-Main 181 | c-ini-rep-name AT ROW 1 COL 2.43 COLON-ALIGNED HELP 182 | "Name of Salesman" NO-LABEL 183 | c-fin-rep-name AT ROW 1 COL 28 COLON-ALIGNED HELP 184 | "Name of Salesman" NO-LABEL 185 | bt-confirma AT ROW 1 COL 76 186 | br-table AT ROW 2.17 COL 1 187 | IMAGE-1 AT ROW 1 COL 15 188 | IMAGE-2 AT ROW 1 COL 25.86 189 | WITH 1 DOWN NO-BOX KEEP-TAB-ORDER OVERLAY 190 | SIDE-LABELS NO-UNDERLINE THREE-D 191 | AT COL 1 ROW 1 SCROLLABLE 192 | BGCOLOR 8 FGCOLOR 0 WIDGET-ID 100. 193 | 194 | 195 | /* *********************** Procedure Settings ************************ */ 196 | 197 | &ANALYZE-SUSPEND _PROCEDURE-SETTINGS 198 | /* Settings for THIS-PROCEDURE 199 | Type: SmartBrowser 200 | Allow: Basic,Browse 201 | Frames: 1 202 | Add Fields to: EXTERNAL-TABLES 203 | Other Settings: PERSISTENT-ONLY COMPILE 204 | */ 205 | 206 | /* This procedure should always be RUN PERSISTENT. Report the error, */ 207 | /* then cleanup and return. */ 208 | IF NOT THIS-PROCEDURE:PERSISTENT THEN DO: 209 | MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U 210 | VIEW-AS ALERT-BOX ERROR BUTTONS OK. 211 | RETURN. 212 | END. 213 | 214 | &ANALYZE-RESUME _END-PROCEDURE-SETTINGS 215 | 216 | /* ************************* Create Window ************************** */ 217 | 218 | &ANALYZE-SUSPEND _CREATE-WINDOW 219 | /* DESIGN Window definition (used by the UIB) 220 | CREATE WINDOW B-table-Win ASSIGN 221 | HEIGHT = 10.17 222 | WIDTH = 80.14. 223 | /* END WINDOW DEFINITION */ 224 | */ 225 | &ANALYZE-RESUME 226 | 227 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB B-table-Win 228 | /* ************************* Included-Libraries *********************** */ 229 | 230 | {src/adm/method/browser.i} 231 | {include/c-brwzoo.i} 232 | {utp/ut-glob.i} 233 | 234 | /* _UIB-CODE-BLOCK-END */ 235 | &ANALYZE-RESUME 236 | 237 | 238 | 239 | 240 | /* *********** Runtime Attributes and AppBuilder Settings *********** */ 241 | 242 | &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES 243 | /* SETTINGS FOR WINDOW B-table-Win 244 | NOT-VISIBLE,,RUN-PERSISTENT */ 245 | /* SETTINGS FOR FRAME F-Main 246 | NOT-VISIBLE FRAME-NAME Size-to-Fit L-To-R */ 247 | /* BROWSE-TAB br-table bt-confirma F-Main */ 248 | ASSIGN 249 | FRAME F-Main:SCROLLABLE = FALSE 250 | FRAME F-Main:HIDDEN = TRUE. 251 | 252 | /* _RUN-TIME-ATTRIBUTES-END */ 253 | &ANALYZE-RESUME 254 | 255 | 256 | /* Setting information for Queries and Browse Widgets fields */ 257 | 258 | &ANALYZE-SUSPEND _QUERY-BLOCK BROWSE br-table 259 | /* Query rebuild information for BROWSE br-table 260 | _TblList = "Sports.Salesrep" 261 | _Options = "NO-LOCK INDEXED-REPOSITION" 262 | _OrdList = "Sports.Salesrep.Rep-Name|yes" 263 | _Where[1] = "salesrep.rep-name >= c-ini-rep-name and 264 | salesrep.rep-name <= c-fin-rep-name" 265 | _FldNameList[1] = Sports.Salesrep.Sales-Rep 266 | _FldNameList[2] = Sports.Salesrep.Rep-Name 267 | _FldNameList[3] = Sports.Salesrep.Region 268 | _Query is NOT OPENED 269 | */ /* BROWSE br-table */ 270 | &ANALYZE-RESUME 271 | 272 | &ANALYZE-SUSPEND _QUERY-BLOCK FRAME F-Main 273 | /* Query rebuild information for FRAME F-Main 274 | _Options = "NO-LOCK" 275 | _Query is NOT OPENED 276 | */ /* FRAME F-Main */ 277 | &ANALYZE-RESUME 278 | 279 | 280 | 281 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartBrowserCues" B-table-Win _INLINE 282 | /* Actions: adecomm/_so-cue.w ? adecomm/_so-cued.p ? adecomm/_so-cuew.p */ 283 | /*:T SmartBrowser,uib,50010 284 | Destroy on next read */ 285 | /* _UIB-CODE-BLOCK-END */ 286 | &ANALYZE-RESUME 287 | 288 | 289 | 290 | /* ************************ Control Triggers ************************ */ 291 | 292 | &Scoped-define BROWSE-NAME br-table 293 | &Scoped-define SELF-NAME br-table 294 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 295 | ON MOUSE-SELECT-DBLCLICK OF br-table IN FRAME F-Main 296 | DO: 297 | RUN New-State('DblClick':U). 298 | END. 299 | 300 | /* _UIB-CODE-BLOCK-END */ 301 | &ANALYZE-RESUME 302 | 303 | 304 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 305 | ON ROW-ENTRY OF br-table IN FRAME F-Main 306 | DO: 307 | /* This code displays initial values for newly added or copied rows. */ 308 | {src/adm/template/brsentry.i} 309 | 310 | run new-state('New-Line|':U + string(rowid({&FIRST-TABLE-IN-QUERY-{&BROWSE-NAME}}))). 311 | run seta-valor. 312 | END. 313 | 314 | /* _UIB-CODE-BLOCK-END */ 315 | &ANALYZE-RESUME 316 | 317 | 318 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 319 | ON ROW-LEAVE OF br-table IN FRAME F-Main 320 | DO: 321 | /* Do not disable this code or no updates will take place except 322 | by pressing the Save button on an Update SmartPanel. */ 323 | {src/adm/template/brsleave.i} 324 | END. 325 | 326 | /* _UIB-CODE-BLOCK-END */ 327 | &ANALYZE-RESUME 328 | 329 | 330 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL br-table B-table-Win 331 | ON VALUE-CHANGED OF br-table IN FRAME F-Main 332 | DO: 333 | /* This ADM trigger code must be preserved in order to notify other 334 | objects when the browser's current row changes. */ 335 | {src/adm/template/brschnge.i} 336 | run new-state('New-Line|':U + string(rowid({&FIRST-TABLE-IN-QUERY-{&BROWSE-NAME}}))). 337 | run new-state('Value-Changed|':U + string(this-procedure)). 338 | END. 339 | 340 | /* _UIB-CODE-BLOCK-END */ 341 | &ANALYZE-RESUME 342 | 343 | 344 | &Scoped-define SELF-NAME bt-confirma 345 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CONTROL bt-confirma B-table-Win 346 | ON CHOOSE OF bt-confirma IN FRAME F-Main /* Button 1 */ 347 | DO: 348 | assign input frame {&frame-name} c-ini-rep-name c-fin-rep-name. 349 | RUN dispatch IN THIS-PROCEDURE ('open-query':U). 350 | apply 'value-changed':U to {&browse-name}. 351 | END. 352 | 353 | /* _UIB-CODE-BLOCK-END */ 354 | &ANALYZE-RESUME 355 | 356 | 357 | &UNDEFINE SELF-NAME 358 | 359 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK B-table-Win 360 | 361 | 362 | /* *************************** Main Block *************************** */ 363 | 364 | &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN 365 | RUN dispatch IN THIS-PROCEDURE ('initialize':U). 366 | &ENDIF 367 | 368 | /* _UIB-CODE-BLOCK-END */ 369 | &ANALYZE-RESUME 370 | 371 | 372 | /* ********************** Internal Procedures *********************** */ 373 | 374 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-open-query-cases B-table-Win adm/support/_adm-opn.p 375 | PROCEDURE adm-open-query-cases : 376 | /*------------------------------------------------------------------------------ 377 | Purpose: Opens different cases of the query based on attributes 378 | such as the 'Key-Name', or 'SortBy-Case' 379 | Parameters: 380 | ------------------------------------------------------------------------------*/ 381 | DEF VAR Filter-Value AS CHAR NO-UNDO. 382 | 383 | /* Copy 'Filter-Attributes' into local variables. */ 384 | RUN get-attribute ('Filter-Value':U). 385 | Filter-Value = RETURN-VALUE. 386 | 387 | /* No Foreign keys are accepted by this SmartObject. */ 388 | 389 | {&OPEN-QUERY-{&BROWSE-NAME}} 390 | 391 | END PROCEDURE. 392 | 393 | /* _UIB-CODE-BLOCK-END */ 394 | &ANALYZE-RESUME 395 | 396 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available B-table-Win _ADM-ROW-AVAILABLE 397 | PROCEDURE adm-row-available : 398 | /*------------------------------------------------------------------------------ 399 | Purpose: Dispatched to this procedure when the Record- 400 | Source has a new row available. This procedure 401 | tries to get the new row (or foriegn keys) from 402 | the Record-Source and process it. 403 | Parameters: 404 | ------------------------------------------------------------------------------*/ 405 | 406 | /* Define variables needed by this internal procedure. */ 407 | {src/adm/template/row-head.i} 408 | 409 | /* Process the newly available records (i.e. display fields, 410 | open queries, and/or pass records on to any RECORD-TARGETS). */ 411 | {src/adm/template/row-end.i} 412 | 413 | END PROCEDURE. 414 | 415 | /* _UIB-CODE-BLOCK-END */ 416 | &ANALYZE-RESUME 417 | 418 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI B-table-Win _DEFAULT-DISABLE 419 | PROCEDURE disable_UI : 420 | /*------------------------------------------------------------------------------ 421 | Purpose: DISABLE the User Interface 422 | Parameters: 423 | Notes: Here we clean-up the user-interface by deleting 424 | dynamic widgets we have created and/or hide 425 | frames. This procedure is usually called when 426 | we are ready to "clean-up" after running. 427 | ------------------------------------------------------------------------------*/ 428 | /* Hide all frames. */ 429 | HIDE FRAME F-Main. 430 | IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. 431 | END PROCEDURE. 432 | 433 | /* _UIB-CODE-BLOCK-END */ 434 | &ANALYZE-RESUME 435 | 436 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE local-view B-table-Win 437 | PROCEDURE local-view : 438 | /*------------------------------------------------------------------------------ 439 | Purpose: Override standard ADM method 440 | Notes: 441 | ------------------------------------------------------------------------------*/ 442 | 443 | /* Code placed here will execute PRIOR to standard behavior. */ 444 | 445 | /* Dispatch standard ADM method. */ 446 | RUN dispatch IN THIS-PROCEDURE ( INPUT 'view':U ) . 447 | 448 | /* Code placed here will execute AFTER standard behavior. */ 449 | apply 'value-changed':U to {&browse-name} in frame {&frame-name}. 450 | 451 | END PROCEDURE. 452 | 453 | /* _UIB-CODE-BLOCK-END */ 454 | &ANALYZE-RESUME 455 | 456 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE pi-retorna-valor B-table-Win 457 | PROCEDURE pi-retorna-valor : 458 | DEFINE INPUT PARAMETER P-CAMPO AS CHARACTER NO-UNDO. 459 | 460 | DEFINE VARIABLE P-VALOR AS CHAR INIT "" NO-UNDO. 461 | 462 | if avail Sports.Salesrep then do: 463 | case p-campo: 464 | when "Sales-Rep" then 465 | assign p-valor = string(Salesrep.Sales-Rep). 466 | end. 467 | end. 468 | return p-valor. 469 | END PROCEDURE. 470 | 471 | /* _UIB-CODE-BLOCK-END */ 472 | &ANALYZE-RESUME 473 | 474 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-key B-table-Win adm/support/_key-snd.p 475 | PROCEDURE send-key : 476 | /*------------------------------------------------------------------------------ 477 | Purpose: Sends a requested KEY value back to the calling 478 | SmartObject. 479 | Parameters: 480 | ------------------------------------------------------------------------------*/ 481 | 482 | /* Define variables needed by this internal procedure. */ 483 | {src/adm/template/sndkytop.i} 484 | 485 | /* Return the key value associated with each key case. */ 486 | {src/adm/template/sndkycas.i "Sales-Rep" "Salesrep" "Sales-Rep"} 487 | 488 | /* Close the CASE statement and end the procedure. */ 489 | {src/adm/template/sndkyend.i} 490 | 491 | END PROCEDURE. 492 | 493 | /* _UIB-CODE-BLOCK-END */ 494 | &ANALYZE-RESUME 495 | 496 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records B-table-Win _ADM-SEND-RECORDS 497 | PROCEDURE send-records : 498 | /*------------------------------------------------------------------------------ 499 | Purpose: Send record ROWID's for all tables used by 500 | this file. 501 | Parameters: see template/snd-head.i 502 | ------------------------------------------------------------------------------*/ 503 | 504 | /* Define variables needed by this internal procedure. */ 505 | {src/adm/template/snd-head.i} 506 | 507 | /* For each requested table, put it's ROWID in the output list. */ 508 | {src/adm/template/snd-list.i "Salesrep"} 509 | 510 | /* Deal with any unexpected table requests before closing. */ 511 | {src/adm/template/snd-end.i} 512 | 513 | END PROCEDURE. 514 | 515 | /* _UIB-CODE-BLOCK-END */ 516 | &ANALYZE-RESUME 517 | 518 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed B-table-Win 519 | PROCEDURE state-changed : 520 | /* ----------------------------------------------------------- 521 | Purpose: 522 | Parameters: 523 | Notes: 524 | -------------------------------------------------------------*/ 525 | DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO. 526 | DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO. 527 | 528 | CASE p-state: 529 | /* Object instance CASEs can go here to replace standard behavior 530 | or add new cases. */ 531 | {src/adm/template/bstates.i} 532 | END CASE. 533 | run pi-trata-state (p-issuer-hdl, p-state). 534 | END PROCEDURE. 535 | 536 | /* _UIB-CODE-BLOCK-END */ 537 | &ANALYZE-RESUME 538 | 539 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "RetornaValorCampo" B-table-Win _INLINE 540 | /* Actions: ? ? ? ? support/brwrtval.p */ 541 | /* Procedure desativada */ 542 | /* _UIB-CODE-BLOCK-END */ 543 | &ANALYZE-RESUME 544 | 545 | -------------------------------------------------------------------------------- /06 - DDKGUI/spgo/g01sp008.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spgo/g01sp008.r -------------------------------------------------------------------------------- /06 - DDKGUI/spgo/g01sp008.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spgo/g01sp008.w -------------------------------------------------------------------------------- /06 - DDKGUI/sports/Sports.lg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/sports/Sports.lg -------------------------------------------------------------------------------- /06 - DDKGUI/sports/Sports.st: -------------------------------------------------------------------------------- 1 | # 2 | b !"D:\2015-00-DEV\Study\Study-Progress\06 - DDKGUI\sports\" 3 | # 4 | d "Schema Area":6,32;1 !"D:\2015-00-DEV\Study\Study-Progress\06 - DDKGUI\sports\" 5 | # 6 | d "Info Area":7,32;1 !"D:\2015-00-DEV\Study\Study-Progress\06 - DDKGUI\sports\" 7 | # 8 | d "Customer/Order Area":8,32;8 !"D:\2015-00-DEV\Study\Study-Progress\06 - DDKGUI\sports\" 9 | # 10 | d "Primary Index Area":9,1;8 !"D:\2015-00-DEV\Study\Study-Progress\06 - DDKGUI\sports\" 11 | # 12 | d "Customer Index Area":10,1;64 !"D:\2015-00-DEV\Study\Study-Progress\06 - DDKGUI\sports\" 13 | # 14 | d "Order Index Area":11,32;64 !"D:\2015-00-DEV\Study\Study-Progress\06 - DDKGUI\sports\" 15 | -------------------------------------------------------------------------------- /06 - DDKGUI/sports/Sports_10.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/sports/Sports_10.d1 -------------------------------------------------------------------------------- /06 - DDKGUI/sports/Sports_9.d1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/sports/Sports_9.d1 -------------------------------------------------------------------------------- /06 - DDKGUI/spp/sp0011.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spp/sp0011.r -------------------------------------------------------------------------------- /06 - DDKGUI/spp/sp0011.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spp/sp0011.w -------------------------------------------------------------------------------- /06 - DDKGUI/spp/sp0012.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spp/sp0012.r -------------------------------------------------------------------------------- /06 - DDKGUI/spp/sp0012.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spp/sp0012.w -------------------------------------------------------------------------------- /06 - DDKGUI/spp/sp0012a.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spp/sp0012a.w -------------------------------------------------------------------------------- /06 - DDKGUI/spp/sp0081.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spp/sp0081.r -------------------------------------------------------------------------------- /06 - DDKGUI/spp/sp0081.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spp/sp0081.w -------------------------------------------------------------------------------- /06 - DDKGUI/spqry/q01sp001.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spqry/q01sp001.r -------------------------------------------------------------------------------- /06 - DDKGUI/spqry/q01sp001.w: -------------------------------------------------------------------------------- 1 | &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1 2 | &ANALYZE-RESUME 3 | /* Connected Databases 4 | sports PROGRESS 5 | */ 6 | &Scoped-define WINDOW-NAME CURRENT-WINDOW 7 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS q-tables 8 | /*:T ******************************************************************************* 9 | ** Copyright DATASUL S.A. (1997) 10 | ** Todos os Direitos Reservados. 11 | ** 12 | ** Este fonte e de propriedade exclusiva da DATASUL, sua reproducao 13 | ** parcial ou total por qualquer meio, so podera ser feita mediante 14 | ** autorizacao expressa. 15 | *******************************************************************************/ 16 | {include/i-prgvrs.i Q99XX999 9.99.99.999} 17 | 18 | /* Create an unnamed pool to store all the widgets created 19 | by this procedure. This is a good default which assures 20 | that this procedure's triggers and internal procedures 21 | will execute in this procedure's storage, and that proper 22 | cleanup will occur on deletion of the procedure. */ 23 | 24 | CREATE WIDGET-POOL. 25 | 26 | /* *************************** Definitions ************************** */ 27 | &Scop adm-attribute-dlg support/queryd.w 28 | 29 | /* Parameters Definitions --- */ 30 | 31 | /* Local Variable Definitions --- */ 32 | 33 | /* _UIB-CODE-BLOCK-END */ 34 | &ANALYZE-RESUME 35 | 36 | 37 | &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK 38 | 39 | /* ******************** Preprocessor Definitions ******************** */ 40 | 41 | &Scoped-define PROCEDURE-TYPE SmartQuery 42 | &Scoped-define DB-AWARE no 43 | 44 | &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,Navigation-Target 45 | 46 | &Scoped-define QUERY-NAME Query-Main 47 | 48 | /* Internal Tables (found by Frame, Query & Browse Queries) */ 49 | &Scoped-define INTERNAL-TABLES Customer 50 | 51 | /* Definitions for QUERY Query-Main */ 52 | &Scoped-define QUERY-STRING-Query-Main FOR EACH Customer NO-LOCK 53 | &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Customer NO-LOCK. 54 | &Scoped-define TABLES-IN-QUERY-Query-Main Customer 55 | &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Customer 56 | 57 | 58 | /* Custom List Definitions */ 59 | /* List-1,List-2,List-3,List-4,List-5,List-6 */ 60 | 61 | /* _UIB-PREPROCESSOR-BLOCK-END */ 62 | &ANALYZE-RESUME 63 | 64 | 65 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" q-tables _INLINE 66 | /* Actions: ? adm/support/keyedit.w ? ? ? */ 67 | /* STRUCTURED-DATA 68 | 69 | &QUERY-NAME 70 | 71 | 72 | Cust-Num||y|Sports.Customer.Cust-Num 73 | Sales-Rep||y|Sports.Customer.Sales-Rep 74 | State||y|Sports.Customer.State 75 | 76 | 77 | ************************** 78 | * Set attributes related to FOREIGN KEYS 79 | */ 80 | RUN set-attribute-list ( 81 | 'Keys-Accepted = , 82 | Keys-Supplied = "Cust-Num,Sales-Rep,State"':U). 83 | 84 | /* Tell the ADM to use the OPEN-QUERY-CASES. */ 85 | &Scoped-define OPEN-QUERY-CASES RUN dispatch ('open-query-cases':U). 86 | /************************** 87 | */ 88 | /* _UIB-CODE-BLOCK-END */ 89 | &ANALYZE-RESUME 90 | 91 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Advanced Query Options" q-tables _INLINE 92 | /* Actions: ? adm/support/advqedit.w ? ? ? */ 93 | /* STRUCTURED-DATA 94 | 95 | &QUERY-NAME 96 | 97 | 98 | 99 | 100 | ************************ 101 | * Set attributes related to SORTBY-OPTIONS */ 102 | RUN set-attribute-list ( 103 | 'SortBy-Options = ""':U). 104 | /************************ 105 | 106 | 107 | ************************ 108 | * Initialize Filter Attributes */ 109 | RUN set-attribute-list IN THIS-PROCEDURE (' 110 | Filter-Value=':U). 111 | /************************ 112 | */ 113 | 114 | /* _UIB-CODE-BLOCK-END */ 115 | &ANALYZE-RESUME 116 | 117 | 118 | /* *********************** Control Definitions ********************** */ 119 | 120 | /* Query definitions */ 121 | &ANALYZE-SUSPEND 122 | DEFINE QUERY Query-Main FOR 123 | Customer SCROLLING. 124 | &ANALYZE-RESUME 125 | 126 | /* ************************ Frame Definitions *********************** */ 127 | 128 | 129 | /* *********************** Procedure Settings ************************ */ 130 | 131 | &ANALYZE-SUSPEND _PROCEDURE-SETTINGS 132 | /* Settings for THIS-PROCEDURE 133 | Type: SmartQuery 134 | Allow: Basic,Query 135 | Frames: 1 136 | Add Fields to: NEITHER 137 | Other Settings: PERSISTENT-ONLY COMPILE 138 | */ 139 | 140 | /* This procedure should always be RUN PERSISTENT. Report the error, */ 141 | /* then cleanup and return. */ 142 | IF NOT THIS-PROCEDURE:PERSISTENT THEN DO: 143 | MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U 144 | VIEW-AS ALERT-BOX ERROR BUTTONS OK. 145 | RETURN. 146 | END. 147 | 148 | &ANALYZE-RESUME _END-PROCEDURE-SETTINGS 149 | 150 | /* ************************* Create Window ************************** */ 151 | 152 | &ANALYZE-SUSPEND _CREATE-WINDOW 153 | /* DESIGN Window definition (used by the UIB) 154 | CREATE WINDOW q-tables ASSIGN 155 | HEIGHT = 1.33 156 | WIDTH = 22. 157 | /* END WINDOW DEFINITION */ 158 | */ 159 | &ANALYZE-RESUME 160 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartQueryCues" q-tables _INLINE 161 | /* Actions: adecomm/_so-cue.w ? adecomm/_so-cued.p ? adecomm/_so-cuew.p */ 162 | /*:T SmartQuery,uib,50000 163 | Destroy on next read */ 164 | /* _UIB-CODE-BLOCK-END */ 165 | &ANALYZE-RESUME 166 | 167 | 168 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB q-tables 169 | /* ************************* Included-Libraries *********************** */ 170 | 171 | {utp/ut-glob.i} 172 | {src/adm/method/query.i} 173 | {include/c-query.i} 174 | 175 | /* _UIB-CODE-BLOCK-END */ 176 | &ANALYZE-RESUME 177 | 178 | 179 | 180 | 181 | /* *********** Runtime Attributes and AppBuilder Settings *********** */ 182 | 183 | &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES 184 | /* SETTINGS FOR WINDOW q-tables 185 | VISIBLE,,RUN-PERSISTENT */ 186 | /* _RUN-TIME-ATTRIBUTES-END */ 187 | &ANALYZE-RESUME 188 | 189 | 190 | /* Setting information for Queries and Browse Widgets fields */ 191 | 192 | &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main 193 | /* Query rebuild information for QUERY Query-Main 194 | _TblList = "Sports.Customer" 195 | _Options = "NO-LOCK" 196 | _Design-Parent is WINDOW q-tables @ ( 1.17 , 9.86 ) 197 | */ /* QUERY Query-Main */ 198 | &ANALYZE-RESUME 199 | 200 | 201 | 202 | 203 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK q-tables 204 | 205 | 206 | /* *************************** Main Block *************************** */ 207 | 208 | &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN 209 | RUN dispatch IN THIS-PROCEDURE ('initialize':U). 210 | &ENDIF 211 | 212 | /* _UIB-CODE-BLOCK-END */ 213 | &ANALYZE-RESUME 214 | 215 | 216 | /* ********************** Internal Procedures *********************** */ 217 | 218 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-open-query-cases q-tables adm/support/_adm-opn.p 219 | PROCEDURE adm-open-query-cases : 220 | /*------------------------------------------------------------------------------ 221 | Purpose: Opens different cases of the query based on attributes 222 | such as the 'Key-Name', or 'SortBy-Case' 223 | Parameters: 224 | ------------------------------------------------------------------------------*/ 225 | DEF VAR Filter-Value AS CHAR NO-UNDO. 226 | 227 | /* Copy 'Filter-Attributes' into local variables. */ 228 | RUN get-attribute ('Filter-Value':U). 229 | Filter-Value = RETURN-VALUE. 230 | 231 | /* No Foreign keys are accepted by this SmartObject. */ 232 | 233 | {&OPEN-QUERY-{&QUERY-NAME}} 234 | 235 | END PROCEDURE. 236 | 237 | /* _UIB-CODE-BLOCK-END */ 238 | &ANALYZE-RESUME 239 | 240 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available q-tables _ADM-ROW-AVAILABLE 241 | PROCEDURE adm-row-available : 242 | /*------------------------------------------------------------------------------ 243 | Purpose: Dispatched to this procedure when the Record- 244 | Source has a new row available. This procedure 245 | tries to get the new row (or foriegn keys) from 246 | the Record-Source and process it. 247 | Parameters: 248 | ------------------------------------------------------------------------------*/ 249 | 250 | /* Define variables needed by this internal procedure. */ 251 | {src/adm/template/row-head.i} 252 | 253 | /* Process the newly available records (i.e. display fields, 254 | open queries, and/or pass records on to any RECORD-TARGETS). */ 255 | {src/adm/template/row-end.i} 256 | 257 | END PROCEDURE. 258 | 259 | /* _UIB-CODE-BLOCK-END */ 260 | &ANALYZE-RESUME 261 | 262 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI q-tables _DEFAULT-DISABLE 263 | PROCEDURE disable_UI : 264 | /*------------------------------------------------------------------------------ 265 | Purpose: DISABLE the User Interface 266 | Parameters: 267 | Notes: Here we clean-up the user-interface by deleting 268 | dynamic widgets we have created and/or hide 269 | frames. This procedure is usually called when 270 | we are ready to "clean-up" after running. 271 | ------------------------------------------------------------------------------*/ 272 | /* Hide all frames. */ 273 | IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. 274 | END PROCEDURE. 275 | 276 | /* _UIB-CODE-BLOCK-END */ 277 | &ANALYZE-RESUME 278 | 279 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-key q-tables adm/support/_key-snd.p 280 | PROCEDURE send-key : 281 | /*------------------------------------------------------------------------------ 282 | Purpose: Sends a requested KEY value back to the calling 283 | SmartObject. 284 | Parameters: 285 | ------------------------------------------------------------------------------*/ 286 | 287 | /* Define variables needed by this internal procedure. */ 288 | {src/adm/template/sndkytop.i} 289 | 290 | /* Return the key value associated with each key case. */ 291 | {src/adm/template/sndkycas.i "Cust-Num" "Customer" "Cust-Num"} 292 | {src/adm/template/sndkycas.i "Sales-Rep" "Customer" "Sales-Rep"} 293 | {src/adm/template/sndkycas.i "State" "Customer" "State"} 294 | 295 | /* Close the CASE statement and end the procedure. */ 296 | {src/adm/template/sndkyend.i} 297 | 298 | END PROCEDURE. 299 | 300 | /* _UIB-CODE-BLOCK-END */ 301 | &ANALYZE-RESUME 302 | 303 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records q-tables _ADM-SEND-RECORDS 304 | PROCEDURE send-records : 305 | /*------------------------------------------------------------------------------ 306 | Purpose: Send record ROWID's for all tables used by 307 | this file. 308 | Parameters: see template/snd-head.i 309 | ------------------------------------------------------------------------------*/ 310 | 311 | /* Define variables needed by this internal procedure. */ 312 | {src/adm/template/snd-head.i} 313 | 314 | /* For each requested table, put it's ROWID in the output list. */ 315 | {src/adm/template/snd-list.i "Customer"} 316 | 317 | /* Deal with any unexpected table requests before closing. */ 318 | {src/adm/template/snd-end.i} 319 | 320 | END PROCEDURE. 321 | 322 | /* _UIB-CODE-BLOCK-END */ 323 | &ANALYZE-RESUME 324 | 325 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed q-tables 326 | PROCEDURE state-changed : 327 | /* ----------------------------------------------------------- 328 | Purpose: 329 | Parameters: 330 | Notes: 331 | -------------------------------------------------------------*/ 332 | DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO. 333 | DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO. 334 | 335 | CASE p-state: 336 | /* Object instance CASEs can go here to replace standard behavior 337 | or add new cases. */ 338 | {src/adm/template/qstates.i} 339 | END CASE. 340 | run pi-trata-state (p-issuer-hdl, p-state). 341 | END PROCEDURE. 342 | 343 | /* _UIB-CODE-BLOCK-END */ 344 | &ANALYZE-RESUME 345 | 346 | -------------------------------------------------------------------------------- /06 - DDKGUI/spqry/q01sp007.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spqry/q01sp007.r -------------------------------------------------------------------------------- /06 - DDKGUI/spqry/q01sp007.w: -------------------------------------------------------------------------------- 1 | &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12 GUI ADM1 2 | &ANALYZE-RESUME 3 | /* Connected Databases 4 | sports PROGRESS 5 | */ 6 | &Scoped-define WINDOW-NAME CURRENT-WINDOW 7 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS q-tables 8 | /*:T ******************************************************************************* 9 | ** Copyright DATASUL S.A. (1997) 10 | ** Todos os Direitos Reservados. 11 | ** 12 | ** Este fonte e de propriedade exclusiva da DATASUL, sua reproducao 13 | ** parcial ou total por qualquer meio, so podera ser feita mediante 14 | ** autorizacao expressa. 15 | *******************************************************************************/ 16 | {include/i-prgvrs.i Q99XX999 9.99.99.999} 17 | 18 | /* Create an unnamed pool to store all the widgets created 19 | by this procedure. This is a good default which assures 20 | that this procedure's triggers and internal procedures 21 | will execute in this procedure's storage, and that proper 22 | cleanup will occur on deletion of the procedure. */ 23 | 24 | CREATE WIDGET-POOL. 25 | 26 | /* *************************** Definitions ************************** */ 27 | &Scop adm-attribute-dlg support/queryd.w 28 | 29 | /* Parameters Definitions --- */ 30 | 31 | /* Local Variable Definitions --- */ 32 | 33 | /* _UIB-CODE-BLOCK-END */ 34 | &ANALYZE-RESUME 35 | 36 | 37 | &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK 38 | 39 | /* ******************** Preprocessor Definitions ******************** */ 40 | 41 | &Scoped-define PROCEDURE-TYPE SmartQuery 42 | &Scoped-define DB-AWARE no 43 | 44 | &Scoped-define ADM-SUPPORTED-LINKS Record-Source,Record-Target,Navigation-Target 45 | 46 | &Scoped-define QUERY-NAME Query-Main 47 | 48 | /* Internal Tables (found by Frame, Query & Browse Queries) */ 49 | &Scoped-define INTERNAL-TABLES Ref-Call 50 | 51 | /* Definitions for QUERY Query-Main */ 52 | &Scoped-define QUERY-STRING-Query-Main FOR EACH Ref-Call NO-LOCK 53 | &Scoped-define OPEN-QUERY-Query-Main OPEN QUERY Query-Main FOR EACH Ref-Call NO-LOCK. 54 | &Scoped-define TABLES-IN-QUERY-Query-Main Ref-Call 55 | &Scoped-define FIRST-TABLE-IN-QUERY-Query-Main Ref-Call 56 | 57 | 58 | /* Custom List Definitions */ 59 | /* List-1,List-2,List-3,List-4,List-5,List-6 */ 60 | 61 | /* _UIB-PREPROCESSOR-BLOCK-END */ 62 | &ANALYZE-RESUME 63 | 64 | 65 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Foreign Keys" q-tables _INLINE 66 | /* Actions: ? adm/support/keyedit.w ? ? ? */ 67 | /* STRUCTURED-DATA 68 | 69 | &QUERY-NAME 70 | 71 | 72 | Cust-Num||y|Sports.Ref-Call.Cust-Num 73 | Call-Num||y|Sports.Ref-Call.Call-Num 74 | Sales-Rep||y|Sports.Ref-Call.Sales-Rep 75 | 76 | 77 | ************************** 78 | * Set attributes related to FOREIGN KEYS 79 | */ 80 | RUN set-attribute-list ( 81 | 'Keys-Accepted = , 82 | Keys-Supplied = "Cust-Num,Call-Num,Sales-Rep"':U). 83 | 84 | /* Tell the ADM to use the OPEN-QUERY-CASES. */ 85 | &Scoped-define OPEN-QUERY-CASES RUN dispatch ('open-query-cases':U). 86 | /************************** 87 | */ 88 | /* _UIB-CODE-BLOCK-END */ 89 | &ANALYZE-RESUME 90 | 91 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "Advanced Query Options" q-tables _INLINE 92 | /* Actions: ? adm/support/advqedit.w ? ? ? */ 93 | /* STRUCTURED-DATA 94 | 95 | &QUERY-NAME 96 | 97 | 98 | 99 | 100 | ************************ 101 | * Set attributes related to SORTBY-OPTIONS */ 102 | RUN set-attribute-list ( 103 | 'SortBy-Options = ""':U). 104 | /************************ 105 | 106 | 107 | ************************ 108 | * Initialize Filter Attributes */ 109 | RUN set-attribute-list IN THIS-PROCEDURE (' 110 | Filter-Value=':U). 111 | /************************ 112 | */ 113 | 114 | /* _UIB-CODE-BLOCK-END */ 115 | &ANALYZE-RESUME 116 | 117 | 118 | /* *********************** Control Definitions ********************** */ 119 | 120 | /* Query definitions */ 121 | &ANALYZE-SUSPEND 122 | DEFINE QUERY Query-Main FOR 123 | Ref-Call SCROLLING. 124 | &ANALYZE-RESUME 125 | 126 | /* ************************ Frame Definitions *********************** */ 127 | 128 | 129 | /* *********************** Procedure Settings ************************ */ 130 | 131 | &ANALYZE-SUSPEND _PROCEDURE-SETTINGS 132 | /* Settings for THIS-PROCEDURE 133 | Type: SmartQuery 134 | Allow: Basic,Query 135 | Frames: 1 136 | Add Fields to: NEITHER 137 | Other Settings: PERSISTENT-ONLY COMPILE 138 | */ 139 | 140 | /* This procedure should always be RUN PERSISTENT. Report the error, */ 141 | /* then cleanup and return. */ 142 | IF NOT THIS-PROCEDURE:PERSISTENT THEN DO: 143 | MESSAGE "{&FILE-NAME} should only be RUN PERSISTENT.":U 144 | VIEW-AS ALERT-BOX ERROR BUTTONS OK. 145 | RETURN. 146 | END. 147 | 148 | &ANALYZE-RESUME _END-PROCEDURE-SETTINGS 149 | 150 | /* ************************* Create Window ************************** */ 151 | 152 | &ANALYZE-SUSPEND _CREATE-WINDOW 153 | /* DESIGN Window definition (used by the UIB) 154 | CREATE WINDOW q-tables ASSIGN 155 | HEIGHT = 1.33 156 | WIDTH = 22. 157 | /* END WINDOW DEFINITION */ 158 | */ 159 | &ANALYZE-RESUME 160 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _XFTR "SmartQueryCues" q-tables _INLINE 161 | /* Actions: adecomm/_so-cue.w ? adecomm/_so-cued.p ? adecomm/_so-cuew.p */ 162 | /*:T SmartQuery,uib,50000 163 | Destroy on next read */ 164 | /* _UIB-CODE-BLOCK-END */ 165 | &ANALYZE-RESUME 166 | 167 | 168 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB q-tables 169 | /* ************************* Included-Libraries *********************** */ 170 | 171 | {utp/ut-glob.i} 172 | {src/adm/method/query.i} 173 | {include/c-query.i} 174 | 175 | /* _UIB-CODE-BLOCK-END */ 176 | &ANALYZE-RESUME 177 | 178 | 179 | 180 | 181 | /* *********** Runtime Attributes and AppBuilder Settings *********** */ 182 | 183 | &ANALYZE-SUSPEND _RUN-TIME-ATTRIBUTES 184 | /* SETTINGS FOR WINDOW q-tables 185 | VISIBLE,,RUN-PERSISTENT */ 186 | /* _RUN-TIME-ATTRIBUTES-END */ 187 | &ANALYZE-RESUME 188 | 189 | 190 | /* Setting information for Queries and Browse Widgets fields */ 191 | 192 | &ANALYZE-SUSPEND _QUERY-BLOCK QUERY Query-Main 193 | /* Query rebuild information for QUERY Query-Main 194 | _TblList = "Sports.Ref-Call" 195 | _Options = "NO-LOCK" 196 | _Design-Parent is WINDOW q-tables @ ( 1.17 , 9.86 ) 197 | */ /* QUERY Query-Main */ 198 | &ANALYZE-RESUME 199 | 200 | 201 | 202 | 203 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK q-tables 204 | 205 | 206 | /* *************************** Main Block *************************** */ 207 | 208 | &IF DEFINED(UIB_IS_RUNNING) <> 0 &THEN 209 | RUN dispatch IN THIS-PROCEDURE ('initialize':U). 210 | &ENDIF 211 | 212 | /* _UIB-CODE-BLOCK-END */ 213 | &ANALYZE-RESUME 214 | 215 | 216 | /* ********************** Internal Procedures *********************** */ 217 | 218 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-open-query-cases q-tables adm/support/_adm-opn.p 219 | PROCEDURE adm-open-query-cases : 220 | /*------------------------------------------------------------------------------ 221 | Purpose: Opens different cases of the query based on attributes 222 | such as the 'Key-Name', or 'SortBy-Case' 223 | Parameters: 224 | ------------------------------------------------------------------------------*/ 225 | DEF VAR Filter-Value AS CHAR NO-UNDO. 226 | 227 | /* Copy 'Filter-Attributes' into local variables. */ 228 | RUN get-attribute ('Filter-Value':U). 229 | Filter-Value = RETURN-VALUE. 230 | 231 | /* No Foreign keys are accepted by this SmartObject. */ 232 | 233 | {&OPEN-QUERY-{&QUERY-NAME}} 234 | 235 | END PROCEDURE. 236 | 237 | /* _UIB-CODE-BLOCK-END */ 238 | &ANALYZE-RESUME 239 | 240 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE adm-row-available q-tables _ADM-ROW-AVAILABLE 241 | PROCEDURE adm-row-available : 242 | /*------------------------------------------------------------------------------ 243 | Purpose: Dispatched to this procedure when the Record- 244 | Source has a new row available. This procedure 245 | tries to get the new row (or foriegn keys) from 246 | the Record-Source and process it. 247 | Parameters: 248 | ------------------------------------------------------------------------------*/ 249 | 250 | /* Define variables needed by this internal procedure. */ 251 | {src/adm/template/row-head.i} 252 | 253 | /* Process the newly available records (i.e. display fields, 254 | open queries, and/or pass records on to any RECORD-TARGETS). */ 255 | {src/adm/template/row-end.i} 256 | 257 | END PROCEDURE. 258 | 259 | /* _UIB-CODE-BLOCK-END */ 260 | &ANALYZE-RESUME 261 | 262 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE disable_UI q-tables _DEFAULT-DISABLE 263 | PROCEDURE disable_UI : 264 | /*------------------------------------------------------------------------------ 265 | Purpose: DISABLE the User Interface 266 | Parameters: 267 | Notes: Here we clean-up the user-interface by deleting 268 | dynamic widgets we have created and/or hide 269 | frames. This procedure is usually called when 270 | we are ready to "clean-up" after running. 271 | ------------------------------------------------------------------------------*/ 272 | /* Hide all frames. */ 273 | IF THIS-PROCEDURE:PERSISTENT THEN DELETE PROCEDURE THIS-PROCEDURE. 274 | END PROCEDURE. 275 | 276 | /* _UIB-CODE-BLOCK-END */ 277 | &ANALYZE-RESUME 278 | 279 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-key q-tables adm/support/_key-snd.p 280 | PROCEDURE send-key : 281 | /*------------------------------------------------------------------------------ 282 | Purpose: Sends a requested KEY value back to the calling 283 | SmartObject. 284 | Parameters: 285 | ------------------------------------------------------------------------------*/ 286 | 287 | /* Define variables needed by this internal procedure. */ 288 | {src/adm/template/sndkytop.i} 289 | 290 | /* Return the key value associated with each key case. */ 291 | {src/adm/template/sndkycas.i "Cust-Num" "Ref-Call" "Cust-Num"} 292 | {src/adm/template/sndkycas.i "Call-Num" "Ref-Call" "Call-Num"} 293 | {src/adm/template/sndkycas.i "Sales-Rep" "Ref-Call" "Sales-Rep"} 294 | 295 | /* Close the CASE statement and end the procedure. */ 296 | {src/adm/template/sndkyend.i} 297 | 298 | END PROCEDURE. 299 | 300 | /* _UIB-CODE-BLOCK-END */ 301 | &ANALYZE-RESUME 302 | 303 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE send-records q-tables _ADM-SEND-RECORDS 304 | PROCEDURE send-records : 305 | /*------------------------------------------------------------------------------ 306 | Purpose: Send record ROWID's for all tables used by 307 | this file. 308 | Parameters: see template/snd-head.i 309 | ------------------------------------------------------------------------------*/ 310 | 311 | /* Define variables needed by this internal procedure. */ 312 | {src/adm/template/snd-head.i} 313 | 314 | /* For each requested table, put it's ROWID in the output list. */ 315 | {src/adm/template/snd-list.i "Ref-Call"} 316 | 317 | /* Deal with any unexpected table requests before closing. */ 318 | {src/adm/template/snd-end.i} 319 | 320 | END PROCEDURE. 321 | 322 | /* _UIB-CODE-BLOCK-END */ 323 | &ANALYZE-RESUME 324 | 325 | &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE state-changed q-tables 326 | PROCEDURE state-changed : 327 | /* ----------------------------------------------------------- 328 | Purpose: 329 | Parameters: 330 | Notes: 331 | -------------------------------------------------------------*/ 332 | DEFINE INPUT PARAMETER p-issuer-hdl AS HANDLE NO-UNDO. 333 | DEFINE INPUT PARAMETER p-state AS CHARACTER NO-UNDO. 334 | 335 | CASE p-state: 336 | /* Object instance CASEs can go here to replace standard behavior 337 | or add new cases. */ 338 | {src/adm/template/qstates.i} 339 | END CASE. 340 | run pi-trata-state (p-issuer-hdl, p-state). 341 | END PROCEDURE. 342 | 343 | /* _UIB-CODE-BLOCK-END */ 344 | &ANALYZE-RESUME 345 | 346 | -------------------------------------------------------------------------------- /06 - DDKGUI/spqry/q01sp008.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spqry/q01sp008.r -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v01sp001.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v01sp001.r -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v01sp001.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v01sp001.w -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v01sp007.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v01sp007.r -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v01sp007.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v01sp007.w -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v01sp008.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v01sp008.r -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v01sp008.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v01sp008.w -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v02sp001.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v02sp001.r -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v02sp001.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v02sp001.w -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v02sp007.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v02sp007.r -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v02sp007.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v02sp007.w -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v03sp001.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v03sp001.r -------------------------------------------------------------------------------- /06 - DDKGUI/spvwr/v03sp001.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spvwr/v03sp001.w -------------------------------------------------------------------------------- /06 - DDKGUI/spzoom/z01sp008.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spzoom/z01sp008.r -------------------------------------------------------------------------------- /06 - DDKGUI/spzoom/z01sp008.w: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sanderlei/Study-Progress/b81190782bc94c475782279021e15bf7fb8d4217/06 - DDKGUI/spzoom/z01sp008.w -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Study-Progress 2 | Study - Progress 3 | Study - Progress 4 | Study - Progress 5 | Study - Progress 6 | Study - Progress 7 | Study - Progress 8 | Study - Progress 9 | Study - Progress 10 | Study - Progress 11 | Study - Progress 12 | Study - Progress 13 | Study - Progress 14 | Study - Progress 15 | --------------------------------------------------------------------------------