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
| PROCEDURE Fen_emplacement(gpallee,gpzone,gCodeallee,gpidallee,gpmode="C")
remplirtableaucodetarif()
remplirlistetarif()
HLitRecherchePremier(Emplacement,cleemplacement,[gMysalle:IDSalle,gpidallee,gpzone])
HModifie(Bloc)
SI HTrouve(Emplacement) ALORS
// FichierVersEcran("",Emplacement)
HLitRecherchePremier(Bloc,IDEmplacement,Emplacement.IDEmplacement)
Info("emplacement"+Emplacement.IDEmplacement)
TANTQUE HTrouve(Bloc)
HLitRecherchePremier(CodeTarif,CodeTarif,Bloc.CodeBloc)
TableAjouteLigne(TABLE_Bloc,Bloc.CodeBloc,Bloc.LibelleBloc,Bloc.CodeTarif,Bloc.Quantité,Bloc.longueur,Bloc.IDBloc)
HLitSuivant(Bloc)
FIN
SINON
HRAZ(Emplacement)
FIN
FichierVersEcran()
SEL_TYPEemplacement=1
INT_AvecGestion=1
SAI_Allee=gpidallee
SAI_Code_Allée=gCodeallee
SAI_Emplacement=gpzone
SAI_NomEmplacement=gMysalle:CodeSalle+"_"+SAI_Code_Allée+"_"+SAI_Emplacement
SAI_IDSalle=gMysalle:IDSalle
SAI_Code_local=gMysalle:CodeSalle
SAI_Libelle=gMysalle:libelle
LIB_site_etage="( "+gmyetage:CodeEtage+" Site "+gMysite:NomSite+" )"
SI _EVE.wParam=32 ALORS
_EVE.Retour=False
FIN
SAI_Quantité_maxi=TABLE_Bloc.COL_Quantité[ligneTotal]
SAI_Quantité_maxi=TABLE_Bloc.COL_Quantité[ligneTotal]
SI COL_IDTarif=0 ET COL_CodeBloc<>"" ALORS
Info("Vous devez saisir un code tarif")
RepriseSaisie(COL_IDTarif)
FIN
MoiMême=Remplace(COL_CodeBloc," ","")
SI COL_IDTarif..Valeur=0 ALORS
HRAZ(CodeTarif)
SI Ouvre(FEN_Fiche_Code_Tarif) ALORS
scodetarif est une chaîne=CodeTarif.CodeTarif
remplirtableaucodetarif()
remplirlistetarif()
MoiMême=scodetarif
FIN
FIN
SI TABLE_Bloc..Occurrence>15 ALORS
Info("nombre de box maximun est de 15")
RepriseSaisie(TABLE_Bloc)
FIN
SI SAI_Surface_totale=0 ALORS
Erreur("Vous devez saisir la surface totale de l'emplacement")
RepriseSaisie(SAI_Surface_totale)
FIN
//Emplacement.IDSalle=gMysalle:IDSalle
//EcranVersFichier()
//Emplacement.Quantité_maxi=SAI_Quantité_maxi
//Emplacement.surface_totale=SAI_Surface_totale
//Emplacement.nbBox=TABLE_Bloc..Occurrence
//SI Emplacement..NouvelEnregistrement ALORS
// HAjoute(Emplacement)
//SINON
// HModifie(Emplacement)
//FIN
//HRAZ(Bloc)
//POUR TOUTE LIGNE DE TABLE_Bloc
// HLitRecherchePremier(Bloc,IDBloc,TABLE_Bloc.col_idbloc)
// si pas htrouve(Bloc) alors
// Bloc.IDEmplacement=Emplacement.IDEmplacement
// Bloc.Quantité=TABLE_Bloc.COL_Quantité
// Bloc.CodeTarif=TABLE_Bloc.COL_IDTarif
// Bloc.longueur=TABLE_Bloc.COL_Longueur
// Bloc.CodeBloc=TABLE_Bloc.COL_CodeBloc
// bloc.LibelleBloc=TABLE_Bloc.COl_libelle
// HAjoute(Bloc)
// sinon
// Bloc.Quantité=TABLE_Bloc.COL_Quantité
// Bloc.CodeTarif=TABLE_Bloc.COL_IDTarif
// Bloc.longueur=TABLE_Bloc.COL_Longueur
// Bloc.CodeBloc=TABLE_Bloc.COL_CodeBloc
// Bloc.LibelleBloc=TABLE_Bloc.COl_libelle
// HModifie(Bloc)
// fin
//FIN
Ferme("",Emplacement.IDEmplacement)
Ferme("",0)
SI OuiNon(Non,"Voulez-vous supprimer ce box ?") ALORS
TableSupprime(TABLE_Bloc)
SI ErreurDétectée ALORS
Info("erreur de suppression de la table memoire")
SINON
Info("suppression bien effectuee dans la table memoire")
SI HSupprime(Bloc) ALORS
Info("suppression bien effectuee dans la base de donnee")
ExécuteTraitement(TABLE_Bloc,trtSortieLigne)
SINON
Info("erreur de suppression dans la base de donnee")
Info(HErreurInfo())
FIN
FIN
FIN
EcranVersFichier(Fen_emplacement,Bloc) |
Partager