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
|
clCdeCliDet est une Classe
hérite de clObjetBO
PUBLIC
mIdCdeCliDet is int
mIdCdeCliEnt is int
mIdArtCli is int
mDelai is Date
mQte is int
mPtCons is string
mCommentaire is string
mPrix is numeric
mStatut is int
mTypePrix is int
mTypeBesoin is int
mPrixModifie is boolean
mQteCde is int
mEtat is int
mNoVI is string
mRangVI is string
mNoEchange is string
mRangEchange is string
mLigne is string
mDateEngagement is Date
mCodeTeinte is string
mNoRAN is string
mITTransport is string
mDateHeureDep is DateTime
mDateHeureArr is DateTime
mDateHeureSyncro is string
mIdProd is string
mVIN is string
mRoutageUM is string
mEtatEditionUC is int
mEtatEditionUM is int
mHeureEngagement is Time
mEDI is boolean
mAnnotation is string
mIdTeinte is int
mIdOfEnt is int
mCdeCliEnt is clCdeCliEnt
mArtCli is clArtCli
mOfEnt is clOFEnt
mTeinte is clTeinte
mDelaiAn is int
mDelaiSem is int
mDossierPrimaire is string
mIdDossierPrimaire is int
mLivrerBL is boolean
mQtePlannifie is int
mIdEtiqUc is int
mIdEtiqUm is int
CONSTANT
cstStatutFerme=1
cstStatutPrevisionnel=2
FIN
FIN
Procedure RecupererCdeCliDetParPeriode(LOCAL vlDelaiDeb is Date, LOCAL vlDelaiFin is Date)
vlQuery is string
vlSQL is Data Source
vlCdeCliDet is clCdeCliDet
vlListeCdeCliDet is dynamic array of 0 clCdeCliDet
vlQuery="SELECT CDD.IDCDECLIDET"+CR+...
",CDD.IDCDECLIENT"+CR+...
",CCE.NUMCDE"+CR+...
",CL.IDCLIENT"+CR+...
",CL.RAISONSOCIALE"+CR+...
",CL.CPTTTC"+CR+...
",CCE.IDCLIPTDECH"+CR+...
",CPD.GARE"+CR+...
"from CDECLIDET CDD"+CR+...
"inner join CDECLIENT CCE on CDD.IDCDECLIENT=CCE.IDCDECLIENT"+CR+...
"inner join CLIENT CL on CCE.IDCLIENT=CL.IDCLIENT"+CR+...
"inner join CLIPTDECH CPD on CCE.IDCLIPTDECH=CPD.IDCLIPTDECH"+CR+...
"where CDD.DELAI BETWEEN '"+vlDelaiDeb+"' AND '"+vlDelaiFin+"'"
HExecuteSQLQuery(vlSQL,:mConnexion,hQueryWithoutCorrection,vlQuery)
IF HError()
ExceptionPropagate()
ELSE
HReadFirst(vlSQL,hNoRefresh)
IF HOut(vlSQL) THEN
RESULT(Null)
ELSE
WHILE NOT HOut(vlSQL)
//Gare
vlCdeCliDet:mCdeCliEnt:mCliPtDech:mIdCliPtDech=vlSQL.IDCLIPTDECH
vlCdeCliDet:mCdeCliEnt:mCliPtDech:mGare=vlSQL.GARE
//Client
vlCdeCliDet:mCdeCliEnt:mClient:mIdClient=vlSQL.IDCLIENT
vlCdeCliDet:mCdeCliEnt:mClient:mRaisonSociale=vlSQL.RAISONSOCIALE
vlCdeCliDet:mCdeCliEnt:mClient:mCptTTC=vlSQL.CPTTTC
//CdeCliEnt
vlCdeCliDet:mCdeCliEnt:mIdCdeCliEnt=vlSQL.IDCDECLIENT
vlCdeCliDet:mCdeCliEnt:mNumCde=vlSQL.NUMCDE
ArrayAdd(vlListeCdeCliDet,vlCdeCliDet)
HReadNext(vlSQL)
END
END
END
RESULT(vlListeCdeCliDet) |
Partager