Example #1
0
        public static bool DeleteAddressDisBL(string deleteAddressID)
        {
            bool addressDisDeleted = false;

            try
            {
                if (deleteAddressID != string.Empty)
                {
                    AddressDisDAL addressDisDAL = new AddressDisDAL();
                    addressDisDeleted = addressDisDAL.DeleteAddressDisDAL(deleteAddressID);
                }
                else
                {
                    throw new InventoryException("Invalid Address ID");
                }
            }
            catch (Exception ex)
            {
                throw new InventoryException(ex.Message);
            }



            return(addressDisDeleted);
        }
Example #2
0
        public static bool DeleteAddressDisBL(int deleteAddressID)
        {
            bool addressDisDeleted = false;

            try
            {
                if (deleteAddressID > 0)
                {
                    AddressDisDAL addressDisDAL = new AddressDisDAL();
                    addressDisDeleted = addressDisDAL.DeleteAddressDisDAL(deleteAddressID);
                }
                else
                {
                    throw new InventoryException("Invalid Address ID");
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(addressDisDeleted);
        }
Example #3
0
        public static bool AddAddressDisBL(AddressDis newAddressDis)
        {
            bool addressDisAdded = false;

            try
            {
                if (ValidateAddressDis(newAddressDis))
                {
                    AddressDisDAL addressDisDAL = new AddressDisDAL();
                    addressDisAdded = addressDisDAL.AddAddressDisDAL(newAddressDis);
                }
            }
            catch (Exception ex)
            {
                throw new InventoryException(ex.Message);
            }


            return(addressDisAdded);
        }
Example #4
0
        public static bool UpdateAddressDisBL(AddressDis updateAddressDis)
        {
            bool addressDisUpdated = false;

            try
            {
                if (ValidateAddressDis(updateAddressDis))
                {
                    AddressDisDAL addressDisDAL = new AddressDisDAL();
                    addressDisUpdated = addressDisDAL.UpdateAddressDisDAL(updateAddressDis);
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(addressDisUpdated);
        }