コード例 #1
0
        /**
         * Record the milestone BinaryAnswer for the given milestone ID and then remove it from the unanswered milestones list.
         */
        public void AddOrUpdateMilestoneHistory(int milestoneID, BinaryAnswer answer)
        {
            MilestoneDatabaseAccess milestoneDatabaseAccess = new MilestoneDatabaseAccess();

            milestoneDatabaseAccess.InitializeSync();
            Milestone milestone = milestoneDatabaseAccess.GetMilestoneByIdSync(milestoneID);

            MilestoneHistory.UpdateOrInsertToMilestoneHistory(milestone, answer);
            Boolean milestoneRemoved = UnansweredMilestones.RemoveMilestone(milestone);
        }
コード例 #2
0
        /**
         * Return list of due milestones based on child age and questions answered.
         **/
        public List <Milestone> GetListOfDueMilestones(int childAgeInMonths)
        {
            List <int> dueMilestoneIds = UnansweredMilestones.GetDueMilestones(childAgeInMonths);

            if (dueMilestoneIds != null && dueMilestoneIds.Count > 0)
            {
                return(GetMilestonesByIds(dueMilestoneIds));
            }
            else
            {
                return(null);
            }
        }