本文整理汇总了C#中FanKey类的典型用法代码示例。如果您正苦于以下问题:C# FanKey类的具体用法?C# FanKey怎么用?C# FanKey使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FanKey类属于命名空间,在下文中一共展示了FanKey类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetAccess
/// <summary>
/// Gets a specific access for a user.
/// </summary>
/// <param name="aFanKey">A user key composite.</param>
/// <param name="aFunction">A function.</param>
/// <returns></returns>
public static Access GetAccess(FanKey aFanKey, string aFunction)
{
FanFunctionAccess vFanFunctionAccess = new FanFunctionAccess() { FannKey = aFanKey.FannKey };
vFanFunctionAccess.FunctionAccess.Function = aFunction;
Load(vFanFunctionAccess);
return vFanFunctionAccess.FunctionAccess.Access;
}
示例2: AddFan
/// <summary>
/// The <c>AddFan</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Fan"/> object.
/// It invokes the <c>Insert</c> method of <see cref="FanBusiness"/> with the newly deserialized <see cref="Fan"/> object.
/// Finally, it returns the inserted object (now with an assigned Fan Key) as a serialized <see cref="string"/> of XML.
/// </summary>
/// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
/// <returns><see cref="Fan"/> as XML <see cref="string"/>.</returns>
/// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
public static string AddFan(FanKey aFanKey, string aXmlArgument)
{
if (aXmlArgument == null)
{
throw new ArgumentNullException("aXmlArgument of AddFan");
}
Fan vFan = new Fan();
vFan = XmlUtils.Deserialize<Fan>(aXmlArgument);
FanBusiness.Insert(aFanKey, vFan);
return XmlUtils.Serialize<Fan>(vFan, true);
}
示例3: AddExercise
/// <summary>
/// The <c>AddExercise</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Exercise"/> object.
/// It invokes the <c>Insert</c> method of <see cref="ExerciseBusiness"/> with the newly deserialized <see cref="Exercise"/> object.
/// Finally, it returns the inserted object (now with an assigned Exercise Key) as a serialized <see cref="string"/> of XML.
/// </summary>
/// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
/// <returns><see cref="Exercise"/> as XML <see cref="string"/>.</returns>
/// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
public static string AddExercise(FanKey aFanKey, string aXmlArgument)
{
if (aXmlArgument == null)
{
throw new ArgumentNullException("aXmlArgument of AddExercise");
}
Exercise vExercise = new Exercise();
vExercise = XmlUtils.Deserialize<Exercise>(aXmlArgument);
ExerciseBusiness.Insert(aFanKey, vExercise);
return XmlUtils.Serialize<Exercise>(vExercise, true);
}
示例4: AddRole
/// <summary>
/// The <c>AddRole</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Role"/> object.
/// It invokes the <c>Insert</c> method of <see cref="RoleBusiness"/> with the newly deserialized <see cref="Role"/> object.
/// Finally, it returns the inserted object (now with an assigned Role Key) as a serialized <see cref="string"/> of XML.
/// </summary>
/// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
/// <returns><see cref="Role"/> as XML <see cref="string"/>.</returns>
/// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
public static string AddRole(FanKey aFanKey, string aXmlArgument)
{
if (aXmlArgument == null)
{
throw new ArgumentNullException("aXmlArgument of AddRole");
}
Role vRole = new Role();
vRole = XmlUtils.Deserialize<Role>(aXmlArgument);
RoleBusiness.Insert(aFanKey, vRole);
return XmlUtils.Serialize<Role>(vRole, true);
}
示例5: AddCell
/// <summary>
/// The <c>AddCell</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Cell"/> object.
/// It invokes the <c>Insert</c> method of <see cref="CellBusiness"/> with the newly deserialized <see cref="Cell"/> object.
/// Finally, it returns the inserted object (now with an assigned Cell Key) as a serialized <see cref="string"/> of XML.
/// </summary>
/// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
/// <returns><see cref="Cell"/> as XML <see cref="string"/>.</returns>
/// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
public static string AddCell(FanKey aFanKey, string aXmlArgument)
{
if (aXmlArgument == null)
{
throw new ArgumentNullException("aXmlArgument of AddCell");
}
Cell vCell = new Cell();
vCell = XmlUtils.Deserialize<Cell>(aXmlArgument);
CellBusiness.Insert(aFanKey, vCell);
return XmlUtils.Serialize<Cell>(vCell, true);
}
示例6: AddActivity
/// <summary>
/// The <c>AddActivity</c> implementation method deserializes an incoming XML Argument <see cref="string"/> as a new <see cref="Activity"/> object.
/// It invokes the <c>Insert</c> method of <see cref="ActivityBusiness"/> with the newly deserialized <see cref="Activity"/> object.
/// Finally, it returns the inserted object (now with an assigned Activity Key) as a serialized <see cref="string"/> of XML.
/// </summary>
/// <param name="aXmlArgument">XML Argument <see cref="string"/>.</param>
/// <returns><see cref="Activity"/> as XML <see cref="string"/>.</returns>
/// <exception cref="ArgumentNullException">If <c>aXmlArgument</c> is <c>null</c>.</exception>
public static string AddActivity(FanKey aFanKey, string aXmlArgument)
{
if (aXmlArgument == null)
{
throw new ArgumentNullException("aXmlArgument of AddActivity");
}
Activity vActivity = new Activity();
vActivity = XmlUtils.Deserialize<Activity>(aXmlArgument);
ActivityBusiness.Insert(aFanKey, vActivity);
return XmlUtils.Serialize<Activity>(vActivity, true);
}
示例7: Delete
/// <summary>
/// Delete a <see cref="Fed"/> object passed as an argument.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
/// <param name="aFed">A <see cref="Fed"/> object.</param>
/// <exception cref="ArgumentNullException">If <c>aFed</c> argument is <c>null</c>.</exception>
public static void Delete(FanKey aFanKey, Fed aFed)
{
if (aFed == null)
{
throw new ArgumentNullException("Delete Fed Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Fed", AccessMode.Delete))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FednKey), AccessMode.Delete, "Fed");
//}
FedData.Delete(aFed);
}
示例8: Insert
/// <summary>
/// Insert a <see cref="FanSession"/> object passed as an argument via Stored Procedure that returns the newly inserted <i>FanSession Key</i>.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
/// <param name="aFanSession">A <see cref="FanSession"/> object.</param>
/// <exception cref="ArgumentNullException">If <c>aFanSession</c> argument is <c>null</c>.</exception>
public static void Insert(FanKey aFanKey, FanSession aFanSession)
{
if (aFanSession == null)
{
throw new ArgumentNullException("Insert FanSession Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanSession", AccessMode.Create))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Create, "FanSession");
//}
aFanSession.FanSessionDateDone = DateTime.Now.ToLongDateString();
FanSessionData.Insert(aFanSession);
}
示例9: Delete
/// <summary>
/// Delete a <see cref="FanSession"/> object passed as an argument.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
/// <param name="aFanSession">A <see cref="FanSession"/> object.</param>
/// <exception cref="ArgumentNullException">If <c>aFanSession</c> argument is <c>null</c>.</exception>
public static void Delete(FanKey aFanKey, FanSession aFanSession)
{
if (aFanSession == null)
{
throw new ArgumentNullException("Delete FanSession Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanSession", AccessMode.Delete))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FanSessionnKey), AccessMode.Delete, "FanSession");
//}
FanSessionData.Delete(aFanSession);
}
示例10: Save
/// <summary>
/// Save a <see cref="FanFed" /> list passed as an argument.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey" /> object.</param>
/// <param name="aFanFedCollection">A fan fed collection.</param>
/// <exception cref="Zephry.ZpAccessException">Access Denied; FanFed</exception>
/// <exception cref="ArgumentNullException">If <c>aFanFed</c> argument is <c>null</c>.</exception>
public static void Save(FanKey aFanKey, FanFedCollection aFanFedCollection)
{
if (aFanFedCollection == null)
{
throw new ArgumentNullException("Update FanFedCollection Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanFed", AccessMode.Update))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Update, "FanFed");
//}
FanFedData.Save(aFanFedCollection);
}
示例11: Delete
/// <summary>
/// Delete a <see cref="FanRole"/> object passed as an argument.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
/// <param name="aFanRole">A <see cref="FanRole"/> object.</param>
/// <exception cref="ArgumentNullException">If <c>aFanRole</c> argument is <c>null</c>.</exception>
public static void Delete(FanKey aFanKey, FanRole aFanRole)
{
if (aFanRole == null)
{
throw new ArgumentNullException("Delete FanRole Business");
}
if (!FanFunctionAccessData.HasModeAccess(aFanKey, "FanRole", AccessMode.Delete))
{
throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Delete, "FanRole");
}
FanRoleData.Delete(aFanRole);
}
示例12: Load
/// <summary>
/// The overloaded Load method that will return a specific <see cref="Exercise"/> object, with keys in <c>aExercise</c>.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
/// <param name="aExercise">A <see cref="Exercise"/>.</param>
/// <exception cref="ArgumentNullException">If <c>aExercise</c> is <c>null</c>.</exception>
public static void Load(FanKey aFanKey, Exercise aExercise)
{
if (aExercise == null)
{
throw new ArgumentNullException("Load Exercise Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Exercise", AccessMode.Read))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.ExercisenKey), AccessMode.Read, "Exercise");
//}
ExerciseData.Load(aExercise);
}
示例13: Insert
/// <summary>
/// Insert a <see cref="Exercise"/> object passed as an argument via Stored Procedure that returns the newly inserted <i>Exercise Key</i>.
/// </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 Insert(FanKey aFanKey, Exercise aExercise)
{
if (aExercise == null)
{
throw new ArgumentNullException("Insert Exercise Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Exercise", AccessMode.Create))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Create, "Exercise");
//}
ExerciseData.Insert(aExercise);
}
示例14: Load
/// <summary>
/// The overloaded Load method that will return a specific <see cref="Activity"/> object, with keys in <c>aActivity</c>.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
/// <param name="aActivity">A <see cref="Activity"/>.</param>
/// <exception cref="ArgumentNullException">If <c>aActivity</c> is <c>null</c>.</exception>
public static void Load(FanKey aFanKey, Activity aActivity)
{
if (aActivity == null)
{
throw new ArgumentNullException("Load Activity Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Activity", AccessMode.Read))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.ActivitynKey), AccessMode.Read, "Activity");
//}
ActivityData.Load(aActivity);
}
示例15: Insert
/// <summary>
/// Insert a <see cref="Activity"/> object passed as an argument via Stored Procedure that returns the newly inserted <i>Activity Key</i>.
/// </summary>
/// <param name="aFanKey">A <see cref="FanKey"/> object.</param>
/// <param name="aActivity">A <see cref="Activity"/> object.</param>
/// <exception cref="ArgumentNullException">If <c>aActivity</c> argument is <c>null</c>.</exception>
public static void Insert(FanKey aFanKey, Activity aActivity)
{
if (aActivity == null)
{
throw new ArgumentNullException("Insert Activity Business");
}
//if (!FanFunctionAccessData.HasModeAccess(aFanKey, "Activity", AccessMode.Create))
//{
// throw new ZpAccessException("Access Denied", String.Format("{0}", aFanKey.FannKey), AccessMode.Create, "Activity");
//}
ActivityData.Insert(aActivity);
}