/// <summary>
 /// Returns a URL for the target of a given Site Marker (adx_sitemarker), by site marker name.
 /// </summary>
 /// <param name="html">Extension method target, provides support for HTML rendering and access to view context/data.</param>
 /// <param name="siteMarkerName">The name of the site marker to retrieve.</param>
 /// <param name="queryStringParameters">Query string parameter values that will be appended to the URL.</param>
 /// <param name="requireTargetReadAccess">
 /// Whether the target of the named site marker should be tested for security read access. This is false by default, but if
 /// set to true, and the current user does not have read access to the target entity, this method will return null.
 /// </param>
 /// <returns>
 /// Returns a URL for the target of a given site marker. Returns an empty string if a target for <paramref name="siteMarkerName"/>
 /// is not found. If <paramref name="requireTargetReadAccess"/> is set to true, and the current user does not have read access to
 /// the target entity, returns null.
 /// </returns>
 public static string SiteMarkerUrl(this HtmlHelper html, string siteMarkerName, object queryStringParameters, bool requireTargetReadAccess = false)
 {
     return(SiteMarkerUrl(html, siteMarkerName, PortalExtensions.AnonymousObjectToQueryStringParameters(queryStringParameters), requireTargetReadAccess));
 }
 /// <summary>
 /// Returns a URL for the target of a given Site Marker (adx_sitemarker).
 /// </summary>
 /// <param name="html">Extension method target, provides support for HTML rendering and access to view context/data.</param>
 /// <param name="target">The <see cref="ISiteMarkerTarget"/> whose URL will be returned.</param>
 /// <param name="queryStringParameters">Query string parameter values that will be appended to the URL.</param>
 /// <returns>
 /// Returns a URL for a <paramref name="target"/>. Returns null if <paramref name="target"/> is null.
 /// is not found.
 /// </returns>
 public static string SiteMarkerUrl(this HtmlHelper html, ISiteMarkerTarget target, object queryStringParameters)
 {
     return(SiteMarkerUrl(html, target, PortalExtensions.AnonymousObjectToQueryStringParameters(queryStringParameters)));
 }
 /// <summary>
 /// Renders a link the target of a given Site Marker (adx_sitemarker), by site marker name.
 /// </summary>
 /// <param name="html">Extension method target, provides support for HTML rendering and access to view context/data.</param>
 /// <param name="siteMarkerName">The name of the site marker to retrieve.</param>
 /// <param name="queryStringParameters">Query string parameter values that will be appended to the link URL.</param>
 /// <param name="htmlAttributes">HTML attributes that will be added to the link tag.</param>
 /// <param name="linkText">The text of the link.</param>
 /// <param name="requireTargetReadAccess">
 /// Whether the target of the named site marker should be tested for security read access. This is false by default, but if
 /// set to true, and the current user does not have read access to the target entity, this method will return null.
 /// </param>
 /// <returns>
 /// Returns an HTML A tag linking to the target of a given site marker. Returns an empty string if a target for
 /// <paramref name="siteMarkerName"/> is not found. If <paramref name="requireTargetReadAccess"/> is set to true, and the current user
 /// does not have read access to the target entity, returns an empty string.
 /// </returns>
 public static IHtmlString SiteMarkerLink(this HtmlHelper html, string siteMarkerName, object queryStringParameters, object htmlAttributes, string linkText = null, bool requireTargetReadAccess = false)
 {
     return(SiteMarkerLink(html, siteMarkerName, PortalExtensions.AnonymousObjectToQueryStringParameters(queryStringParameters), htmlAttributes, linkText, requireTargetReadAccess));
 }
Пример #4
0
 /// <summary>
 /// Return a URL for a given entity.
 /// </summary>
 /// <param name="html">Extension method target, provides support for HTML rendering and access to view context/data.</param>
 /// <param name="entity">The <see cref="IPortalViewEntity"/> whose URL will be returned.</param>
 /// <param name="queryStringParameters">Query string parameter values that will be appended to the link URL.</param>
 /// <returns>
 /// Returns a URL for the given entity. Returns a null if <paramref name="entity"/> is null, or <paramref name="entity"/> does not have
 /// a URL.
 /// </returns>
 public static string EntityUrl(this HtmlHelper html, IPortalViewEntity entity, object queryStringParameters)
 {
     return(EntityUrl(html, entity, PortalExtensions.AnonymousObjectToQueryStringParameters(queryStringParameters)));
 }
Пример #5
0
 /// <summary>
 /// Return a URL for a given entity.
 /// </summary>
 /// <param name="html">Extension method target, provides support for HTML rendering and access to view context/data.</param>
 /// <param name="serviceContext">
 /// The <see cref="OrganizationServiceContext"/> to which <paramref name="entity"/> is attached, and which will be used to load
 /// any additional data required to render the attribute (e.g., performing security assertions).
 /// </param>
 /// <param name="entity">The <see cref="Microsoft.Xrm.Sdk.Entity"/> whose URL will be returned.</param>
 /// <param name="queryStringParameters">Query string parameter values that will be appended to the link URL.</param>
 /// <returns>
 /// Returns a URL for the given entity. Returns a null if <paramref name="entity"/> is null, or <paramref name="entity"/> does not have
 /// a URL.
 /// </returns>
 public static string EntityUrl(this HtmlHelper html, OrganizationServiceContext serviceContext, Entity entity, object queryStringParameters)
 {
     return(EntityUrl(html, serviceContext, entity, PortalExtensions.AnonymousObjectToQueryStringParameters(queryStringParameters)));
 }
Пример #6
0
 /// <summary>
 /// Renders a link to a given entity.
 /// </summary>
 /// <param name="html">Extension method target, provides support for HTML rendering and access to view context/data.</param>
 /// <param name="entity">The <see cref="IPortalViewEntity"/> for which a link will be rendered.</param>
 /// <param name="linkText">The text of the link.</param>
 /// <param name="queryStringParameters">Query string parameter values that will be appended to the link URL.</param>
 /// <param name="htmlAttributes">HTML attributes that will be added to the link tag.</param>
 /// <returns>
 /// Returns an HTML A tag linking to the given entity. Returns an empty string if <paramref name="entity"/> is null.
 /// </returns>
 public static IHtmlString EntityLink(this HtmlHelper html, IPortalViewEntity entity, string linkText, object queryStringParameters, IDictionary <string, object> htmlAttributes)
 {
     return(EntityLink(html, entity, linkText, PortalExtensions.AnonymousObjectToQueryStringParameters(queryStringParameters), htmlAttributes));
 }
Пример #7
0
 /// <summary>
 /// Renders a link to the current portal context entity.
 /// </summary>
 /// <param name="html">Extension method target, provides support for HTML rendering and access to view context/data.</param>
 /// <param name="linkText">The text of the link.</param>
 /// <param name="queryStringParameters">Query string parameter values that will be appended to the link URL.</param>
 /// <param name="htmlAttributes">HTML attributes that will be added to the link tag.</param>
 /// <returns>
 /// Returns an HTML A tag linking to the current portal context entity.
 /// </returns>
 public static IHtmlString EntityLink(this HtmlHelper html, string linkText, object queryStringParameters, object htmlAttributes)
 {
     return(EntityLink(html, linkText, PortalExtensions.AnonymousObjectToQueryStringParameters(queryStringParameters), htmlAttributes));
 }