public virtual void MiseAJourTache(Tache tch, Tache newTch) { tch = this.RecupererTache(tch); tch.Intitule = newTch.Intitule; tch.Duree = newTch.Duree; tch.Statut = newTch.Statut; tch.Notes = newTch.Notes; MiseAJourTempsTotal(); }
// METHODES ========================= public virtual void AjouterTache(Tache tch) { if (!this.ContientTache(tch)) { this.ListeDeTaches.Add(tch); MiseAJourTempsTotal(); } else { throw new ListeTachesException("La tâche est déjà présente dans la liste."); } }
// METHODES ========================= public override void RetirerTache(Tache tch) { base.RetirerTache(tch); if (this.ListeProgrammes != null) { foreach (Programme prg in this.ListeProgrammes) { prg.RetirerTache(tch); prg.MiseAJourTempsTotal(); } } }
public override void MiseAJourTache(Tache tch, Tache newTch) { base.MiseAJourTache(tch, newTch); if (this.ListeProgrammes != null) { foreach (Programme prg in this.ListeProgrammes) { if (prg.ListeDeTaches.Contains(tch)) { prg.MiseAJourTempsTotal(); } } } }
public virtual void MiseAJourTache(DateTime dtCrt, ContrainteTemps ctrTps) { Tache tch = this.RecupererTache(dtCrt); tch.ContrainteTps = ctrTps; }
public virtual void SupprimerTache(Tache tch) { tch.Dispose(); MiseAJourTempsTotal(); }
public virtual void RetirerTache(Tache tch) { this.ListeDeTaches.Remove(tch); MiseAJourTempsTotal(); }
public virtual Tache RecupererTache(Tache tch) { return(this.ListeDeTaches.FirstOrDefault(t => t.ComparerId(tch))); }
public virtual bool ContientTache(Tache tch) { return(RecupererTache(tch) != null); }