// Token: 0x060000FC RID: 252 RVA: 0x00012308 File Offset: 0x00010508
        public static string ConvertDataTableToHtmlTable(DataTable dt)
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine("<table>");
            stringBuilder.AppendLine("<tr>");
            stringBuilder.AppendFormat("\t", Array.Empty <object>());
            foreach (object obj in dt.Columns)
            {
                DataColumn dataColumn = (DataColumn)obj;
                stringBuilder.AppendFormat("<td>", Array.Empty <object>());
                stringBuilder.AppendFormat(HtmlExpress.EscapeForHtml(dataColumn.ColumnName), Array.Empty <object>());
                stringBuilder.AppendFormat("</td>", Array.Empty <object>());
            }
            stringBuilder.AppendLine();
            stringBuilder.AppendLine("</tr>");
            foreach (object obj2 in dt.Rows)
            {
                DataRow dataRow = (DataRow)obj2;
                stringBuilder.AppendFormat("<tr>", Array.Empty <object>());
                foreach (object obj3 in dt.Columns)
                {
                    DataColumn dataColumn2 = (DataColumn)obj3;
                    stringBuilder.AppendFormat("<td>", Array.Empty <object>());
                    string input = QueryExpress.ConvertToSqlFormat(dataRow[dataColumn2.ColumnName], false, false, null);
                    stringBuilder.AppendFormat(HtmlExpress.EscapeForHtml(input), Array.Empty <object>());
                    stringBuilder.AppendFormat("</td>", Array.Empty <object>());
                }
                stringBuilder.AppendLine("</tr>");
            }
            stringBuilder.AppendLine("</table>");
            return(stringBuilder.ToString());
        }
Beispiel #2
0
        // Token: 0x0600003C RID: 60 RVA: 0x00005170 File Offset: 0x00003370
        private void BindData()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine("<html><head><style>body { font-family: \"Segoe UI\", Arial; line-height: 150%; } table { border: 1px solid #5C5C5C; border-collapse: collapse; } td { font-size: 10pt; padding: 4px; border: 1px solid #5C5C5C; } </style></head>");
            stringBuilder.AppendLine("<body>");
            stringBuilder.AppendFormat(HtmlExpress.ConvertDataTableToHtmlTable(this.dt), Array.Empty <object>());
            stringBuilder.AppendLine("</body>");
            stringBuilder.AppendFormat("</html>", Array.Empty <object>());
            this.webBrowser1.DocumentText = stringBuilder.ToString();
        }
Beispiel #3
0
 void WriteTable(DataTable dt)
 {
     sb.AppendFormat(HtmlExpress.ConvertDataTableToHtmlTable(dt));
     sb.AppendLine("<br />");
 }
Beispiel #4
0
 // Token: 0x0600007B RID: 123 RVA: 0x0000A2C0 File Offset: 0x000084C0
 private void WriteTable(DataTable dt)
 {
     this.sb.AppendFormat(HtmlExpress.ConvertDataTableToHtmlTable(dt), Array.Empty <object>());
     this.sb.AppendLine("<br />");
 }