Ejemplo n.º 1
0
        public async void insertSelectedGoal(SelectedGoal selectedGoal)
        {
            //Debug.WriteLine("###############  insert goal: "+selectedGoal.toString());

            await selectedGoalDatabase.InsertSelectedGoal(selectedGoal);

            //Debug.WriteLine("###############  after insert goal");

            //Close(this);
        }
Ejemplo n.º 2
0
        public async void insertSampleSelectedGoalsToDbForTesting()
        {
            clearSelectedGoalDb();
            Debug.WriteLine("###############  insert sample diary");

            Goal goal = goalDatabase.GetTheFirstGoal(); //this works

            if (goal == null)
            {
                //in case of empty goalDb
                goal = new Goal(0, "Sample Title", "Desc", "Cat");
            }
            SelectedGoal newSGoal = new SelectedGoal(goal);

            SelectedGoals.Add(newSGoal);

            foreach (var selectedGoal in SelectedGoals)
            {
                await selectedGoalDatabase.InsertSelectedGoal(selectedGoal);
            }
            Close(this);
        }