public static bool AddRawMaterialBL(RawMaterial newRawMaterial)
        {
            bool rawMaterialAdded = false;

            try
            {
                if (ValidateRawMaterial(newRawMaterial))
                {
                    RawMaterialDAL rawMaterialDAL = new RawMaterialDAL();
                    rawMaterialAdded = rawMaterialDAL.AddRawMaterialDAL(newRawMaterial);
                }
                else
                {
                    throw new InventoryException("Invalid Raw Material Detail");
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            return(rawMaterialAdded);
        }
Esempio n. 2
0
        //validate raw material details before calling add
        public override bool AddRawMaterialBL(RawMaterial newRawMaterial)
        {
            bool rawMaterialAdded = false;

            try
            {
                if (ValidateRawMaterial(newRawMaterial))
                {
                    RawMaterialDAL rawMaterialDAL = new RawMaterialDAL();
                    rawMaterialAdded = rawMaterialDAL.AddRawMaterialDAL(newRawMaterial);
                }
            }
            catch (InventoryException)
            {
                throw;
            }
            catch (SystemException ex)
            {
                throw ex;
            }

            return(rawMaterialAdded);
        }