Example #1
0
        /// <summary>
        /// add Child to the Data Source
        /// </summary>
        /// <param name="myChild"></param>
        public void AddChild(Child myChild)
        {
            if (FindChild(myChild.Id) != null)
            {
                throw new Exception("Child already exist");
            }

            Mother myMother = FindMother(myChild.MotherId);

            myChild.LastName = myMother.LastName;
            myXML.AddChild(myChild);
        }