Výpis zdrojového kódu súboru Statistics.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using PxControls;
using PxFiles;
public partial class Statistics : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
//rutina na vypnutie BackButonu v Browsery
this.Context.Response.Cache.SetCacheability(HttpCacheability.NoCache);
this.Context.Response.Cache.SetAllowResponseInBrowserHistory(false);
if (Request.Browser.MSDomVersion.Major == 0) // Non IE Browser?)
this.Context.Response.Cache.SetNoStore();
if (/*(!IsPostBack)&&*/(wquStatistics.Active == false))
{
wquStatistics.ConnectString = AppConst.ConnectString;
wquStatistics.SQLSelect = @"select CdTitul.IdZaner as idzaner,COUNT(*) as pocet,Zaner.Name as name
from CdTitul, Zaner
where CdTitul.IDZaner=Zaner.IdZaner
group by CdTitul.IDZaner";
wquStatistics.Open();
wquStatistics.AutomaticRefresh = true;
wquStatistics.IntervalQueryRefresh = 30;
wquStatistics.Columns["IdRecNum"].Caption = "Id";
wquStatistics.Columns["Pocet"].Caption = "Poèet Žánrov";
wquStatistics.Columns["name"].Caption = "Názov žánru";
}
else
{
}
grdStatistics.VisibleFields = "IdRecNum;Pocet:70;name:120";
grdStatistics.PxDataSource = wquStatistics;
grdStatistics.DataBind();
navStatistics.PxDataSource = wquStatistics;
navStatistics.PxVisibleButtons = "FRNL";
Chart.PxDataSource = wquStatistics;
Chart.FieldName = "name";
Chart.FieldValue = "pocet";
Chart.Caption = "Štatistika žánrov";
Chart.SubCaption = "Sumár žánrov za všetky CD tituli";
//Chart.Width = 800;
//Chart.Height = 800;
Chart.TypeChart = PxChart.PxChart.enumTypeCharts.tcColumn3D;
Chart.AddHeader("canvasBgColor", "F6DFD9");
Chart.AddHeader("divlinecolor", "F47E00");
}
}
Návrat na pôvodnú stránku