예제 #1
0
        private static GoalController _instance = null; //Singleton pattern

        public static GoalController Instance()         //Lazy Load initiation
        {
            if (_instance == null)
            {
                _instance = new GoalController();
            }
            return(_instance);
        }
예제 #2
0
        public decimal GetGoalAmount(String username, String password)
        {
            List <GoalDB> returningValue = (List <GoalDB>)GoalController.Instance().ParseOneUserGoal(username, password);

            if (returningValue.Count > 0)
            {
                return(returningValue[0].goalAmount);
            }
            else
            {
                return(0m);
            }
        }
예제 #3
0
 public int TimeLeftUntilGoal(String username, String password)
 {
     return(GoalController.Instance().GetMonthCountUntilGoalIsReachedOneUser(username, password));
 }
예제 #4
0
 public int TimeLeftUntilGoal()
 {
     return(GoalController.Instance().GetMonthCountUntilGoalIsReached());
 }
예제 #5
0
        public decimal GetGoalAmount()
        {
            List <GoalDB> returningValue = (List <GoalDB>)GoalController.Instance().ParseGoal();

            return(returningValue[0].goalAmount);
        }