コード例 #1
0
 protected virtual void BuildContent(IContentWidget content, IHtmlNode html)
 {
     if (content.Template != null)
     {
         content.Template.Apply(content.Model, html);
     }
     else if (content.Controls.Any())
     {
         content.Controls.Each(c =>
         {
             new LiteralNode(c.ToHtml()).AppendTo(html);
         });
     }
 }
コード例 #2
0
ファイル: SearchHtmlBuilder.cs プロジェクト: ym1100/AceSaaS
        protected override void BuildContent(IContentWidget content, IHtmlNode html)
        {
            IHtmlNode html2 = new HtmlNode("div").AddClass("fl").AppendTo(html);

            base.BuildContent(content, html2);
            if (base.Component.Button.HasValue && base.Component.Button.Value)
            {
                base.Component.Ace.Button().Text("查询").IconCls("fa fa-search")
                .Css("ml5")
                .Click("AX.gridSrh('#" + base.Component.For + "','#" + base.Component.Id + "')")
                .AppendTo(html2);
                base.Component.Ace.Button().Text("清空").IconCls("fa fa-remove")
                .Click("AX.gridClr('#" + base.Component.For + "','#" + base.Component.Id + "')")
                .AppendTo(html2);
            }
            if (base.Component.Tools.Any())
            {
                IHtmlNode right = new HtmlNode("div").AddClass("fr").AppendTo(html);
                base.Component.Tools.Each(delegate(IHtmlContent tool)
                {
                    new LiteralNode(tool.ToHtml()).AppendTo(right);
                });
            }
        }