Esempio n. 1
0
 public string CreateCharts()
 {
     HyOperationlog HyOperationlog = new HyOperationlog();
     DataTable dt = new DataTable();
     string test = "";
     dt = HyOperationlog.GetDataTableSystem("", "");
     string strXML = "";
     strXML += "<graph caption='系统情况分析' showNames='1' showValues='1' baseFontSize='12' xAxisName='统计类型' yAxisName='完成数' decimalPrecision='0' formatNumberScale='0'>";
     string[] strArrayColors = new string[3] { "AFD8F8", "F6BD0F", "8BBA00" };
     if (dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             strXML += "<set name='" + dt.Rows[i]["hyOperationType"].ToString() + "记录数' value='" + dt.Rows[i]["totalCount"].ToString() + "' color='" + strArrayColors[i] + "' showValues='0' />";
         }
     }
     else
     {
         strXML += "<set name='新增记录数' value='" + "" + "' color='AFD8F8'  />";
         strXML += "<set name='修改记录数' value='" + "" + "' color='F6BD0F' />";
         strXML += "<set name='删除记录数' value='" + "" + "' color='8BBA00' />";
     }
     strXML += "</graph>";
     return FusionCharts.RenderChartHTML("FusionCharts/FCF_Column3D.swf", "ChartId", strXML, "myNext", "500", "400", false);
 }
Esempio n. 2
0
 private void getData()
 {
     this.lb_show.Text = " <tr height=\"22\" onmouseover=\"this.className='tr_over'\" onmouseout=\"this.className='tr_out'\" class=\"tr_out\">";
     HyOperationlog HyOperationlog = new HyOperationlog();
     DataTable dt = new DataTable();
     int artTotal = 0;
     dt = HyOperationlog.GetDataTableSystem(this.operateTime_s.Value, this.operateTime_e.Value);
     if (dt.Rows.Count > 0)
     {
         for (int i = 0; i < dt.Rows.Count; i++)
         {
             this.lb_show.Text += "<td align=\"center\" >" + dt.Rows[i]["totalCount"].ToString() + "</td> ";
             artTotal += Convert.ToInt32(dt.Rows[i]["totalCount"].ToString());
         }
         this.lb_show.Text += "<td align=\"center\" >" + artTotal + "</td> ";
     }
     this.lb_show.Text += "</tr>";
 }