Example #1
0
        public Mother GetMother(int id)
        {
            DAL_XML_Imp a = new DAL_XML_Imp();

            return(a.GetMother(id));
            //return DataSource.MotherList.FirstOrDefault(n => n.ID == id);
        }
Example #2
0
        public void AddMother(Mother mother)
        {
            DAL_XML_Imp a   = new DAL_XML_Imp();
            Mother      mom = a.GetMother(mother.ID);

            if (mom != null)
            {
                throw new Exception("Mother with the same id already exists...");
            }
            a.AddMother(mother);
            //Mother mom = GetMother(mother.ID);
            //if (mom != null)
            //    throw new Exception("Mother with the same id already exists...");
            //DataSource.MotherList.Add(mother);
        }