} // Constructeur avec doubleToTimeSpan. Si supprimé, supprimer aussi DoubleToTimeSpan() public Tache(string itl, TimeSpan tmSpn, Statuts stt, string nts = null, ContrainteTemps ctrTps = null) // Constructeur avec TimeSpan { this.Intitule = itl; this.Duree = tmSpn; this.Statut = stt; this.Notes = nts; this.ContrainteTps = ctrTps; this.DateCreation = DateTime.UtcNow; // Le Thread.Sleep permet d'empêcher que deux tâches puissent être créées à la même milliseconde. System.Threading.Thread.Sleep(1); }
public virtual void MiseAJourTache(DateTime dtCrt, ContrainteTemps ctrTps) { Tache tch = this.RecupererTache(dtCrt); tch.ContrainteTps = ctrTps; }
public Tache(string itl, double dr, Statuts stt, string nts = null, ContrainteTemps ctrTps = null) : this(itl, DoubleToTimeSpan(dr), stt, nts, ctrTps) { } // Constructeur avec doubleToTimeSpan. Si supprimé, supprimer aussi DoubleToTimeSpan()