Ejemplo n.º 1
0
        public IEnumerable <Challenges> GetMyChallenges()
        {
            IEnumerable <Challenges> myChallenges = _challengeService.BuildChallengeTable();

            int completeCount = 0;

            foreach (Challenges challenges in myChallenges)
            {
                if (challenges.Completed)
                {
                    completeCount++;
                }
            }
            ViewBag.Percent = Math.Round(100f * ((float)completeCount / (float)myChallenges.Count()));

            return(myChallenges);
        }
Ejemplo n.º 2
0
 public IEnumerable <Challenges> BuildChallengeTable()
 {
     return(_dao.BuildChallengeTable());
 }