Beispiel #1
0
        public override Boolean LoadChildObjects()
        {
            System.Data.DataTable dataTable;

            Boolean success = base.LoadChildObjects();


            if (success)
            {
                // LOAD CHILD OBJECTS

                String selectGoals = "SELECT * FROM dbo.MemberCaseCarePlanGoal WHERE MemberCaseCarePlanId = " + Id.ToString();

                dataTable = application.EnvironmentDatabase.SelectDataTable(selectGoals.ToString(), 0);

                foreach (System.Data.DataRow currentRow in dataTable.Rows)
                {
                    MemberCaseCarePlanGoal carePlanGoal = new MemberCaseCarePlanGoal(application);

                    carePlanGoal.MapDataFields(currentRow);

                    carePlanGoal.LoadChildObjects();

                    carePlanGoal.MemberCaseCarePlan = this;

                    goals.Add(carePlanGoal);
                }
            }

            return(success);
        }
Beispiel #2
0
        public MemberCaseCarePlanGoal Goal(Int64 forCarePlanGoalId)
        {
            MemberCaseCarePlanGoal goal = null;


            foreach (MemberCaseCarePlanGoal currentCarePlanGoal in Goals)
            {
                if (currentCarePlanGoal.Id == forCarePlanGoalId)
                {
                    goal = currentCarePlanGoal;

                    break;
                }
            }

            return(goal);
        }
Beispiel #3
0
        public void AddMemberCaseCarePlanGoal(MemberCaseCarePlanGoal forMemberCaseCarePlanGoal)
        {
            foreach (MemberCaseCarePlanAssessmentCareMeasureGoal currentGoal in goals)
            {
                if (currentGoal.MemberCaseCarePlanGoalId == forMemberCaseCarePlanGoal.Id)
                {
                    return;
                }
            }

            MemberCaseCarePlanAssessmentCareMeasureGoal goal = new MemberCaseCarePlanAssessmentCareMeasureGoal(application);

            goal.MemberCaseCarePlanAssessmentCareMeasureId = Id;

            goal.MemberCaseCarePlanAssessmentCareMeasure = this;

            goal.SetMemberCaseCarePlanGoal(forMemberCaseCarePlanGoal);

            goals.Add(goal);

            return;
        }
Beispiel #4
0
        public void SetMemberCaseCarePlanGoal(MemberCaseCarePlanGoal forMemberCaseCarePlanGoal)
        {
            MemberCaseCarePlanGoalId = forMemberCaseCarePlanGoal.Id;

            return;
        }