public override void ExecuteDeleteCommand() {
			if (this.SelectedModele != null) {
				this._repoMain.Delete(this.SelectedModele);
				this._repoMain.Save();
				this.PopulateModeles();
				this.SelectedModele = this.Modeles.FirstOrDefault();

				this.ShowUserNotification(ResModeles.InfoModeleSupprime);
			}
		}
示例#2
0
		public FormulaireModeleVM() {
			this._repoModele = new Repository<Modele>(this._context);
			this._repoCategories = new Repository<Categorie>(this._context);
			this._repoMarques = new Repository<Marque>(this._context);

			this.CurrentModele = new Modele();
			this.UCParentCode = CodesUC.ConsultationModeles;
			this.PopulateCombo();

			Messenger.Default.Register<NMRefreshDatas>(this, m => this.PopulateCombo());
		}
		public override void ExecuteShowDetailsCommand(object selectedItem) {
			if (selectedItem is Modele) {
				this.SelectedModele = selectedItem as Modele;
			}
		}