Exemple #1
0
        public void DeleteTester(int TesterID)  
        {
            XElement TesterElement;
            TesterElement = (from p in TesterRoot.Elements()
                           where Convert.ToInt32(p.Element("TesterID").Value) == TesterID
                           select p).FirstOrDefault();
            if (TesterElement == null)
                throw new Exception("The dish dos'nt exsist in the system");
            TesterElement.Remove();
            TesterRoot.Save(TesterPath);

        }
Exemple #2
0
        public void deleteTester(Tester o)
        {
            XElement TesterElement;

            TesterElement = (from p in TesterRoot.Elements()
                             where Convert.ToInt32(p.Element("Identify address").Value) == o.id
                             select p).FirstOrDefault();
            if (TesterElement == null)
            {
                throw new Exception("The Tester doesn't exsist in the system");
            }
            TesterElement.Remove();
            TesterRoot.Save(TesterPath);
        }