AccordionTreeExtensions.cs 1.1 KB

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Web.Mvc;
  6. namespace Bowin.Web.Controls.Mvc
  7. {
  8. public static class AccordionTreeExtensions
  9. {
  10. public static MvcHtmlString AccordionTree(this HtmlHelper htmlHelper,
  11. List<AccordionTreeDataItem> DataItemList,
  12. AccordionTreeOptions accordiontreeOptions=null ,
  13. System.Collections.Generic.IDictionary<string, string> htmlAttributes = null)
  14. {
  15. return MvcHtmlString.Create(Bowin.Web.Controls.Mvc.AccordionTree.CreateControl(htmlHelper, DataItemList, accordiontreeOptions, htmlAttributes).Render());
  16. }
  17. public static MvcHtmlString Tree(this HtmlHelper htmlHelper,
  18. TreeOptions treeOptions = null,
  19. System.Collections.Generic.IDictionary<string, string> htmlAttributes = null)
  20. {
  21. if (treeOptions == null)
  22. {
  23. treeOptions = new TreeOptions();
  24. }
  25. return MvcHtmlString.Create(Bowin.Web.Controls.Mvc.Tree.CreateControl(htmlHelper, treeOptions, htmlAttributes).Render());
  26. }
  27. }
  28. }