Ejemplo n.º 1
0
        public static bool DeleteSpecificationBL(int deleteSpecificationID)
        {
            bool specificationDeleted = false;
            try
            {
                if (deleteSpecificationID > 0)
                {
                    Specification_DAL specificationDAL = new Specification_DAL();
                    specificationDeleted = specificationDAL.DeleteSpecificationDAL(deleteSpecificationID);
                }
                else
                {
                    throw new GreatOutdoorsException("Invalid Specification ID");
                }
            }
            catch (GreatOutdoorsException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return specificationDeleted;
        }
Ejemplo n.º 2
0
        public static Specification SearchSpecificationBL(int searchSpecificationID)
        {
            Specification searchSpecification = null;

            try
            {
                Specification_DAL specificationDAL = new Specification_DAL();
                searchSpecification = specificationDAL.SearchSpecificationDAL(searchSpecificationID);
            }
            catch (GOException ex)
            {
                throw ex;
            }
            return(searchSpecification);
        }
Ejemplo n.º 3
0
 public static List<Specification> GetAllSpecificationsBL()
 {
     List<Specification> specificationList = null;
     try
     {
         Specification_DAL specificationDAL = new Specification_DAL();
         specificationList = specificationDAL.GetAllSpecificationsDAL();
     }
     catch (GreatOutdoorsException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return specificationList;
 }
Ejemplo n.º 4
0
        public static bool UpdateSpecificationBL(Specification updateSpecification)
        {
            bool specificationUpdated = false;

            try
            {
                if (ValidateSpecification(updateSpecification))
                {
                    Specification_DAL specificationDAL = new Specification_DAL();
                    specificationUpdated = specificationDAL.UpdateSpecificationDAL(updateSpecification);
                }
            }
            catch (GOException)
            {
                throw;
            }


            return(specificationUpdated);
        }
Ejemplo n.º 5
0
        public static bool AddSpecificationBL(Specification newSpecification)
        {
            bool specificationAdded = false;
            try
            {
                if (ValidateSpecification(newSpecification))
                {
                    Specification_DAL specificationDAL = new Specification_DAL();
                    specificationAdded = specificationDAL.AddSpecificationDAL(newSpecification);
                }
            }
            catch (GreatOutdoorsException)
            {
                throw;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return specificationAdded;
        }
Ejemplo n.º 6
0
        public static bool DeleteSpecificationBL(int deleteSpecificationID)
        {
            bool specificationDeleted = false;

            try
            {
                if (deleteSpecificationID > 0)
                {
                    Specification_DAL specificationDAL = new Specification_DAL();
                    specificationDeleted = specificationDAL.DeleteSpecificationDAL(deleteSpecificationID);
                }
                else
                {
                    throw new GOException("Invalid Specification ID");
                }
            }
            catch (GOException)
            {
                throw;
            }

            return(specificationDeleted);
        }