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); }
public GoalAdapter(GoalAlbum Goal, Context context) { mGoalAlbum = Goal; _context = context; if (_context is CommonActivity activity) { _currentAccount = activity.userController.CurrentUser; } }
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(); }