Exemplo n.º 1
0
        public string ToHtml()
        {
            string html = String.Empty;

            if (TableHeader == null)
            {
                return(html);
            }
            if (TableRows == null)
            {
                return(html);
            }

            // start table
            if (String.IsNullOrEmpty(CssClass))
            {
                html += "<table>";
            }
            else
            {
                html += "<table class=\"" + CssClass + "\">";
            }

            // add header
            html += TableHeader.ToHtml();


            foreach (TableRow row in TableRows)
            {
                html += row.ToHtml();
            }

            html += "</table>";

            return(html);
        }
Exemplo n.º 2
0
 public Table(TableHeader header, IList <TableRow> rows)
 {
     TableHeader = header;
     TableRows   = rows;
 }