예제 #1
0
        public static bool DeleteProductBL(string deleteProductID)
        {
            bool productDeleted = false;

            try
            {
                if (deleteProductID.Length > 0 && deleteProductID.Length < 5)
                {
                    ProductDAL productDAL = new ProductDAL();
                    productDeleted = productDAL.DeleteProductDAL(deleteProductID);
                }
                else
                {
                    throw new InventoryException("Invalid Product ID");
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (SystemException ex)
            {
                throw ex;
            }
            return(productDeleted);
        }
예제 #2
0
        public static bool DeleteProductBL(int deleteProductID)
        {
            bool productDeleted = false;

            try
            {
                if (deleteProductID > 0)
                {
                    ProductDAL productDAL = new ProductDAL();
                    productDeleted = productDAL.DeleteProductDAL(deleteProductID);
                }
                else
                {
                    throw new GOException("Invalid Product ID");
                }
            }
            catch (GOException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(productDeleted);
        }
예제 #3
0
        public bool DeleteProductBL(int productID)
        {
            bool productDeleted = false;

            try
            {
                if (productID > 0)
                {
                    ProductDAL productDAL = new ProductDAL();
                    productDeleted = productDAL.DeleteProductDAL(productID);
                }
                else
                {
                    throw new GreatOutdoorsException("Invalid ID");
                }
            }
            catch (GreatOutdoorsException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(productDeleted);
        }