public static bool isComplete(int id) { tities DB = new tities(); Tache tache = DB.Tache.Find(id); if (tache.date_fin != null) { return(true); } return(false); }
public static bool isComplete(int id) { tities db = new tities(); Exigence exigence = db.Exigence.Find(id); foreach (Tache tache in exigence.Tache) { if (!TachesController.isComplete(tache.id)) { return(false); } } return(true); }
public static bool isComplete(int id) { tities db = new tities(); Jalon jalon = db.Jalon.Find(id); foreach (Tache tache in jalon.Tache) { if (!TachesController.isComplete(tache.id)) { return(false); } } return(true); }
public static string Progress(int id) { tities db = new tities(); Projet projet = db.Projet.Find(id); int completion = 0; int total = projet.Jalon.Count; foreach (Jalon jalon in projet.Jalon) { if (TachesController.isComplete(jalon.id)) { completion++; } } if (completion == 0) { return("0"); } completion = (completion / total * 100); return(completion.ToString()); }