public static XElement ToXML(this Nanny N)
        {//converts nanny to xelement
            switchTo B   = new switchTo();
            XElement res = new XElement("Nanny",
                                        new XElement("id", N.NannyId),
                                        new XElement("FirstName", N.NannyFirstName),
                                        new XElement("LastName", N.NannyLastName),
                                        new XElement("PhoneNumber", N.NannyPhoneNumber),
                                        new XElement("Address", N.NannyAddress),
                                        new XElement("DateOfBirth", N.NannyDateOfBirth),
                                        new XElement("Floor", N.NannyFloor),
                                        new XElement("Elevator", N.NannyHaveElevator),
                                        new XElement("MaxAgeOfKid", N.NannyMaxAgeOfKid_InMonth),
                                        new XElement("MaxNumberOfKids", N.NannyMaxNumberOfKids),
                                        new XElement("MinAgeOfKid", N.NannyMinAgeOfKid_InMonth),
                                        new XElement("Experience", N.NannyNumberOfExperience),
                                        new XElement("PaymentPerHour", N.NannyPaymentPerHour),
                                        new XElement("AllowsPaymentByHour", N.NannyAllowsPaymentByHour),
                                        new XElement("PaymentPermonth", N.NannyPaymentPermonth),
                                        new XElement("Vaction", N.NannyVactionByMEducation),
                                        new XElement("StartTime", B.whichDoubleTimeToString(N.NannyIsWorkingOnDay, N.NannyTimeIsWorkingOnDay, 0)),
                                        new XElement("EndTime", B.whichDoubleTimeToString(N.NannyIsWorkingOnDay, N.NannyTimeIsWorkingOnDay, 1)),
                                        new XElement("Days", B.whichBoolTimeToString(N.NannyIsWorkingOnDay)),
                                        new XElement("Recommendations", (from item in N.NannyRecommendations
                                                                         select new XElement("Recommendations", item))));



            return(res);
        }
        public static XElement ToXML(this Mother M)
        {//converts mother to xelement
            switchTo B   = new switchTo();
            XElement res = new XElement("Mother",
                                        new XElement("id", M.MotherId),
                                        new XElement("FirstName", M.MotherFirstName),
                                        new XElement("LastName", M.MotherLastName),
                                        new XElement("PhoneNumber", M.MotherPhoneNumber),
                                        new XElement("Address", M.MotherAddress),
                                        new XElement("Area", M.MotherNannyInArea),
                                        new XElement("Notes", M.MotherNotes),
                                        new XElement("StartTime", B.whichDoubleTimeToString(M.MotherNeedsNanny, M.MotherTimeNeedsNanny, 0)),
                                        new XElement("EndTime", B.whichDoubleTimeToString(M.MotherNeedsNanny, M.MotherTimeNeedsNanny, 1)),
                                        new XElement("Days", B.whichBoolTimeToString(M.MotherNeedsNanny)));

            return(res);
        }