Esempio n. 1
0
        public static bool DeleteAddesstBL(int deleteAddressID)
        {
            bool addressDeleted = false;

            try
            {
                if (deleteAddressID > 0)
                {
                    Address_DAL addressDAL = new Address_DAL();
                    addressDeleted = addressDAL.DeleteAddressDAL(deleteAddressID);
                }
                else
                {
                    throw new GreatOutdoorsException("Invalid Guest ID");
                }
            }
            catch (GreatOutdoorsException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(addressDeleted);
        }
Esempio n. 2
0
        public static Address_Entities SearchAddressBL(int searchAddressID)
        {
            Address_Entities searchAddress = null;

            try
            {
                Address_DAL addressDAL = new Address_DAL();
                searchAddress = addressDAL.SearchAddressDAL(searchAddressID);
            }
            catch (GOException ex)
            {
                throw new GOException(ex.Message);
            }
            return(searchAddress);
        }
Esempio n. 3
0
        public static List <Address_Entities> GetAllAddressBL()
        {
            List <Address_Entities> addressList = null;

            try
            {
                Address_DAL addressDAL = new Address_DAL();
                addressList = addressDAL.GetAllAddressDAL();
            }
            catch (GOException ex)
            {
                throw new GOException(ex.Message);
            }
            return(addressList);
        }
Esempio n. 4
0
        public static Address_Entities SearchAddressBL(int searchAddressID)
        {
            Address_Entities searchAddress = null;

            try
            {
                Address_DAL addressDAL = new Address_DAL();
                searchAddress = addressDAL.SearchAddressDAL(searchAddressID);
            }
            catch (GreatOutdoorsException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(searchAddress);
        }
Esempio n. 5
0
        public static List <Address_Entities> GetAllAddressBL()
        {
            List <Address_Entities> addressList = null;

            try
            {
                Address_DAL addressDAL = new Address_DAL();
                addressList = addressDAL.GetAllAddressDAL();
            }
            catch (GreatOutdoorsException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(addressList);
        }
Esempio n. 6
0
        public static bool AddAddressBL(Address_Entities newAddress)
        {
            bool AddressAdded = false;

            try
            {
                if (ValidateAddress(newAddress))
                {
                    Address_DAL addressDAL = new Address_DAL();
                    AddressAdded = addressDAL.AddAddressDAL(newAddress);
                }
            }
            catch (GOException ex)
            {
                throw new GOException(ex.Message);
            }

            return(AddressAdded);
        }
Esempio n. 7
0
        public static bool AddAddressBL(Address_Entities newAddress)
        {
            bool AddressAdded = false;

            try
            {
                if (ValidateAddress(newAddress))
                {
                    Address_DAL addressDAL = new Address_DAL();
                    AddressAdded = addressDAL.AddAddressDAL(newAddress);
                }
            }
            catch (GreatOutdoorsException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(AddressAdded);
        }
Esempio n. 8
0
        public static bool UpdateAddressBL(Address_Entities updateAddress)
        {
            bool addressUpdated = false;

            try
            {
                if (ValidateAddress(updateAddress))
                {
                    Address_DAL addressDAL = new Address_DAL();
                    addressUpdated = addressDAL.UpdateAddressDAL(updateAddress);
                }
            }
            catch (GreatOutdoorsException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(addressUpdated);
        }
Esempio n. 9
0
        public static bool DeleteAddesstBL(int deleteAddressID)
        {
            bool addressDeleted = false;

            try
            {
                if (deleteAddressID > 0)
                {
                    Address_DAL addressDAL = new Address_DAL();
                    addressDeleted = addressDAL.DeleteAddressDAL(deleteAddressID);
                }
                else
                {
                    throw new GOException("Invalid Address ID");
                }
            }
            catch (GOException)
            {
                throw;
            }

            return(addressDeleted);
        }
Esempio n. 10
0
        public static bool UpdateAddressBL(Address_Entities updateAddress)
        {
            bool addressUpdated = false;

            try
            {
                if (ValidateAddress(updateAddress))
                {
                    Address_DAL addressDAL = new Address_DAL();
                    addressUpdated = addressDAL.UpdateAddressDAL(updateAddress);
                }
                else
                {
                    throw new GOException("Invalid Address Credentials");
                }
            }
            catch (GOException ex)
            {
                throw new GOException(ex.Message);
            }

            return(addressUpdated);
        }