Exemplo n.º 1
0
        /// <summary>
        ///   The overloaded Load method that will return a specific <see cref="FanWorkout"/> object, with keys in <c>aFanWorkout</c>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFanWorkout">A <see cref="FanWorkout"/>.</param>
        /// <exception cref="ArgumentNullException">If <c>aFanWorkout</c> is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, FanWorkout aFanWorkout)
        {
            if (aFanWorkout == null)
            {
                throw new ArgumentNullException("Load FanWorkout Business");
            }

            if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanWorkout", AccessMode.Read))
            {
                throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Read, "FanWorkout");
            }

            FanWorkoutData.Load(aFanWorkout);
        }
Exemplo n.º 2
0
        /// <summary>
        ///   The overloaded Load method that will return a <see cref="FanWorkoutCollection"/>.
        /// </summary>
        /// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
        /// <param name="aFanWorkoutCollection">A <see cref="FanWorkoutCollection"/> object.</param>
        /// <exception cref="ArgumentNullException">If <c>aFanWorkoutCollection</c> argument is <c>null</c>.</exception>
        public static void Load(FanKey aFanKey, FanWorkoutCollection aFanWorkoutCollection)
        {
            if (aFanWorkoutCollection == null)
            {
                throw new ArgumentNullException("Load FanWorkout Business");
            }

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

            FanWorkoutData.Load(aFanWorkoutCollection);
        }