Thursday, January 26, 2012

Class File : MSColumn3D.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using InfoSoftGlobal;
using MySql.Data.MySqlClient;
using MySql.Data;
using System.Collections.Generic;
using System.Configuration;
///
/// Summary description for MSColumn3D
///

public class MSColumn3D
{
MySqlCommand cmd;
MySqlDataReader dr;

public string strXML = "";


public MSColumn3D()
{

}
public string MSCol3D_Charts(string sqlstr, string charttype, string chartid, string xaxis, string pyaxis, string syaxis)
{
strXML = "";
strXML += "";

string connectionInfo = ConfigurationManager.AppSettings["ConnectionInfo"];
MySqlConnection con = new MySqlConnection(connectionInfo);
con.Open();

//cmd = new MySqlCommand("select * from avaya_rt_db where `" + xaxis + "` like 'Bel%' and " + yaxis + "!=0", con);
cmd = new MySqlCommand(sqlstr, con);
dr = cmd.ExecuteReader();

strXML += "";

while (dr.Read())
{
strXML += "";

}
dr.Close();
strXML += "
";

strXML += "";

cmd = new MySqlCommand(sqlstr, con);
dr = cmd.ExecuteReader();
while (dr.Read())
{
strXML += "";

}
dr.Close();
strXML += "
";

strXML += "";

cmd = new MySqlCommand(sqlstr, con);
dr = cmd.ExecuteReader();
while (dr.Read())
{
strXML += "";
}
dr.Close();
strXML += "
";

strXML += "
";

con.Close();


return FusionCharts.RenderChartHTML(charttype, "", strXML, chartid, "400", "300", false);

}
}

No comments:

Post a Comment