/// <summary> /// The overloaded Load method that will return a specific <see cref="FanRole"/> object, with keys in <c>aFanRole</c>. /// </summary> /// <param name="aFanKey">A <see cref="FanKey"/> object.</param> /// <param name="aFanRole">A <see cref="FanRole"/>.</param> /// <exception cref="ArgumentNullException">If <c>aFanRole</c> is <c>null</c>.</exception> public static void Load(FanKey aFanKey, FanRole aFanRole) { if (aFanRole == null) { throw new ArgumentNullException("Load FanRole Business"); } if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanRole", AccessMode.Read)) { throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Read, "FanRole"); } FanRoleData.Load(aFanRole); }
/// <summary> /// The overloaded Load method that will return a <see cref="FanRoleCollection"/>. /// </summary> /// <param name="aUserKey">A <see cref="UserKey"/> object.</param> /// <param name="aFanRoleCollection">A <see cref="FanRoleCollection"/> object.</param> /// <exception cref="ArgumentNullException">If <c>aFanRoleCollection</c> argument is <c>null</c>.</exception> public static void Load(UserKey aUserKey, FanRoleCollection aFanRoleCollection) { if (aFanRoleCollection == null) { throw new ArgumentNullException("Load FanRole Business"); } if (!UserFunctionAccessData.HasModeAccess(aUserKey, "FanRole", AccessMode.List)) { throw new ZpAccessException("Access Denied", String.Format("{0}", aUserKey.UsrKey), AccessMode.List, "FanRole"); } FanRoleData.Load(aFanRoleCollection); }