Etablissement.cs 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Xml.Serialization;
  5. namespace CG67.FicheCollege.Domaine
  6. {
  7. // pointeurs de fonction, lasy-loading.
  8. public delegate IList<ActionEducative> dlgLoadActionEducative(string codeRNE, int annee);
  9. public delegate IList<ClasseDecouverte> dlgLoadClasseDecouverte(string codeRNE, int annee);
  10. public delegate IList<ATC> dlgLoadATC(string codeRNE);
  11. public delegate IList<ContratAide> dlgLoadContratAide(string codeRNE);
  12. public delegate IList<Bilinguisme> dlgLoadBilinguisme(string codeRNE, int annee);
  13. public delegate Commentaires dlgLoadCommentaires(string codeRNE, int annee);
  14. public delegate IList<Contact> dlgLoadContact(string codeRNE);
  15. public delegate Dotation dlgLoadDotation(string codeRNE, int annee);
  16. public delegate IList<InvestissementDCE> dlgLoadInvestissementDCE(string codeRNE, int annee);
  17. public delegate IList<Investissement> dlgLoadInvestissement(string codeRNE, int annee);
  18. public delegate IList<EffectifDetail> dlgLoadEffectifDetail(string codeRNE, int annee);
  19. public delegate MCG dlgLoadMCG(string codeRNE);
  20. public delegate IList<Canton> dlgLoadCanton(string codeRNE);
  21. public delegate Logement dlgLoadLogement(string codeRNE);
  22. // public delegate IList<ProgTravaux> dlgLoadProgTravaux(string codeRNE, int annee);
  23. public delegate IList<ProjetPilote> dlgLoadProjetPilote(string codeRNE, int annee);
  24. public delegate Restauration dlgLoadRestauration(string codeRNE, int annee);
  25. public delegate SoutienScolaireEnLigne dlgLoadSoutienScolaireEnLigne(string codeRNE, int annee);
  26. public delegate IList<FichierTravaux> dlgLoadFichiersTravaux(string codeRNE);
  27. [Serializable]
  28. public class Etablissement
  29. {
  30. #region Propriétés
  31. #region Loaders
  32. private dlgLoadActionEducative LoaderActionEducative;
  33. private dlgLoadClasseDecouverte LoaderClasseDecouverte;
  34. private dlgLoadATC LoaderATC;
  35. private dlgLoadContratAide LoaderContratAide;
  36. private dlgLoadBilinguisme LoaderBilinguisme;
  37. private dlgLoadCommentaires LoaderCommentaires;
  38. private dlgLoadContact LoaderContact;
  39. private dlgLoadDotation LoaderDotation;
  40. private dlgLoadInvestissementDCE LoaderInvestissementDCE;
  41. private dlgLoadInvestissement LoaderInvestissement;
  42. private dlgLoadEffectifDetail LoaderEffectifDetail;
  43. private dlgLoadMCG LoaderMCG;
  44. private dlgLoadCanton LoaderCanton;
  45. private dlgLoadLogement LoaderLogement;
  46. // private dlgLoadProgTravaux LoaderProgTravaux;
  47. private dlgLoadProjetPilote LoaderProjetPilote;
  48. private dlgLoadRestauration LoaderRestauration;
  49. private dlgLoadSoutienScolaireEnLigne LoaderSoutienScolaireEnLigne;
  50. private dlgLoadFichiersTravaux LoaderFichiersTravaux;
  51. #endregion
  52. /// <summary>
  53. /// Code RNE de l'établissement.
  54. /// </summary>
  55. private string mCodeRNE;
  56. /// <summary>
  57. /// annee de generation de la fiche.
  58. /// </summary>
  59. private int mAnnee;
  60. /// annee civil de l'année en cours.
  61. /// </summary>
  62. private int mAnneeCivil;
  63. private string mNom;
  64. /// <summary>
  65. /// Type de l'établissement de l'établissement.
  66. /// </summary>
  67. private string mTypeEtablissement;
  68. /// Dispositif.
  69. /// </summary>
  70. private int mDispositifEtablissement;
  71. /// <summary>
  72. /// Année de contruction de l'établissement.
  73. /// </summary>
  74. private int mAnneConstruction;
  75. /// <summary>
  76. /// Telephone de l'établissement.
  77. /// </summary>
  78. private string mTelephone;
  79. /// <summary>
  80. /// E-Mail de l'établissement.
  81. /// </summary>
  82. private string mEmail;
  83. /// <summary>
  84. /// Fax de l'établissement.
  85. /// </summary>
  86. private string mFax;
  87. /// <summary>
  88. /// Nom du propriétaire de l'établissement.
  89. /// </summary>
  90. private string mNomProprietaire;
  91. /// <summary>
  92. /// Valeur théorique ETP (Equivalent Temps Plein) de l'établissement.
  93. /// </summary>
  94. // private double mValeurETPTheorique;
  95. /// <summary>
  96. /// Montant de la réserve monétaire de l'établissement.
  97. /// </summary>
  98. // private double mReserve;
  99. /// <summary>
  100. /// IListe des actions éducatives dont l'établissement participe.
  101. /// </summary>
  102. private IList<ClasseDecouverte> mLstClasseDecouverte;
  103. /// <summary>
  104. /// IListe des actions éducatives dont l'établissement participe.
  105. /// </summary>
  106. private IList<ActionEducative> mLstActionEducatives;
  107. /// <summary>
  108. /// IListe des projets pilotes dont l'établissement participe.
  109. /// </summary>
  110. private IList<ProjetPilote> mLstProjetPilote;
  111. /// <summary>
  112. /// Dotation à l'année N de l'établissement.
  113. /// </summary>
  114. private Dotation mDotationAnneeN;
  115. /// <summary>
  116. /// Dotation à l'année N - 1 de l'établissement.
  117. /// </summary>
  118. private Dotation mDotationAnneeNmoins1;
  119. /// <summary>
  120. /// IListe des investissements de l'établissement.
  121. /// </summary>
  122. private IList<Investissement> mLstInvestissement;
  123. /// IListe des effectifs SEGPA l'établissement.
  124. /// </summary>
  125. private IList<EffectifDetail> mLstEffectifDetail;
  126. /// <summary>
  127. /// IListe du nombre d'effectif collégien sur les 10 dernières années
  128. /// </summary>
  129. private IList<Effectif> mLstEffectif;
  130. /// <summary>
  131. /// Surface d'emprise de l'établissement
  132. /// </summary>
  133. private double mSurface;
  134. /// <summary>
  135. /// IListe des années de restructuration
  136. /// </summary>
  137. private IList<int> mLstRestructuration;
  138. /// <summary>
  139. /// Principal, gesionnaire et conseiller general de l'établissement (Civilité, Nom, Prénom)
  140. /// </summary>
  141. private IList<Contact> mContacts;
  142. /// <summary>
  143. /// MCG de rattachement de l'établissement
  144. /// </summary>
  145. private MCG mMcgRattachement;
  146. /// Canton de rattachement de l'établissement
  147. /// </summary>
  148. private IList<Canton> mLstCanton;
  149. /// <summary>
  150. /// Logement de fonction
  151. /// </summary>
  152. private Logement mLogementFonction;
  153. /// <summary>
  154. /// IListe d'ATC
  155. /// </summary>
  156. private IList<ATC> mLstATC;
  157. /// <summary>
  158. /// IListe des contrats Aidés
  159. /// </summary>
  160. private IList<ContratAide> mLstContratAide;
  161. /// <summary>
  162. /// IListe des équipements
  163. /// </summary>
  164. private IList<InvestissementDCE> mLstInvestissementDCE;
  165. /// <summary>
  166. /// Le(s) secteur(s) de recrutement de l'établissement.
  167. /// </summary>
  168. private IList<EtablissementRecrutement> mLstSecteurRecrutement;
  169. /// <summary>
  170. /// Liste des fichiers de travaux
  171. /// </summary>
  172. private IList<FichierTravaux> mLstFichiersTravaux;
  173. /// <summary>
  174. /// adresse de l'établissement.
  175. /// </summary>
  176. private string mAdresse;
  177. /// <summary>
  178. /// complément de l'adresse.
  179. /// </summary>
  180. private string mComplementAdresse;
  181. /// <summary>
  182. /// ville de l'établissement.
  183. /// </summary>
  184. private string mVille;
  185. private string mCommune;
  186. private string mCanton;
  187. /// <summary>
  188. /// Nom du Canton
  189. /// </summary>
  190. /// <summary>
  191. /// Contient les commentaires utiles à différents moments de la fiche.
  192. /// </summary>
  193. private Commentaires mCommentairesGeneraux;
  194. /// <summary>
  195. /// Liste de travaux de n-1 à n+1
  196. /// </summary>
  197. // private IList<ProgTravaux> mLstTravaux;
  198. /// <summary>
  199. /// objet restauration
  200. /// </summary>
  201. private Restauration mRestaurer;
  202. /// <summary>
  203. /// objet SoutienScolaireEnligne
  204. /// </summary>
  205. private SoutienScolaireEnLigne mSoutienScolaireEnLigne;
  206. /// <summary>
  207. /// Bilinguisme
  208. /// </summary>
  209. private IList<Bilinguisme> mBilingue;
  210. /// <summary>
  211. /// Code postal du l'établissement
  212. /// </summary>
  213. private int mCodePostal;
  214. /// <summary>
  215. /// Lien vers la photo du collège.
  216. /// </summary>
  217. private string mLienPhoto;
  218. /// <summary>
  219. private string mLienFichier;
  220. /// nombre total de remplacements d'ATC
  221. /// </summary>
  222. // private int mNbrRemplacementsATC;
  223. // private int mNbrRemplacementsContratAide;
  224. private bool mIsRestautant;
  225. private bool mIsInternat;
  226. private bool mAscenseur;
  227. private int mAccessibilite;
  228. private bool mIsPrive;
  229. private int mEffectifTheorique;
  230. #endregion
  231. #region méthodes get/set
  232. /// <summary>
  233. /// Obtient ou définit le Code RNE de l'établissement.
  234. /// </summary>
  235. public string CodeRNE
  236. {
  237. get { return mCodeRNE; }
  238. set { mCodeRNE = value; }
  239. }
  240. /// <summary>
  241. /// Obtient ou définit le Nom de l'établissement.
  242. /// </summary>
  243. ///
  244. public bool IsPrive
  245. {
  246. get { return mIsPrive; }
  247. set { mIsPrive = value; }
  248. }
  249. public string Commune
  250. {
  251. get { return mCommune; }
  252. set { mCommune = value; }
  253. }
  254. public string Canton
  255. {
  256. get { return mCanton; }
  257. set { mCanton = value; }
  258. }
  259. public string Nom
  260. {
  261. //si le collège n'a pas de nom, on retourne la ville du collège (ex : collège de truchtersheim)
  262. get
  263. {
  264. if (mNom == string.Empty)
  265. return "de " + mCommune;
  266. return mNom;
  267. }
  268. set { mNom = value; }
  269. }
  270. /// <summary>
  271. /// Obtient ou définit le Type de l'établissement.
  272. /// </summary>
  273. public string TypeEtablissement
  274. {
  275. get { return mTypeEtablissement; }
  276. set { mTypeEtablissement = value; }
  277. }
  278. /// <summary>
  279. /// Dispositif de l'établissement.
  280. /// 1 - Normal; 2: REP; 3: REP+
  281. /// </summary>
  282. public int DispositifEtablissement
  283. {
  284. get { return mDispositifEtablissement; }
  285. set { mDispositifEtablissement = value; }
  286. }
  287. /// <summary>
  288. /// Obtient ou définit l'année de construction de l'établissement.
  289. /// </summary>
  290. public int AnneeConstruction
  291. {
  292. get { return mAnneConstruction; }
  293. set { mAnneConstruction = value; }
  294. }
  295. /// <summary>
  296. /// Obtient ou définit le téléphone de l'établissement.
  297. /// </summary>
  298. public string Telephone
  299. {
  300. get { return mTelephone; }
  301. set { mTelephone = value; }
  302. }
  303. /// <summary>
  304. /// Obtient ou définit l'email de l'établissement.
  305. /// </summary>
  306. public string Email
  307. {
  308. get { return mEmail; }
  309. set { mEmail = value; }
  310. }
  311. /// <summary>
  312. /// Obtient ou définit le fax de l'établissement.
  313. /// </summary>
  314. public string Fax
  315. {
  316. get { return mFax; }
  317. set { mFax = value; }
  318. }
  319. /// <summary>
  320. /// Obtient ou définit le Nom du propriétaire de l'établissement.
  321. /// </summary>
  322. public string NomProprietaire
  323. {
  324. get { return mNomProprietaire; }
  325. set { mNomProprietaire = value; }
  326. }
  327. /// <summary>
  328. /// Obtient ou définit la valeur ETP Théorique de l'établissement.
  329. /// </summary>
  330. // public double ValeurETPTheorique
  331. // {
  332. // get { return mValeurETPTheorique; }
  333. // set { mValeurETPTheorique = value; }
  334. // }
  335. /// <summary>
  336. /// Obtient ou définit la réserve monétaire de l'établissement.
  337. /// </summary>
  338. // public double Reserve
  339. // {
  340. // get { return mReserve; }
  341. // set { mReserve = value; }
  342. // }
  343. /// <summary>
  344. /// Obtient ou définit la IListe des Classes de découvertes auxquels l'établissement participe.
  345. /// </summary>
  346. public IList<ClasseDecouverte> LstClasseDecouverte
  347. {
  348. get
  349. {
  350. if (mLstClasseDecouverte == null)
  351. mLstClasseDecouverte = this.LoaderClasseDecouverte(mCodeRNE, mAnnee);
  352. return mLstClasseDecouverte;
  353. }
  354. set { mLstClasseDecouverte = value; }
  355. }
  356. /// <summary>
  357. /// Obtient ou définit la IListe des actions éducatives auxquels l'établissement participe.
  358. /// </summary>
  359. public IList<ActionEducative> LstActionEducatives
  360. {
  361. get
  362. {
  363. if (mLstActionEducatives == null)
  364. mLstActionEducatives = this.LoaderActionEducative(mCodeRNE, mAnnee);
  365. return mLstActionEducatives;
  366. }
  367. set { mLstActionEducatives = value; }
  368. }
  369. /// <summary>
  370. /// Obtient ou définit la IListe des projets pilotes auxquels l'établissement participe.
  371. /// </summary>
  372. public IList<ProjetPilote> LstProjetPilote
  373. {
  374. get
  375. {
  376. if (mLstProjetPilote == null)
  377. mLstProjetPilote = this.LoaderProjetPilote(mCodeRNE, mAnnee);
  378. return mLstProjetPilote;
  379. }
  380. set { mLstProjetPilote = value; }
  381. }
  382. /// <summary>
  383. /// Obtient ou définit la dotation à l'année N de l'établissement.
  384. /// cette valeur change à partir du mois d'octobre
  385. /// </summary>
  386. public Dotation DotationAnneeN
  387. {
  388. get
  389. {
  390. if (mDotationAnneeN == null)
  391. //mAnneeCivil = System.DateTime.Now.Year;
  392. // if (System.DateTime.Now.Month > 11)
  393. // mAnneeCivil += 1;
  394. mAnneeCivil = mAnnee + 1;
  395. mDotationAnneeN = this.LoaderDotation(mCodeRNE, mAnneeCivil);
  396. return mDotationAnneeN;
  397. }
  398. set { mDotationAnneeN = value; }
  399. }
  400. /// <summary>
  401. /// Obtient ou définit la dotation à l'année N - 1 de l'établissement.
  402. /// </summary>
  403. public Dotation DotationAnneeNmoins1
  404. {
  405. get
  406. {
  407. if (mDotationAnneeNmoins1 == null)
  408. // mAnneeCivil = System.DateTime.Now.Year;
  409. // if (System.DateTime.Now.Month > 11)
  410. // mAnneeCivil += 1;
  411. mAnneeCivil = mAnnee;
  412. mDotationAnneeNmoins1 = this.LoaderDotation(mCodeRNE, mAnneeCivil);
  413. return mDotationAnneeNmoins1;
  414. }
  415. set { mDotationAnneeNmoins1 = value; }
  416. }
  417. /// <summary>
  418. /// Obtient ou définit la IListe des investissements de l'établissement.
  419. /// </summary>
  420. public IList<Investissement> LstInvestissement
  421. {
  422. get
  423. {
  424. if (mLstInvestissement == null)
  425. mLstInvestissement = this.LoaderInvestissement(mCodeRNE, mAnnee);
  426. return mLstInvestissement;
  427. }
  428. set { mLstInvestissement = value; }
  429. }
  430. /// <summary>
  431. /// liste des effectifs de SEGPA, CLA , UPI
  432. /// </summary>
  433. public IList<EffectifDetail> LstEffectifDetail
  434. {
  435. get
  436. {
  437. if (mLstEffectifDetail == null)
  438. mLstEffectifDetail = this.LoaderEffectifDetail(mCodeRNE, mAnnee);
  439. return mLstEffectifDetail;
  440. }
  441. set { mLstEffectifDetail = value; }
  442. }
  443. /// <summary>
  444. /// Obtient ou définit la IListe du nombre d'effectif collégien sur les 10 dernières années
  445. /// </summary>
  446. public IList<Effectif> LstEffectif
  447. {
  448. get { return mLstEffectif; }
  449. set { mLstEffectif = value; }
  450. }
  451. /// <summary>
  452. /// Obtient ou définit la surface d'emprise de l'établissement
  453. /// </summary>
  454. public double Surface
  455. {
  456. get { return mSurface; }
  457. set { mSurface = value; }
  458. }
  459. /// <summary>
  460. /// Obtient ou définit le IListe des années de restructuration
  461. /// </summary>
  462. public IList<int> LstRestructuration
  463. {
  464. get { return mLstRestructuration; }
  465. set { mLstRestructuration = value; }
  466. }
  467. /// <summary>
  468. /// Obtient au définit le principal de l'établissement (Civilité, Nom, Prénom)
  469. /// </summary>
  470. public IList<Contact> Contacts
  471. {
  472. get {
  473. if (mContacts == null)
  474. mContacts = this.LoaderContact(mCodeRNE);
  475. return mContacts; }
  476. set { mContacts = value; }
  477. }
  478. /// <summary>
  479. /// Obtient ou définit la MCG re rattachement de l'établissement.
  480. /// </summary>
  481. public MCG McgRattachement
  482. {
  483. get
  484. {
  485. if (mMcgRattachement == null)
  486. mMcgRattachement = this.LoaderMCG(mCodeRNE);
  487. return mMcgRattachement;
  488. }
  489. set { mMcgRattachement = value; }
  490. }
  491. public IList<Canton> LstCanton
  492. {
  493. get
  494. {
  495. if (mLstCanton == null)
  496. mLstCanton = this.LoaderCanton(mCodeRNE);
  497. return mLstCanton;
  498. }
  499. set { mLstCanton = value; }
  500. }
  501. /// <summary>
  502. /// Obtient ou définit un objet Logement
  503. /// </summary>
  504. public Logement LogementDeFonction
  505. {
  506. get
  507. {
  508. if (mLogementFonction == null)
  509. mLogementFonction = this.LoaderLogement(mCodeRNE);
  510. return mLogementFonction;
  511. }
  512. set { mLogementFonction = value; }
  513. }
  514. /// <summary>
  515. /// Obtient ou définit la IListe d'ATC
  516. /// </summary>
  517. public IList<ATC> LstATC
  518. {
  519. get
  520. {
  521. if (mLstATC == null)
  522. mLstATC = this.LoaderATC(mCodeRNE);
  523. return mLstATC;
  524. }
  525. set { mLstATC = value; }
  526. }
  527. /// <summary>
  528. /// Obtient ou définit la IListe d'ATC
  529. /// </summary>
  530. public IList<ContratAide> LstContratAide
  531. {
  532. get
  533. {
  534. if (mLstContratAide == null)
  535. mLstContratAide = this.LoaderContratAide(mCodeRNE);
  536. return mLstContratAide;
  537. }
  538. set { mLstContratAide = value; }
  539. }
  540. /// <summary>
  541. /// Obtient ou définit la IListe des équipements obtenus.
  542. /// </summary>
  543. public IList<InvestissementDCE> LstInvestissementDCE
  544. {
  545. get
  546. {
  547. /// mAnneeCivil = mAnnee + 1;
  548. if (mLstInvestissementDCE == null)
  549. mLstInvestissementDCE = this.LoaderInvestissementDCE(mCodeRNE, mAnnee);
  550. return mLstInvestissementDCE;
  551. }
  552. set { mLstInvestissementDCE = value; }
  553. }
  554. /// <summary>
  555. /// Obtient ou définit le(s) secteur(s) de recrutement de l'établissement.
  556. /// </summary>
  557. public IList<EtablissementRecrutement> LstSecteurRecrutement
  558. {
  559. get { return mLstSecteurRecrutement; }
  560. set { mLstSecteurRecrutement = value; }
  561. }
  562. public string Adresse
  563. {
  564. get { return mAdresse; }
  565. set { mAdresse = value; }
  566. }
  567. public string ComplementAdresse
  568. {
  569. get { return mComplementAdresse; }
  570. set { mComplementAdresse = value; }
  571. }
  572. public string Ville
  573. {
  574. get { return mVille; }
  575. set { mVille = value; }
  576. }
  577. public Commentaires CommentaireGeneraux
  578. {
  579. get
  580. {
  581. if (mCommentairesGeneraux == null)
  582. mCommentairesGeneraux = this.LoaderCommentaires(mCodeRNE, mAnnee);
  583. return mCommentairesGeneraux;
  584. }
  585. set { mCommentairesGeneraux = value; }
  586. }
  587. // public IList<ProgTravaux> LstTravaux
  588. // {
  589. // get
  590. // {
  591. // if (mLstTravaux == null)
  592. // mLstTravaux = this.LoaderProgTravaux(mCodeRNE, mAnnee);
  593. // return mLstTravaux;
  594. // }
  595. // set { mLstTravaux = value; }
  596. // }
  597. public IList<FichierTravaux> LstFichiersTravaux
  598. {
  599. get
  600. {
  601. if (mLstFichiersTravaux == null)
  602. mLstFichiersTravaux = this.LoaderFichiersTravaux(mCodeRNE);
  603. return mLstFichiersTravaux;
  604. }
  605. set { mLstFichiersTravaux = value; }
  606. }
  607. public Restauration Restaurer
  608. {
  609. get
  610. {
  611. if (mRestaurer == null)
  612. mRestaurer = this.LoaderRestauration(mCodeRNE, mAnnee);
  613. return mRestaurer;
  614. }
  615. set { mRestaurer = value; }
  616. }
  617. public SoutienScolaireEnLigne SoutienScolaireLigne
  618. {
  619. get
  620. {
  621. if (mSoutienScolaireEnLigne == null)
  622. mSoutienScolaireEnLigne = this.LoaderSoutienScolaireEnLigne(mCodeRNE, mAnnee);
  623. return mSoutienScolaireEnLigne;
  624. }
  625. set { mSoutienScolaireEnLigne = value; }
  626. }
  627. public IList<Bilinguisme> LstBilingue
  628. {
  629. get
  630. {
  631. if (mBilingue == null)
  632. mBilingue = this.LoaderBilinguisme(mCodeRNE, mAnnee);
  633. return mBilingue;
  634. }
  635. set { mBilingue = value; }
  636. }
  637. public int CodePostal
  638. {
  639. get { return mCodePostal; }
  640. set { mCodePostal = value; }
  641. }
  642. public int Accessibilite
  643. {
  644. get { return mAccessibilite; }
  645. set { mAccessibilite = value; }
  646. }
  647. /// <summary>
  648. /// sera utilisé pour l'affichage sur la première page.
  649. /// </summary>
  650. public string NomCollegePourPresentation
  651. {
  652. get
  653. {
  654. if (Nom.ToString()=="Ecole Européenne de Strasbourg")
  655. { return Commune + " - " + Nom; }
  656. else
  657. { return Commune + " - Collège " + Nom; };
  658. }
  659. }
  660. public string LienPhoto
  661. {
  662. get { return mLienPhoto; }
  663. set { mLienPhoto = value; }
  664. }
  665. public string LienFichier
  666. {
  667. get { return mLienFichier; }
  668. set { mLienFichier = value; }
  669. }
  670. // public int NbrRemplacementsATC
  671. // {
  672. // get { return mNbrRemplacementsATC; }
  673. // set { mNbrRemplacementsATC = value; }
  674. // }
  675. // public int NbrRemplacementsContratAide
  676. // {
  677. // get { return mNbrRemplacementsContratAide; }
  678. // set { mNbrRemplacementsContratAide = value; }
  679. // }
  680. #endregion
  681. #region autres méthodes
  682. /// <summary>
  683. /// retourne le principal de l'établissement
  684. /// </summary>
  685. public string Principal
  686. {
  687. get
  688. {
  689. string retour = string.Empty;
  690. foreach (Contact cont in Contacts)
  691. if (cont.Fonction.ToLower() == "principal")
  692. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  693. return retour;
  694. }
  695. }
  696. public string PrincipalEmail
  697. {
  698. get
  699. {
  700. string retour = string.Empty;
  701. foreach (Contact cont in Contacts)
  702. if (cont.Fonction.ToLower() == "principal")
  703. retour = cont.Email;
  704. return retour;
  705. }
  706. }
  707. public string PrincipalAdjoint
  708. {
  709. get
  710. {
  711. string retour = string.Empty;
  712. foreach (Contact cont in Contacts)
  713. if (cont.Fonction.ToLower() == "principal adjoint")
  714. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  715. return retour;
  716. }
  717. }
  718. /// <summary>
  719. /// retourne le gestionnaire de l'établissement
  720. /// </summary>
  721. ///
  722. public string PrincipalAdjointEmail
  723. {
  724. get
  725. {
  726. string retour = string.Empty;
  727. foreach (Contact cont in Contacts)
  728. if (cont.Fonction.ToLower() == "principal adjoint")
  729. retour = cont.Email;
  730. return retour;
  731. }
  732. }
  733. public string Gestionnaire
  734. {
  735. get
  736. {
  737. string retour = string.Empty;
  738. foreach (Contact cont in Contacts)
  739. if (cont.Fonction.ToLower() == "gestionnaire")
  740. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  741. return retour;
  742. }
  743. }
  744. public string GestionnaireEmail
  745. {
  746. get
  747. {
  748. string retour = string.Empty;
  749. foreach (Contact cont in Contacts)
  750. if (cont.Fonction.ToLower() == "gestionnaire")
  751. retour = cont.Email;
  752. return retour;
  753. }
  754. }
  755. public string Gestionnaire2
  756. {
  757. get
  758. {
  759. string retour = string.Empty;
  760. foreach (Contact cont in Contacts)
  761. if (cont.Fonction.ToLower() == "gestionnaire 2")
  762. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  763. return retour;
  764. }
  765. }
  766. public string Gestionnaire2Email
  767. {
  768. get
  769. {
  770. string retour = string.Empty;
  771. foreach (Contact cont in Contacts)
  772. if (cont.Fonction.ToLower() == "gestionnaire 2")
  773. retour = cont.Email;
  774. return retour;
  775. }
  776. }
  777. /// <summary>
  778. /// retourne le conseiller general de l'établissement
  779. /// </summary>
  780. public string ConseillerGeneral
  781. {
  782. get
  783. {
  784. string retour = string.Empty;
  785. foreach (Contact cont in Contacts)
  786. if (cont.Fonction.ToLower() == "conseiller départemental")
  787. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  788. return retour;
  789. }
  790. }
  791. public string ConseillerGeneralSuppleant
  792. {
  793. get
  794. {
  795. string retour = string.Empty;
  796. foreach (Contact cont in Contacts)
  797. if (cont.Fonction.ToLower() == "suppleant")
  798. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  799. return retour;
  800. }
  801. }
  802. /// <summary>
  803. /// retourne la phrase decrivant l'effectif de l'établissement
  804. /// </summary>
  805. public string Effectif
  806. {
  807. get
  808. {
  809. int nbrElevesReel = 0;
  810. //le dernier enregistrement de cette liste est l'effectif actuel.
  811. foreach (Effectif effectif in LstEffectif)
  812. if (effectif.TypeEffectif == "R")
  813. nbrElevesReel = effectif.EffectifTotal;
  814. string retour = nbrElevesReel + " élèves";
  815. return retour;
  816. }
  817. }
  818. /// <summary>
  819. /// retourne la phrase concernant le(s) restructurations de l'établissement
  820. /// </summary>
  821. public string PhraseRestructuration
  822. {
  823. get
  824. {
  825. string retour = string.Empty;
  826. foreach (int anneeRestruct in LstRestructuration)
  827. {
  828. if (LstRestructuration.Count == 1)
  829. {
  830. retour = Convert.ToString(anneeRestruct);
  831. break;
  832. }
  833. else
  834. {
  835. if (retour == string.Empty)
  836. retour = "Plusieurs restructurations lourdes ont été effectuées, les années de celles-ci sont les suivantes : ";
  837. retour += "\n - " + anneeRestruct;
  838. }
  839. }
  840. if (retour == string.Empty)
  841. retour = "Néant";
  842. return retour;
  843. }
  844. }
  845. /// <summary>
  846. /// retourne le commentaire concernant le(s) aménagement(s) particulier(s) de l'établissement
  847. /// </summary>
  848. public string CommentaireAmenagementParticulier
  849. {
  850. get
  851. {
  852. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.AmenagementsParticuliers;
  853. }
  854. }
  855. /// <summary>
  856. /// retourne le commentaire concernant la programmation des travaux de l'établissement
  857. /// </summary>
  858. public string CommentaireProgTravaux
  859. {
  860. get
  861. {
  862. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.ProgrammationTravaux;
  863. }
  864. }
  865. /// <summary>
  866. /// retourne le commentaire concernant le secteur de recrutement de l'établissement
  867. /// </summary>
  868. public string CommentaireSecteurRecrutement
  869. {
  870. get
  871. {
  872. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.SecteurRecrutement;
  873. }
  874. }
  875. /// <summary>
  876. /// retourne le commentaire concernant le graphique d'évolution des effectifs de l'établissement
  877. /// </summary>
  878. public string CommentaireGraphique
  879. {
  880. get
  881. {
  882. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.TableauEffectif;
  883. }
  884. }
  885. /// <summary>
  886. /// retourne le commentaire concernant les prévisions d'éffectifs ATC de l'établissement
  887. /// </summary>
  888. public string CommentairePrevisionEffectifATC
  889. {
  890. get
  891. {
  892. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.PrevisionEffectifATC;
  893. }
  894. }
  895. /// <summary>
  896. /// retourne la phrase concernant la programmation des travaux de l'établissement
  897. /// </summary>
  898. //public string PhraseProgTravaux
  899. //{
  900. // get
  901. // {
  902. // string retour = string.Empty;
  903. // string type = string.Empty;
  904. // //la requete trie déja par ordre de type d'opération.
  905. // foreach (ProgTravaux prog in LstTravaux)
  906. // {
  907. // if (prog.TypeOperation == type)
  908. // {
  909. // retour += "\n\n" + prog.TypeOperation + " :";
  910. // }
  911. // retour += "\n" + prog.Annee + " : " + prog.Libelle;
  912. // type = prog.TypeOperation;
  913. // }
  914. // if (retour == string.Empty)
  915. // retour = "néant";
  916. // return retour;
  917. // }
  918. //}
  919. /// <summary>
  920. /// retourne la phrase concernant le secteur de recrutement de l'établissement
  921. /// </summary>
  922. public string PhraseSecteurRecrutement
  923. {
  924. get
  925. {
  926. string retour = string.Empty;
  927. int i=0;
  928. foreach (EtablissementRecrutement com in LstSecteurRecrutement)
  929. {
  930. if (i == 0)
  931. {
  932. retour = com.Libelle;
  933. i++;
  934. }
  935. else
  936. {
  937. retour += ", " + com.Libelle;
  938. }
  939. }
  940. if (retour == string.Empty)
  941. retour = "l'information n'est actuellement pas disponible";
  942. return retour;
  943. }
  944. }
  945. /// <summary>
  946. /// retourne la phrase concernant les prévisions sur 5 ans de l'établissement
  947. /// </summary>
  948. public string PhrasePrevision5Ans
  949. {
  950. get
  951. {
  952. int nbrActuel = 0;
  953. int nbrPrev = 0;
  954. int nbrEvolution = 0;
  955. string retour;
  956. foreach (Effectif effectif in LstEffectif)
  957. {
  958. if (effectif.TypeEffectif =="P")
  959. nbrPrev = effectif.EffectifTotal;
  960. if (effectif.TypeEffectif == "R")
  961. nbrActuel = effectif.EffectifTotal;
  962. }
  963. nbrEvolution = nbrPrev - nbrActuel;
  964. if (nbrActuel == 0)
  965. {
  966. return "calcul impossible, nbrActuelle =0";
  967. }
  968. double pourcentageEvol = (double) nbrEvolution * 100 / (double)nbrActuel;
  969. if (nbrEvolution < 0)
  970. {
  971. retour = string.Format("Diminution de {0} élèves, soit {1:##0.00}% sur les cinq prochaines années.", (nbrActuel - nbrPrev), pourcentageEvol);
  972. }
  973. else if (nbrEvolution == 0)
  974. {
  975. retour = "néant";
  976. }
  977. else
  978. {
  979. retour = string.Format("Augmentation de {0} élèves, soit +{1:##0.00}% sur les cinq prochaines années.",nbrEvolution,pourcentageEvol);
  980. }
  981. return retour;
  982. }
  983. }
  984. /// <summary>
  985. /// retourne la phrase concernant le total d'ATC de l'établissement
  986. /// </summary>
  987. // public string PhraseTotalATC
  988. // {
  989. // get
  990. // {
  991. // int nbr = 0;
  992. // foreach (ATC adjoint in LstATC)
  993. // if (adjoint.ValeurETP < 1)
  994. // nbr++;
  995. // if (nbr != 0)
  996. // //return LstATC.Count + " agents , dont " + nbr + " à temps partiel.";
  997. // return LstATC.Count + " agents.";
  998. // else
  999. // return LstATC.Count + " agents.";
  1000. // }
  1001. // }
  1002. /// <summary>
  1003. /// retourne la phrase concernant la valeur ETP totale des ATC de l'établissement
  1004. /// </summary>
  1005. // public string PhraseValeurETP
  1006. // {
  1007. // get
  1008. // {
  1009. // double valeurReel = 0;
  1010. // foreach (ATC adjoint in LstATC)
  1011. // valeurReel += adjoint.ValeurETP;
  1012. // string retour = "ETP réels : " + valeurReel + "\nEtp Barème : " + ValeurETPTheorique + "\nEcart : ";
  1013. // double ecart = valeurReel - ValeurETPTheorique;
  1014. // if (ecart >= 0)
  1015. // retour += ecart;
  1016. // else
  1017. // retour += (ecart - ecart * 2);
  1018. // return retour;
  1019. // }
  1020. // }
  1021. /// <summary>
  1022. /// retourne la phrase concernant le nombre de jours de formation des ATC de l'établissement
  1023. /// </summary>
  1024. // public string PhraseNombreJoursFormation
  1025. // {
  1026. // get
  1027. // {
  1028. // int valeur = 0;
  1029. // foreach (ATC adjoint in LstATC)
  1030. // valeur += adjoint.NbJoursFormation;
  1031. // return valeur + " jours.";
  1032. // }
  1033. // }
  1034. /// <summary>
  1035. /// retourne la phrase concernant le(s) remplacement(s) de l'établissement
  1036. /// </summary>
  1037. ///
  1038. public string PhraseRemplacements
  1039. {
  1040. get
  1041. {
  1042. // if (NbrRemplacementsATC == 0)
  1043. return "néant";
  1044. // else if (NbrRemplacementsATC == 1)
  1045. // return "Le remplacement d'un agent à été assuré";
  1046. // else
  1047. // return "Le remplacement de " + NbrRemplacementsATC + " à été assuré";
  1048. }
  1049. }
  1050. /// <summary>
  1051. /// retourne la phrase concernant le total de contrat aidé
  1052. /// </summary>
  1053. public string PhraseTotalContratAide
  1054. {
  1055. get
  1056. {
  1057. // int nbr = 0;
  1058. // foreach (ContratAide adjoint in LstContratAide)
  1059. // if (adjoint.Quotite < 1)
  1060. // nbr++;
  1061. // if (nbr != 0)
  1062. //return LstATC.Count + " agents , dont " + nbr + " à temps partiel.";
  1063. // return LstContratAide.Count + " agents.";
  1064. // else
  1065. return LstContratAide.Count + " agents.";
  1066. }
  1067. }
  1068. /// <summary>
  1069. /// retourne la phrase concernant la valeur ETP totale des ATC de l'établissement
  1070. /// </summary>
  1071. //public string PhraseValeurETPContratAide
  1072. // {
  1073. // get
  1074. // {
  1075. // double valeurReel = 0;
  1076. // foreach (ContratAide adjoint in LstContratAide)
  1077. // valeurReel += adjoint.ValeurETP;
  1078. // string retour = "ETP réels : " + valeurReel + "\nEtp Barème : " + ValeurETPTheorique + "\nEcart : ";
  1079. // double ecart = valeurReel - ValeurETPTheorique;
  1080. // if (ecart >= 0)
  1081. // retour += ecart;
  1082. // else
  1083. // retour += (ecart - ecart * 2);
  1084. // return retour;
  1085. // }
  1086. // }
  1087. /// <summary>
  1088. /// retourne la phrase concernant le nombre de jours de formation des ATC de l'établissement
  1089. /// </summary>
  1090. // public string PhraseNombreJoursFormationContratAide
  1091. // {
  1092. // get
  1093. // {
  1094. // int valeur = 0;
  1095. // foreach (ContratAide adjoint in LstContratAide)
  1096. // valeur += adjoint.NbJoursFormation;
  1097. // return valeur + " jours.";
  1098. // }
  1099. // }
  1100. /// <summary>
  1101. /// retourne la phrase concernant le(s) remplacement(s) de l'établissement
  1102. /// </summary>
  1103. // public string PhraseRemplacementsContratAide
  1104. // {
  1105. // get
  1106. // {
  1107. // if (NbrRemplacementsContratAide == 0)
  1108. // return "néant";
  1109. // else if (NbrRemplacementsContratAide == 1)
  1110. // return "Le remplacement d'un agent à été assuré";
  1111. // else
  1112. // return "Le remplacement de " + NbrRemplacementsContratAide + " à été assuré";
  1113. // }
  1114. // }
  1115. public bool IsRestaurant
  1116. {
  1117. get { return mIsRestautant; }
  1118. set { mIsRestautant = value; }
  1119. }
  1120. public bool IsInternat
  1121. {
  1122. get { return mIsInternat; }
  1123. set { mIsInternat = value; }
  1124. }
  1125. public bool Ascenseur
  1126. {
  1127. get { return mAscenseur; }
  1128. set { mAscenseur = value; }
  1129. }
  1130. public int EffectifTheorique
  1131. {
  1132. get { return mEffectifTheorique; }
  1133. set { mEffectifTheorique = value; }
  1134. }
  1135. #endregion
  1136. #region Constructeurs
  1137. /// <summary>
  1138. /// constructeur minimal d'établissement, sera utilisé au chargement de l'application.
  1139. /// </summary>
  1140. /// <param name="codeRNE"></param>
  1141. /// <param name="nom"></param>
  1142. /// <param name="ville"></param>
  1143. public Etablissement(string codeRNE, string nom, string commune)
  1144. {
  1145. this.mCodeRNE = codeRNE;
  1146. this.mNom = nom;
  1147. this.mCommune = commune;
  1148. }
  1149. public Etablissement(string codeRNE, bool isPrive, int annee, string nom, string commune, string canton, string typeEtablissement, int dispositifEtablissement, int anneeConstruction, string telephone, string email, string fax, string nomProprietaire, string adresse, string complementAdresse, int codePostal, string ville, string lienPhoto,string lienFichier,
  1150. bool isRestaurant,bool isInternat, bool ascenseur, int effectifTheorique, int accessibilite,
  1151. dlgLoadActionEducative loaderActionEducative,
  1152. dlgLoadClasseDecouverte loaderClasseDecouverte,
  1153. dlgLoadATC loaderATC,
  1154. dlgLoadContratAide loaderContratAide,
  1155. dlgLoadBilinguisme loaderBilinguisme,
  1156. dlgLoadSoutienScolaireEnLigne loaderSoutienScolaireEnLigne,
  1157. dlgLoadCommentaires loaderCommentaires,
  1158. dlgLoadContact loaderContact,
  1159. dlgLoadDotation loaderDotation,
  1160. dlgLoadInvestissementDCE loaderInvestissementDCE,
  1161. dlgLoadInvestissement loaderInvestissement,
  1162. dlgLoadEffectifDetail loaderEffectifDetail,
  1163. dlgLoadCanton loaderCanton,
  1164. dlgLoadMCG loaderMCG, dlgLoadLogement loaderLogement,
  1165. // dlgLoadProgTravaux loaderProgTravaux,
  1166. dlgLoadProjetPilote loaderProjetPilote,
  1167. dlgLoadRestauration loaderRestauration,
  1168. dlgLoadFichiersTravaux loaderFichiersTravaux)
  1169. {
  1170. this.mCodeRNE = codeRNE;
  1171. this.mIsPrive = isPrive;
  1172. this.mAnnee = annee;
  1173. this.mNom = nom;
  1174. this.mCommune = commune;
  1175. this.mCanton = canton;
  1176. this.mTypeEtablissement = typeEtablissement;
  1177. this.mDispositifEtablissement = dispositifEtablissement;
  1178. this.mAnneConstruction = anneeConstruction;
  1179. this.mTelephone = telephone;
  1180. this.mEmail = email;
  1181. this.mFax = fax;
  1182. this.mNomProprietaire = nomProprietaire;
  1183. this.mAdresse = adresse;
  1184. this.mComplementAdresse = complementAdresse;
  1185. this.mVille = ville;
  1186. this.mCodePostal = codePostal;
  1187. this.mLienFichier = lienFichier;
  1188. this.mLienPhoto = lienPhoto;
  1189. this.mIsRestautant = isRestaurant;
  1190. this.mIsInternat = isInternat;
  1191. this.mAscenseur = ascenseur;
  1192. this.mEffectifTheorique = effectifTheorique;
  1193. this.mAccessibilite = accessibilite;
  1194. this.LoaderActionEducative = loaderActionEducative;
  1195. this.LoaderClasseDecouverte = loaderClasseDecouverte;
  1196. this.LoaderATC = loaderATC;
  1197. this.LoaderContratAide = loaderContratAide;
  1198. this.LoaderBilinguisme = loaderBilinguisme;
  1199. this.LoaderSoutienScolaireEnLigne = loaderSoutienScolaireEnLigne;
  1200. this.LoaderCommentaires = loaderCommentaires;
  1201. this.LoaderContact = loaderContact;
  1202. this.LoaderDotation = loaderDotation;
  1203. this.LoaderInvestissementDCE = loaderInvestissementDCE;
  1204. this.LoaderInvestissement = loaderInvestissement;
  1205. this.LoaderEffectifDetail = loaderEffectifDetail;
  1206. this.LoaderMCG = loaderMCG;
  1207. this.LoaderCanton = loaderCanton;
  1208. this.LoaderLogement = loaderLogement;
  1209. // this.LoaderProgTravaux = loaderProgTravaux;
  1210. this.LoaderProjetPilote = loaderProjetPilote;
  1211. this.LoaderRestauration = loaderRestauration;
  1212. this.LoaderFichiersTravaux = loaderFichiersTravaux;
  1213. }
  1214. public Etablissement() { }
  1215. #endregion
  1216. }
  1217. }