Beispiel #1
0
        private void AddEditRiskManagementPlans(Student student)
        {
            RiskManagementPlanData riskManagementPlanData = new RiskManagementPlanData(dbc);

            foreach (RiskManagementPlan rmp in student.RiskManagementPlans)
            {
                if (rmp.StudentRiskManagementPlanId == 0)
                {
                    riskManagementPlanData.Add(rmp, student.PersonId);
                }
                else
                {
                    riskManagementPlanData.Update(rmp);
                }
            }

            foreach (object obj in student.RemovedObjects)
            {
                if (obj is RiskManagementPlan)
                {
                    riskManagementPlanData.Remove(((RiskManagementPlan)obj).StudentRiskManagementPlanId);
                }
            }
        }
Beispiel #2
0
        public StudentRiskManagementAddEdit(Student student, DBCommand dbc) : base(student, dbc)
        {
            RiskManagementPlanData riskManagementPlanData = new RiskManagementPlanData(dbc);

            foreach (RiskManagementPlan rmp in student.RiskManagementPlans)
            {
                if (rmp.StudentRiskManagementId == 0)
                {
                    riskManagementPlanData.Add(rmp, student.PersonId);
                }
                else
                {
                    riskManagementPlanData.Update(rmp);
                }
            }

            foreach (object obj in student.RemovedObjects)
            {
                if (obj is RiskManagementPlan)
                {
                    riskManagementPlanData.Remove(((RiskManagementPlan)obj).StudentRiskManagementId);
                }
            }
        }