Advertisement
yambroskin

Untitled

May 11th, 2017
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. // EleWise.ELMA.BPM.Web.Common.Extensions.HtmlExtensions
  2. public static MvcHtmlString EventHistory([NotNull] this HtmlHelper html, [NotNull] IEntity<long> entity, bool inTab = false, string divPanelId = null, List<string> disableButtons = null, bool asyncLoading = true, List<string> hideButtons = null)
  3. {
  4.     if (html == null)
  5.     {
  6.         throw new ArgumentNullException("html");
  7.     }
  8.     if (entity == null)
  9.     {
  10.         throw new ArgumentNullException("entity");
  11.     }
  12.     Guid objectUid = InterfaceActivator.UID(entity.CastAsRealType<IEntity<long>>().GetType(), true);
  13.     return html.Partial("EntityHistoryPanel", new EntityHistoryPanelViewModel
  14.     {
  15.         ObjectUid = objectUid,
  16.         DivId = ((!string.IsNullOrEmpty(divPanelId)) ? divPanelId : string.Format("eh_{0}_{1}", TagBuilder.CreateSanitizedId(entity.Implementation().GetType().FullName), entity.Id)),
  17.         InTab = inTab,
  18.         Entity = entity,
  19.         DisableButtons = disableButtons,
  20.         AsyncLoading = asyncLoading,
  21.         HideButtons = hideButtons
  22.     });
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement