BookStatistics.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using MyBookShop.BusinessLogicLayer;

namespace MyBookShop.Web
{
	/// <summary>
	/// BookStatistics 的摘要说明。
	/// </summary>
	public partial class BookStatistics : System.Web.UI.Page
	{
	
		protected void Page_Load(object sender, System.EventArgs e)
		{
			if(!IsPostBack)
				DrawChartByCategory();
		}

		/// <summary>
		/// 按照图书类别统计
		/// </summary>
		private void DrawChartByCategory()
		{
			DataTable dt=Book.GetSaleCountByCategory();
			string title="图书销售量统计";			//标题
			string subTitle="基于图书种类";			//副标题
            string targetFile = Server.MapPath(".\\Images\\") + "Category.gif";	//图象文件
			Chart.DrawPie(title,subTitle,300,300,dt,targetFile,"CategoryName","SaleCount");

            Image.ImageUrl=targetFile;
		}
		/// <summary>
		/// 按照出版社统计
		/// </summary>
		//该源码下载自www.51aspx.com(51-aspx.com)
		private void DrawChartByPublisher()
		{
			DataTable dt=Book.GetSaleCountByPublisher();
			string title="图书销售量统计";			//标题
			string subTitle="基于出版社";			//副标题
            string targetFile = Server.MapPath(".") + "\\Images\\Publiser.gif";	//图象文件
  
			Chart.DrawPie(title,subTitle,300,300,dt,targetFile,"Publisher","SaleCount");

			Image.ImageUrl=targetFile;
		}
		/// <summary>
		/// 按照价格类别统计
		/// </summary>
		private void DrawChartByPrice()
		{
后面还有 32 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。