Etablissement.cs 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321
  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. public string PrincipalAdjointEmail
  719. {
  720. get
  721. {
  722. string retour = string.Empty;
  723. foreach (Contact cont in Contacts)
  724. if (cont.Fonction.ToLower() == "principal adjoint")
  725. retour = cont.Email;
  726. return retour;
  727. }
  728. }
  729. public string PrincipalAdjoint2
  730. {
  731. get
  732. {
  733. string retour = string.Empty;
  734. foreach (Contact cont in Contacts)
  735. if (cont.Fonction.ToLower() == "principal adjoint 2")
  736. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  737. return retour;
  738. }
  739. }
  740. public string PrincipalAdjoint2Email
  741. {
  742. get
  743. {
  744. string retour = string.Empty;
  745. foreach (Contact cont in Contacts)
  746. if (cont.Fonction.ToLower() == "principal adjoint 2")
  747. retour = cont.Email;
  748. return retour;
  749. }
  750. }
  751. /// <summary>
  752. /// retourne le gestionnaire de l'établissement
  753. /// </summary>
  754. public string Gestionnaire
  755. {
  756. get
  757. {
  758. string retour = string.Empty;
  759. foreach (Contact cont in Contacts)
  760. if (cont.Fonction.ToLower() == "gestionnaire")
  761. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  762. return retour;
  763. }
  764. }
  765. public string GestionnaireEmail
  766. {
  767. get
  768. {
  769. string retour = string.Empty;
  770. foreach (Contact cont in Contacts)
  771. if (cont.Fonction.ToLower() == "gestionnaire")
  772. retour = cont.Email;
  773. return retour;
  774. }
  775. }
  776. public string Gestionnaire2
  777. {
  778. get
  779. {
  780. string retour = string.Empty;
  781. foreach (Contact cont in Contacts)
  782. if (cont.Fonction.ToLower() == "gestionnaire 2")
  783. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  784. return retour;
  785. }
  786. }
  787. public string Gestionnaire2Email
  788. {
  789. get
  790. {
  791. string retour = string.Empty;
  792. foreach (Contact cont in Contacts)
  793. if (cont.Fonction.ToLower() == "gestionnaire 2")
  794. retour = cont.Email;
  795. return retour;
  796. }
  797. }
  798. /// <summary>
  799. /// retourne le conseiller general de l'établissement
  800. /// </summary>
  801. public string ConseillerGeneral
  802. {
  803. get
  804. {
  805. string retour = string.Empty;
  806. foreach (Contact cont in Contacts)
  807. if (cont.Fonction.ToLower() == "conseiller départemental")
  808. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  809. return retour;
  810. }
  811. }
  812. public string ConseillerGeneralSuppleant
  813. {
  814. get
  815. {
  816. string retour = string.Empty;
  817. foreach (Contact cont in Contacts)
  818. if (cont.Fonction.ToLower() == "suppleant")
  819. retour = cont.Civilite + " " + Utile.formatStringPrenom(cont.Prenom) + " " + cont.Nom.ToUpper();
  820. return retour;
  821. }
  822. }
  823. /// <summary>
  824. /// retourne la phrase decrivant l'effectif de l'établissement
  825. /// </summary>
  826. public string Effectif
  827. {
  828. get
  829. {
  830. int nbrElevesReel = 0;
  831. //le dernier enregistrement de cette liste est l'effectif actuel.
  832. foreach (Effectif effectif in LstEffectif)
  833. if (effectif.TypeEffectif == "R")
  834. nbrElevesReel = effectif.EffectifTotal;
  835. string retour = nbrElevesReel + " élèves";
  836. return retour;
  837. }
  838. }
  839. /// <summary>
  840. /// retourne la phrase concernant le(s) restructurations de l'établissement
  841. /// </summary>
  842. public string PhraseRestructuration
  843. {
  844. get
  845. {
  846. string retour = string.Empty;
  847. foreach (int anneeRestruct in LstRestructuration)
  848. {
  849. if (LstRestructuration.Count == 1)
  850. {
  851. retour = Convert.ToString(anneeRestruct);
  852. break;
  853. }
  854. else
  855. {
  856. if (retour == string.Empty)
  857. retour = "Plusieurs restructurations lourdes ont été effectuées, les années de celles-ci sont les suivantes : ";
  858. retour += "\n - " + anneeRestruct;
  859. }
  860. }
  861. if (retour == string.Empty)
  862. retour = "Néant";
  863. return retour;
  864. }
  865. }
  866. /// <summary>
  867. /// retourne le commentaire concernant le(s) aménagement(s) particulier(s) de l'établissement
  868. /// </summary>
  869. public string CommentaireAmenagementParticulier
  870. {
  871. get
  872. {
  873. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.AmenagementsParticuliers;
  874. }
  875. }
  876. /// <summary>
  877. /// retourne le commentaire concernant la programmation des travaux de l'établissement
  878. /// </summary>
  879. public string CommentaireProgTravaux
  880. {
  881. get
  882. {
  883. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.ProgrammationTravaux;
  884. }
  885. }
  886. /// <summary>
  887. /// retourne le commentaire concernant le secteur de recrutement de l'établissement
  888. /// </summary>
  889. public string CommentaireSecteurRecrutement
  890. {
  891. get
  892. {
  893. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.SecteurRecrutement;
  894. }
  895. }
  896. /// <summary>
  897. /// retourne le commentaire concernant le graphique d'évolution des effectifs de l'établissement
  898. /// </summary>
  899. public string CommentaireGraphique
  900. {
  901. get
  902. {
  903. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.TableauEffectif;
  904. }
  905. }
  906. /// <summary>
  907. /// retourne le commentaire concernant les prévisions d'éffectifs ATC de l'établissement
  908. /// </summary>
  909. public string CommentairePrevisionEffectifATC
  910. {
  911. get
  912. {
  913. return CommentaireGeneraux == null ? string.Empty : CommentaireGeneraux.PrevisionEffectifATC;
  914. }
  915. }
  916. /// <summary>
  917. /// retourne la phrase concernant la programmation des travaux de l'établissement
  918. /// </summary>
  919. //public string PhraseProgTravaux
  920. //{
  921. // get
  922. // {
  923. // string retour = string.Empty;
  924. // string type = string.Empty;
  925. // //la requete trie déja par ordre de type d'opération.
  926. // foreach (ProgTravaux prog in LstTravaux)
  927. // {
  928. // if (prog.TypeOperation == type)
  929. // {
  930. // retour += "\n\n" + prog.TypeOperation + " :";
  931. // }
  932. // retour += "\n" + prog.Annee + " : " + prog.Libelle;
  933. // type = prog.TypeOperation;
  934. // }
  935. // if (retour == string.Empty)
  936. // retour = "néant";
  937. // return retour;
  938. // }
  939. //}
  940. /// <summary>
  941. /// retourne la phrase concernant le secteur de recrutement de l'établissement
  942. /// </summary>
  943. public string PhraseSecteurRecrutement
  944. {
  945. get
  946. {
  947. string retour = string.Empty;
  948. int i=0;
  949. foreach (EtablissementRecrutement com in LstSecteurRecrutement)
  950. {
  951. if (i == 0)
  952. {
  953. retour = com.Libelle;
  954. i++;
  955. }
  956. else
  957. {
  958. retour += ", " + com.Libelle;
  959. }
  960. }
  961. if (retour == string.Empty)
  962. retour = "l'information n'est actuellement pas disponible";
  963. return retour;
  964. }
  965. }
  966. /// <summary>
  967. /// retourne la phrase concernant les prévisions sur 5 ans de l'établissement
  968. /// </summary>
  969. public string PhrasePrevision5Ans
  970. {
  971. get
  972. {
  973. int nbrActuel = 0;
  974. int nbrPrev = 0;
  975. int nbrEvolution = 0;
  976. string retour;
  977. foreach (Effectif effectif in LstEffectif)
  978. {
  979. if (effectif.TypeEffectif =="P")
  980. nbrPrev = effectif.EffectifTotal;
  981. if (effectif.TypeEffectif == "R")
  982. nbrActuel = effectif.EffectifTotal;
  983. }
  984. nbrEvolution = nbrPrev - nbrActuel;
  985. if (nbrActuel == 0)
  986. {
  987. return "calcul impossible, nbrActuelle =0";
  988. }
  989. double pourcentageEvol = (double) nbrEvolution * 100 / (double)nbrActuel;
  990. if (nbrEvolution < 0)
  991. {
  992. retour = string.Format("Diminution de {0} élèves, soit {1:##0.00}% sur les cinq prochaines années.", (nbrActuel - nbrPrev), pourcentageEvol);
  993. }
  994. else if (nbrEvolution == 0)
  995. {
  996. retour = "néant";
  997. }
  998. else
  999. {
  1000. retour = string.Format("Augmentation de {0} élèves, soit +{1:##0.00}% sur les cinq prochaines années.",nbrEvolution,pourcentageEvol);
  1001. }
  1002. return retour;
  1003. }
  1004. }
  1005. /// <summary>
  1006. /// retourne la phrase concernant le total d'ATC de l'établissement
  1007. /// </summary>
  1008. // public string PhraseTotalATC
  1009. // {
  1010. // get
  1011. // {
  1012. // int nbr = 0;
  1013. // foreach (ATC adjoint in LstATC)
  1014. // if (adjoint.ValeurETP < 1)
  1015. // nbr++;
  1016. // if (nbr != 0)
  1017. // //return LstATC.Count + " agents , dont " + nbr + " à temps partiel.";
  1018. // return LstATC.Count + " agents.";
  1019. // else
  1020. // return LstATC.Count + " agents.";
  1021. // }
  1022. // }
  1023. /// <summary>
  1024. /// retourne la phrase concernant la valeur ETP totale des ATC de l'établissement
  1025. /// </summary>
  1026. // public string PhraseValeurETP
  1027. // {
  1028. // get
  1029. // {
  1030. // double valeurReel = 0;
  1031. // foreach (ATC adjoint in LstATC)
  1032. // valeurReel += adjoint.ValeurETP;
  1033. // string retour = "ETP réels : " + valeurReel + "\nEtp Barème : " + ValeurETPTheorique + "\nEcart : ";
  1034. // double ecart = valeurReel - ValeurETPTheorique;
  1035. // if (ecart >= 0)
  1036. // retour += ecart;
  1037. // else
  1038. // retour += (ecart - ecart * 2);
  1039. // return retour;
  1040. // }
  1041. // }
  1042. /// <summary>
  1043. /// retourne la phrase concernant le nombre de jours de formation des ATC de l'établissement
  1044. /// </summary>
  1045. // public string PhraseNombreJoursFormation
  1046. // {
  1047. // get
  1048. // {
  1049. // int valeur = 0;
  1050. // foreach (ATC adjoint in LstATC)
  1051. // valeur += adjoint.NbJoursFormation;
  1052. // return valeur + " jours.";
  1053. // }
  1054. // }
  1055. /// <summary>
  1056. /// retourne la phrase concernant le(s) remplacement(s) de l'établissement
  1057. /// </summary>
  1058. ///
  1059. public string PhraseRemplacements
  1060. {
  1061. get
  1062. {
  1063. // if (NbrRemplacementsATC == 0)
  1064. return "néant";
  1065. // else if (NbrRemplacementsATC == 1)
  1066. // return "Le remplacement d'un agent à été assuré";
  1067. // else
  1068. // return "Le remplacement de " + NbrRemplacementsATC + " à été assuré";
  1069. }
  1070. }
  1071. /// <summary>
  1072. /// retourne la phrase concernant le total de contrat aidé
  1073. /// </summary>
  1074. public string PhraseTotalContratAide
  1075. {
  1076. get
  1077. {
  1078. // int nbr = 0;
  1079. // foreach (ContratAide adjoint in LstContratAide)
  1080. // if (adjoint.Quotite < 1)
  1081. // nbr++;
  1082. // if (nbr != 0)
  1083. //return LstATC.Count + " agents , dont " + nbr + " à temps partiel.";
  1084. // return LstContratAide.Count + " agents.";
  1085. // else
  1086. return LstContratAide.Count + " agents.";
  1087. }
  1088. }
  1089. /// <summary>
  1090. /// retourne la phrase concernant la valeur ETP totale des ATC de l'établissement
  1091. /// </summary>
  1092. //public string PhraseValeurETPContratAide
  1093. // {
  1094. // get
  1095. // {
  1096. // double valeurReel = 0;
  1097. // foreach (ContratAide adjoint in LstContratAide)
  1098. // valeurReel += adjoint.ValeurETP;
  1099. // string retour = "ETP réels : " + valeurReel + "\nEtp Barème : " + ValeurETPTheorique + "\nEcart : ";
  1100. // double ecart = valeurReel - ValeurETPTheorique;
  1101. // if (ecart >= 0)
  1102. // retour += ecart;
  1103. // else
  1104. // retour += (ecart - ecart * 2);
  1105. // return retour;
  1106. // }
  1107. // }
  1108. /// <summary>
  1109. /// retourne la phrase concernant le nombre de jours de formation des ATC de l'établissement
  1110. /// </summary>
  1111. // public string PhraseNombreJoursFormationContratAide
  1112. // {
  1113. // get
  1114. // {
  1115. // int valeur = 0;
  1116. // foreach (ContratAide adjoint in LstContratAide)
  1117. // valeur += adjoint.NbJoursFormation;
  1118. // return valeur + " jours.";
  1119. // }
  1120. // }
  1121. /// <summary>
  1122. /// retourne la phrase concernant le(s) remplacement(s) de l'établissement
  1123. /// </summary>
  1124. // public string PhraseRemplacementsContratAide
  1125. // {
  1126. // get
  1127. // {
  1128. // if (NbrRemplacementsContratAide == 0)
  1129. // return "néant";
  1130. // else if (NbrRemplacementsContratAide == 1)
  1131. // return "Le remplacement d'un agent à été assuré";
  1132. // else
  1133. // return "Le remplacement de " + NbrRemplacementsContratAide + " à été assuré";
  1134. // }
  1135. // }
  1136. public bool IsRestaurant
  1137. {
  1138. get { return mIsRestautant; }
  1139. set { mIsRestautant = value; }
  1140. }
  1141. public bool IsInternat
  1142. {
  1143. get { return mIsInternat; }
  1144. set { mIsInternat = value; }
  1145. }
  1146. public bool Ascenseur
  1147. {
  1148. get { return mAscenseur; }
  1149. set { mAscenseur = value; }
  1150. }
  1151. public int EffectifTheorique
  1152. {
  1153. get { return mEffectifTheorique; }
  1154. set { mEffectifTheorique = value; }
  1155. }
  1156. #endregion
  1157. #region Constructeurs
  1158. /// <summary>
  1159. /// constructeur minimal d'établissement, sera utilisé au chargement de l'application.
  1160. /// </summary>
  1161. /// <param name="codeRNE"></param>
  1162. /// <param name="nom"></param>
  1163. /// <param name="ville"></param>
  1164. public Etablissement(string codeRNE, string nom, string commune)
  1165. {
  1166. this.mCodeRNE = codeRNE;
  1167. this.mNom = nom;
  1168. this.mCommune = commune;
  1169. }
  1170. 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,
  1171. bool isRestaurant,bool isInternat, bool ascenseur, int effectifTheorique, int accessibilite,
  1172. dlgLoadActionEducative loaderActionEducative,
  1173. dlgLoadClasseDecouverte loaderClasseDecouverte,
  1174. dlgLoadATC loaderATC,
  1175. dlgLoadContratAide loaderContratAide,
  1176. dlgLoadBilinguisme loaderBilinguisme,
  1177. dlgLoadSoutienScolaireEnLigne loaderSoutienScolaireEnLigne,
  1178. dlgLoadCommentaires loaderCommentaires,
  1179. dlgLoadContact loaderContact,
  1180. dlgLoadDotation loaderDotation,
  1181. dlgLoadInvestissementDCE loaderInvestissementDCE,
  1182. dlgLoadInvestissement loaderInvestissement,
  1183. dlgLoadEffectifDetail loaderEffectifDetail,
  1184. dlgLoadCanton loaderCanton,
  1185. dlgLoadMCG loaderMCG, dlgLoadLogement loaderLogement,
  1186. // dlgLoadProgTravaux loaderProgTravaux,
  1187. dlgLoadProjetPilote loaderProjetPilote,
  1188. dlgLoadRestauration loaderRestauration,
  1189. dlgLoadFichiersTravaux loaderFichiersTravaux)
  1190. {
  1191. this.mCodeRNE = codeRNE;
  1192. this.mIsPrive = isPrive;
  1193. this.mAnnee = annee;
  1194. this.mNom = nom;
  1195. this.mCommune = commune;
  1196. this.mCanton = canton;
  1197. this.mTypeEtablissement = typeEtablissement;
  1198. this.mDispositifEtablissement = dispositifEtablissement;
  1199. this.mAnneConstruction = anneeConstruction;
  1200. this.mTelephone = telephone;
  1201. this.mEmail = email;
  1202. this.mFax = fax;
  1203. this.mNomProprietaire = nomProprietaire;
  1204. this.mAdresse = adresse;
  1205. this.mComplementAdresse = complementAdresse;
  1206. this.mVille = ville;
  1207. this.mCodePostal = codePostal;
  1208. this.mLienFichier = lienFichier;
  1209. this.mLienPhoto = lienPhoto;
  1210. this.mIsRestautant = isRestaurant;
  1211. this.mIsInternat = isInternat;
  1212. this.mAscenseur = ascenseur;
  1213. this.mEffectifTheorique = effectifTheorique;
  1214. this.mAccessibilite = accessibilite;
  1215. this.LoaderActionEducative = loaderActionEducative;
  1216. this.LoaderClasseDecouverte = loaderClasseDecouverte;
  1217. this.LoaderATC = loaderATC;
  1218. this.LoaderContratAide = loaderContratAide;
  1219. this.LoaderBilinguisme = loaderBilinguisme;
  1220. this.LoaderSoutienScolaireEnLigne = loaderSoutienScolaireEnLigne;
  1221. this.LoaderCommentaires = loaderCommentaires;
  1222. this.LoaderContact = loaderContact;
  1223. this.LoaderDotation = loaderDotation;
  1224. this.LoaderInvestissementDCE = loaderInvestissementDCE;
  1225. this.LoaderInvestissement = loaderInvestissement;
  1226. this.LoaderEffectifDetail = loaderEffectifDetail;
  1227. this.LoaderMCG = loaderMCG;
  1228. this.LoaderCanton = loaderCanton;
  1229. this.LoaderLogement = loaderLogement;
  1230. // this.LoaderProgTravaux = loaderProgTravaux;
  1231. this.LoaderProjetPilote = loaderProjetPilote;
  1232. this.LoaderRestauration = loaderRestauration;
  1233. this.LoaderFichiersTravaux = loaderFichiersTravaux;
  1234. }
  1235. public Etablissement() { }
  1236. #endregion
  1237. }
  1238. }