Пример #1
0
        public void AddHost(Host host)
        {
            if (host == null)
            {
                throw new ArgumentNullException();
            }
            //if (!(IsValidPhoneNumber(host.PhoneNumber)))
            //    throw new NotValidPhoneNumberException();

            myDal.AddHost(host);
        }
Пример #2
0
 public void AddHost(Host host)
 {
     try
     {
         if (!CheackEmailAddress(host.Email))
         {
             throw new InvalidOperationException("The email Addresss is invalid");
         }
         dal.AddHost(host);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Пример #3
0
 public void AddHost(HostBO host)
 {
     try { dal.AddHost(ConvertHostBOToDO(host)); }
     catch (DuplicateKeyException ex) { throw ex; }
 }
Пример #4
0
 public void AddHost(Host host)
 {
     xml.AddHost(host);
 }