public static MvcHtmlString IfAuth(this MvcHtmlString value, int groupID) { //bool evaluation = groupid == 1 && userid == 1 ? true : false; AnonDBChecks anon = new AnonDBChecks(); bool evaluation = anon.CheckForGroup(groupID); return(evaluation ? value : MvcHtmlString.Empty); }
public static string IsAuth(this HtmlHelper html, int groupID) { string cssClass = "hidden"; AnonDBChecks anon = new AnonDBChecks(); bool evaluation = anon.CheckForGroup(groupID); return(evaluation ? String.Empty : cssClass); }