예제 #1
0
        /// <summary>
        /// Rhett Allen
        /// Created Date: 4/7/16
        /// Adds a single nutrient to a plant
        /// </summary>
        /// <param name="nutrientID">Nutrient ID of nutrient to be added</param>
        /// <param name="plantID">Plant ID of plant the nutrient is added to</param>
        /// <returns>True if the nutrient was added successfully</returns>
        public bool AddNutrientToPlant(int nutrientID, int?plantID)
        {
            bool added = false;

            try
            {
                added = NutrientAccessor.InsertPlantNutrients(nutrientID, plantID);
            }
            catch (Exception)
            {
                throw new ApplicationException("Nutrient could not be added to plant");
            }

            return(added);
        }