Beispiel #1
0
        //validate and call delete
        public override bool DeleteRawMaterialBL(string deleteRawMaterialID)
        {
            bool rawMaterialDeleted = false;

            try
            {
                if (deleteRawMaterialID.Length > 0 && deleteRawMaterialID.Length < 6)
                {
                    RawMaterialDAL rawMaterialDAL = new RawMaterialDAL();
                    rawMaterialDeleted = rawMaterialDAL.DeleteRawMaterialDAL(deleteRawMaterialID);
                }
                else
                {
                    throw new InventoryException("Invalid Raw Material ID");
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (SystemException ex)
            {
                throw ex;
            }
            return(rawMaterialDeleted);
        }
        public static bool DeleteRawMaterialBL(int deleteRawMaterialID)
        {
            bool rawMaterialDeleted = false;

            try
            {
                if (deleteRawMaterialID > 0 && deleteRawMaterialID < 99999)
                {
                    RawMaterialDAL rawMaterialDAL = new RawMaterialDAL();
                    rawMaterialDeleted = rawMaterialDAL.DeleteRawMaterialDAL(deleteRawMaterialID);
                }
                else
                {
                    throw new InventoryException("Invalid Raw Material ID");
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            return(rawMaterialDeleted);
        }