1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
|
program-id. agence.
working-storage section.
1 choix pic 9.
* info client
1 numc pic 99.
1 nomc pic x(15).
1 prenomc pic x(15).
1 adressec pic x(30).
1 villec pic x(15).
1 telc pic 9(10).
* info location
* + numc
1 numa pic 99.
1 datedeb pic 9(8).
1 jour pic xx.
1 mois pic xx.
1 annee pic xxxx.
1 duree pic 9.
1 nbpers pic 9.
1 montant pic 9(5).
1 regle pic x.
88 payer value '1' false '0'.
screen section.
*plage nettoyage ecran et fond ecran
1 ecran-couleur.
2 blank screen background-color 1.
*plage titre
1 a-plg-titre.
2 line 2 col 37 'AGENCE'.
2 line 4 col 35 'TempsLibre'.
*plage retour
1 a-plg-retour.
2 line 22 col 58 '1 Quitter :'.
2 line 23 col 58 '2 Menu Principal :'.
2 s-chp-retour pic z to choix required.
*plage menu principal
1 a-plg-menu.
2 line 6 col 17 'Menu principal'.
2 line 8 col 17 '1 : Gestion clients '.
2 line 10 col 17 '2 : Gestion locations '.
2 line 12 col 17 '3 : Disponibilites '.
2 line 14 col 17 '4 : Facturation '.
2 line 16 col 17 '5 : Recapitulatif '.
2 line 18 col 17 '6 : Quitter '.
*plage choix
1 s-plg-choix.
2 line 22 col 3 'Votre choix : '.
2 s-chp-choix pic z to choix required.
*plage mauvais choix
1 a-plg-autrechoix.
2 line 22 col 20 'Pas de menu disponible '.
*plage menu client
1 a-plg-menuc.
2 line 6 col 17 'Clients'.
2 line 8 col 17 '1 : Consulter un client '.
2 line 10 col 17 '2 : Ajouter un client '.
2 line 12 col 17 '3 : Supprimer client '.
2 line 14 col 17 '4 : Modifier client '.
2 line 16 col 17 '5 : Lister tous les clients '.
2 line 18 col 17 '6 : Retour menu '.
2 line 20 col 17 '7 : QUITTER '.
*plage consulter client
1 a-plg-menucc.
2 line 6 col 28 ' * Fiche d''un client *'.
2 line 10 col 4 'Numero : '.
2 s-chp-numfc pic zz to numc required.
*plage ajouter client
1 a-plg-menuac.
2 line 6 col 28 ' * Ajout d''un client *'.
2 line 10 col 4 'Numero : '.
2 s-chp-numc pic zz to numc required.
2 line 10 col 20 'Nom : '.
2 s-chp-nomc pic x(15) to nomc required.
2 line 10 col 45 'Prenom : '.
2 s-chp-prenomc pic x(15) to prenomc required.
2 line 13 col 4 'Adresse : '.
2 s-chp-adressec pic x(30) to adressec required.
2 line 13 col 47 'Ville : '.
2 s-chp-villec pic x(15) to villec required.
2 line 16 col 4 'Telephone : '.
2 s-chp-telc pic z(10) to telc required.
*plage supprimer client
1 a-plg-menusc.
2 line 6 col 25 ' * Supression d''un client *'.
2 line 10 col 4 'Numero : '.
2 s-chp-numsupc pic zz to numc required.
*plage modifier client
1 a-plg-menumc.
2 line 6 col 24 ' * Modification d''un client *'.
2 line 10 col 4 'Numero : '.
2 s-chp-nummodc pic zz to numc required.
*plage liste client
1 a-plg-menulc.
2 line 6 col 27 ' * Liste des clients *'.
2 line 8 col 2 'Nro'.
2 line 8 col 6 'Nom'.
2 line 8 col 23 'Prenom'.
*plage menu locations
1 a-plg-menul.
2 line 6 col 17 'Locations'.
2 line 8 col 17 '1 : Fiche location '.
2 line 10 col 17 '2 : Ajouter une location '.
2 line 12 col 17 '3 : Supprimer une location '.
2 line 14 col 17 '4 : Modifier une location '.
2 line 16 col 17 '5 : Lister toutes les locations '.
2 line 18 col 17 '6 : Retour menu '.
2 line 20 col 17 '6 : QUITTER '.
* fiche location
1 a-plg-menufl.
2 line 6 col 17 'Fiche location'.
* ajout location
1 a-plg-menual.
2 line 6 col 27 ' * Ajout d''une location *'.
2 line 10 col 4 'Numero client : '.
2 s-chp-numca pic zz to numc required.
2 line 10 col 26 'Numero appart : '.
2 s-chp-numa pic zz to numa required.
2 line 10 col 46 'Date debut : '.
2 s-chp-jour pic zz to jour required.
2 line 10 col 61 '/'.
2 s-chp-mois pic zz to mois required.
2 line 10 col 65 '/'.
2 s-chp-annee pic zzzz to annee required.
2 line 12 col 4 'Duree : '.
2 s-chp-duree pic z to duree required.
2 line 12 col 14 'semaine(s)'.
2 line 12 col 26 'Nombre de personnes : '.
2 s-chp-nbpers pic z to nbpers required.
2 line 14 col 4 'Regle : '.
2 s-chp-regle pic z to regle required.
* modification location
1 a-plg-menuml.
2 line 6 col 17 'Supprime location'.
* supprimer location
1 a-plg-menusl.
2 line 6 col 17 'Modifie location'.
* liste des locations
1 a-plg-menull.
2 line 6 col 17 'Liste location'.
*plage menu disponibilité
1 a-plg-disponibilite.
2 line 6 col 17 "Disponibilite".
2 line 8 col 17 "Date : ".
* 2 s-chp-jour line 8 col 24 pic 99 to jour required.
* 2 s-chp-mois line 8 col 27 pic 99 to mois required.
* 2 s-chp-an line 8 col 30 pic 9999 to an required.
procedure division.
display ecran-couleur
display a-plg-titre
perform menu
goback.
titre.
display ecran-couleur
display a-plg-titre.
retour.
display a-plg-retour
accept s-chp-retour
evaluate choix
when 1
stop run
when 2
perform menu.
mchoix.
display s-plg-choix
accept s-chp-choix.
autrechoix.
display a-plg-autrechoix.
*menu principal
menu.
perform titre
display a-plg-menu
perform mchoix
evaluate choix
when 1
perform menuc
when 2
perform menul
when 3
perform menud
when 6
stop run
when other
perform autrechoix
end-evaluate.
*menu client
menuc.
perform titre
display a-plg-menuc
display s-plg-choix
accept choix
evaluate choix
when 1
perform menucc
when 2
perform menuac
when 3
perform menusc
when 4
perform menumc
when 5
perform menulc
when 6
perform menu
when 7
stop run
end-evaluate.
*consultation fiche client
menucc.
perform titre
display a-plg-menucc
accept s-chp-numfc
CALL 'client' using numc "x" "x" "x" "x" "x" choix.
perform retour.
*ajout d'un client
menuac.
perform titre
display a-plg-menuac
accept s-chp-numc
accept s-chp-nomc
accept s-chp-prenomc
accept s-chp-adressec
accept s-chp-villec
accept s-chp-telc
CALL 'client' using
numc nomc prenomc adressec villec telc choix.
perform retour.
*modification client
menumc.
perform titre
display a-plg-menumc
accept s-chp-nummodc
* accept s-chp-nommodc
* accept s-chp-prenommodc
* accept s-chp-adressemodc
* accept s-chp-villemodc
* accept s-chp-telmodc
CALL 'client' using numc "x" "x" "x" "x" "x" choix.
perform retour.
*suppresion client
menusc.
perform titre
display a-plg-menusc
accept s-chp-numsupc
CALL 'client' using numc "x" "x" "x" "x" "x" choix.
perform retour.
*liste client
menulc.
perform titre
display a-plg-menulc
CALL 'client' using numc "x" "x" "x" "x" "x" choix.
perform retour.
*menu location
menul.
perform titre
display a-plg-menul
display s-plg-choix
accept choix
evaluate choix
when 1
perform menufl
when 2
perform menual
when 3
perform menusl
when 4
perform menuml
when 5
perform menull
when 6
perform menu
when 7
stop run
end-evaluate.
*consultation location
menufl.
perform titre
display a-plg-menufl
perform retour.
*ajout location
menual.
perform titre
display a-plg-menual
accept s-chp-numca
accept s-chp-numa
accept s-chp-jour
accept s-chp-mois
accept s-chp-annee
accept s-chp-duree
accept s-chp-nbpers
accept s-chp-regle
string annee mois jour into datedeb
compute datedeb = function numval(datedeb)
CALL 'location' using
numc, numa, datedeb, duree, nbpers, regle, choix
perform retour.
*modification location
menuml.
perform titre
display a-plg-menusl
perform retour.
*suppresion location
menusl.
perform titre
display a-plg-menuml
perform retour.
*liste location
menull.
perform titre
display a-plg-menull
perform retour.
*disponibilité
menud.
perform titre
display a-plg-disponibilite
perform retour.
end program agence. |
Partager