求 ASP.net转VB.net 2010
Chart1.Legends["Legend1"].Title="2000年2001年每月利润比较";stringsql="SELECTMONTH(selltime)as...
Chart1.Legends["Legend1"].Title = "2000年2001年每月利润比较";
string sql = "SELECT MONTH (selltime) as 月份,SUM(profit) as 利润 FROM sell_tbl WHERE YEAR (selltime) = 2000 GROUP BY MONTH (selltime)";
string sql1 = "SELECT MONTH (selltime) as 月份,SUM(profit) as 利润 FROM sell_tbl WHERE YEAR (selltime) = 2001 GROUP BY MONTH (selltime)";
DataSet ds = new DataSet();
ds = JIZHIDBHelper.CreateInstance().Query(sql);
DataSet ds1 = new DataSet();
ds1 = JIZHIDBHelper.CreateInstance().Query(sql1);
DataView dv = new DataView(ds.Tables[0]);
DataView dv1 = new DataView(ds1.Tables[0]);
Chart1.Series["2000"].Points.DataBindXY(dv, "月份", dv, "利润");
Chart1.Series["2001"].Points.DataBindXY(dv1, "月份", dv1, "利润");
主要是数据 存储这我不知要怎么转
DataSet ds = new DataSet(); 展开
string sql = "SELECT MONTH (selltime) as 月份,SUM(profit) as 利润 FROM sell_tbl WHERE YEAR (selltime) = 2000 GROUP BY MONTH (selltime)";
string sql1 = "SELECT MONTH (selltime) as 月份,SUM(profit) as 利润 FROM sell_tbl WHERE YEAR (selltime) = 2001 GROUP BY MONTH (selltime)";
DataSet ds = new DataSet();
ds = JIZHIDBHelper.CreateInstance().Query(sql);
DataSet ds1 = new DataSet();
ds1 = JIZHIDBHelper.CreateInstance().Query(sql1);
DataView dv = new DataView(ds.Tables[0]);
DataView dv1 = new DataView(ds1.Tables[0]);
Chart1.Series["2000"].Points.DataBindXY(dv, "月份", dv, "利润");
Chart1.Series["2001"].Points.DataBindXY(dv1, "月份", dv1, "利润");
主要是数据 存储这我不知要怎么转
DataSet ds = new DataSet(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询