WebRoot/FusionChartsFree/Code/CSNET/DB_JS/Default.aspx.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DataConnection;
using InfoSoftGlobal;
public partial class DB_JS_Default : System.Web.UI.Page
{
public string jsVarString;
public int indexCount;
protected void Page_Load(object sender, EventArgs e)
{
}
public void GetjsVar(){
//In this example, we show a combination of database + JavaScript rendering using FusionCharts.
//The entire app (page) can be summarized as under. This app shows the break-down
//of factory wise output generated. In a pie chart, we first show the sum of quantity
//generated by each factory. These pie slices, when clicked would show detailed date-wise
//output of that factory.
//The XML data for the pie chart is fully created in ASP at run-time. ASP interacts
//with the database and creates the XML for this.
//Now, for the column chart (date-wise output report), we do not submit request to the server.
//Instead we store the data for the factories in JavaScript arrays. These JavaScript
//arrays are rendered by our ASP Code (at run-time). We also have a few defined JavaScript
//functions which react to the click event of pie slice.
//We've used an Access database which is present in ../DB/FactoryDB.mdb.
//It just contains two tables, which are linked to each other.
//Before the page is rendered, we need to connect to the database and get the
//data, as we'll need to convert this data into JavaScript variables.
//The following string will contain the JS Data and variables.
//This string will be built in ASP and rendered at run-time as JavaScript.
jsVarString = "";
//Database Objects
DbConn oRs; string strQuery;
indexCount = 0;
//Iterate through each factory
strQuery = "select * from Factory_Master";
oRs = new DbConn(strQuery);
while(oRs.ReadData.Read()){
indexCount++;
//Create JavaScript code to add sub-array to data array
后面还有 65 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。