Beispiel #1
0
        private void SetGoalData()
        {
            List <Goal> temp = new List <Goal>();

            goalController.GetUpcomingRecurringGoals(userController.CurrentUser.UserName).Where(g => g.Deadline == date).ToList().ForEach(temp.Add);
            goalController.GetUpcomingNonRecurringGoals(userController.CurrentUser.UserName).Where(g => g.Deadline == date).ToList().ForEach(temp.Add);

            mGoalAlbum = new GoalAlbum(temp);
        }
Beispiel #2
0
 public GoalAdapter(GoalAlbum Goal, Context context)
 {
     mGoalAlbum = Goal;
     _context   = context;
     if (_context is CommonActivity activity)
     {
         _currentAccount = activity.userController.CurrentUser;
     }
 }
Beispiel #3
0
        public void SetGoalData()
        {
            mGoalOverdueAlbum = new GoalAlbum(goalController.GetOverdueGoals(userController.CurrentUser.UserName));
            //Temp because cant implicitly place child into parameter with type of parent (RecurringGoal -/> Goal)
            List <Goal> temp = new List <Goal>();

            goalController.GetUpcomingRecurringGoals(userController.CurrentUser.UserName).ForEach(temp.Add);
            mGoalAlbumRecurringGoal = new GoalAlbum(temp);
            temp.Clear();
            goalController.GetUpcomingNonRecurringGoals(userController.CurrentUser.UserName).ForEach(temp.Add);
            mGoalAlbumNonRecurringGoal = new GoalAlbum(temp);
            //mGoalOverdueAlbum = new GoalAlbum();
            //mGoalAlbumRecurringGoal = new GoalAlbum();
            //mGoalAlbumNonRecurringGoal = new GoalAlbum();
        }