Exemplo n.º 1
0
		public FormulaireDureeDeVieVM() {
			this._repoDureeDeVie = new Repository<DureeDeVie>(this._context);
			this.UCParentCode = CodesUC.ConsultationDureesDeVie;
			this.IsEditMode = false;
			this.CurrentDureeDeVie = new DureeDeVie();
		}
Exemplo n.º 2
0
		/// <summary>
		/// Constructeur pour le mode édition
		/// </summary>
		/// <param name="idDureeDeVie">ID de l'objet à éditer</param>
		public FormulaireDureeDeVieVM(Guid idDureeDeVie) {
			this._repoDureeDeVie = new Repository<DureeDeVie>(this._context);
			this.UCParentCode = CodesUC.ConsultationDureesDeVie;
			this.IsEditMode = true;
			this.CurrentDureeDeVie = this._repoDureeDeVie.GetByKey(idDureeDeVie);
		}
		public FormulaireDureeDeVieUC(DureeDeVie dureeDeVie) {
			InitializeComponent();
			this.DataContext = new FormulaireDureeDeVieVM(dureeDeVie.ID);
		}