Пример #1
0
 private void RefreshItemListDtsave(string id)
 {
     DataRow[] drv = itemsdt.Select("id in (" + id + ") ");
     if (drv.Length == 1)
     {
         webBrowser1.DocumentText = t.Replace("[font-size]", Fontsize.ToString()).Replace("<--!item-->", dc.QueryItem(drv[0]));
     }
 }
Пример #2
0
 private void ShowItem()
 {
     try
     {
         string html = "<h1>暂时未找到该题</h1>";
         if (itemsdt.Rows.Count > 0 && activequestionid >= 0 && activequestionid < itemsdt.Rows.Count)
         {
             html = dc.QueryItem(itemsdt.Rows[activequestionid]);
         }
         html = t.Replace("[font-size]", Fontsize.ToString()).Replace("<--!item-->", html);
         webBrowser1.DocumentText = html;
     }
     catch (System.Data.OleDb.OleDbException ole)
     {
         webBrowser1.DocumentText = "<h1>找到该题出现故障</h1><p>" + ole.Message + "</p>";;
     }
 }