Beispiel #1
0
        /// <summary>
        ///   Update a <see cref="Exercise"/> object passed as an argument.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aExercise">A <see cref="Exercise"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aExercise</c> argument is <c>null</c>.</exception>
        public static void Update(FanKey aFanKey, Exercise aExercise)
        {
            if (aExercise == null)
            {
                throw new ArgumentNullException("Update Exercise Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Exercise", AccessMode.Update))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.ExercisenKey), AccessMode.Update, "Exercise");
            //}

            ExerciseData.Update(aExercise);
        }
Beispiel #2
0
        /// <summary>
        ///   The overloaded Load method that will return a <see cref="ExerciseCollection"/>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aExerciseCollection">A <see cref="ExerciseCollection"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aExerciseCollection</c> argument is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, ExerciseCollection aExerciseCollection)
        {
            if (aExerciseCollection == null)
            {
                throw new ArgumentNullException("Load Exercise Business");
            }

            //if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Exercise", AccessMode.List))
            //{
            //    throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.ExercisenKey), AccessMode.List, "Exercise");
            //}

            ExerciseData.Load(aExerciseCollection);
        }