예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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());
        }