Exemple #1
0
		public void ExecuteChangeReportCommand(ChoixItemIhm choixReport) {
			CollectionViewSource src = new CollectionViewSource();
			this._currentItem = choixReport;

			switch (choixReport.Code) {
				case CodesReport.InventaireSimpleEquipementExcel:
					if (this._cacheInventaireSimple == null) {
						this._cacheInventaireSimple = ServiceReportingAdapter.EquipementsToReportInventaireEquipementSimple(
							this._repoEquipement.GetAll().Where(e => !e.EstAuRebut).OrderBy(e => e.Numero).ToList()
						);
					}

					src.Source = this._cacheInventaireSimple;
					break;

				case CodesReport.InventaireCompletEquipementExcel:
					if (this._cacheInventaireComplet == null) {
						this._cacheInventaireComplet = ServiceReportingAdapter.EquipementsToReportInventaireEquipementComplet(
							this._repoEquipement.GetAll().Where(e => !e.EstAuRebut).OrderBy(e => e.Numero).ToList()
						);
					}

					src.Source = this._cacheInventaireComplet;
					break;

				case CodesReport.ListeAdherents:
					if (this._cacheListeAdherents == null) {
						this._cacheListeAdherents = ServiceReportingAdapter.InscriptionsToListeAdherents(
							this._repoInscriptions.GetAll().Where(i => i.Groupe.Saison.EstSaisonCourante).OrderBy(i => i.Adherent.ToString()).ToList()
						);
					}

					src.Source = this._cacheListeAdherents;
					break;

				case CodesReport.RepartitionAdherentsAge:
					if (this._cacheRepartitionAdherentsAge == null) {
						this._cacheRepartitionAdherentsAge = ServiceReportingAdapter.InscriptionsToReportRepartitionAdherentsAge(
							this._repoTranchesAge.GetAll().OrderBy(t => t.AgeInf).ToList(),
							this._repoInfosClub.GetFirst().Ville,
							this._repoInscriptions.GetAll().Where(i => i.Groupe.Saison.EstSaisonCourante).ToList()
						);
					}


					src.Source = this._cacheRepartitionAdherentsAge;
					break;

				default:
					src.Source = null;
					break;
			}


			this.ReportDatas = src.View;
		}
Exemple #2
0
		public void ExecuteChangeChartCommand(ChoixItemIhm choixGraph) {
			this.TitreGraph = choixGraph.ToString();

			// HACK pour contourner le problème de refresh du graph
			this.ChartKeysValues = new List<KeyValuePair<string, int>>();

			switch (choixGraph.Code) {
				case CodesGraphs.RemplissageGroupes:
					this.ChartKeysValues = this.GetRemplissageGroupes();
					break;

				case CodesGraphs.RepartitionHommesFemmes:
					this.ChartKeysValues = this.GetRepartitionHommeFemmes();
					break;

				case CodesGraphs.RepartitionMajeursMineurs:
					this.ChartKeysValues = this.GetRepartitionMajeursMineurs();
					break;

				case CodesGraphs.RepartitionResidentsExterieurs:
					this.ChartKeysValues = this.GetRepartitionResidentsExterieurs();
					break;

				case CodesGraphs.RepartitionAdherentsVilles:
					this.ChartKeysValues = this.GetRepartitionAdherentsVilles();
					break;

				default:
					this.ChartKeysValues.Clear();
					this.ChartKeysValues = null;
					break;
			}
		}
Exemple #3
0
		public bool CanExecuteChangeReportCommand(ChoixItemIhm choixReport) {
			return true;
		}
Exemple #4
0
		public bool CanExecuteChangeChartCommand(ChoixItemIhm choixGraph) {
			return true;
		}