Výpis zdrojového kódu súboru Songs.aspx.cs
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using PxControls;
using PxFiles;
public partial class Songs : 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)&&(wquQCDTitul.Active==false))
{
wquQCDTitul.ConnectString = AppConst.ConnectString;
wquQCDTitul.SQLSelect = "select CdTitul.IDCDTITUL as IDCDTITUL, CONCAT_WS(' ',CdTitul.Titul,' / ',Author.last_name,Author.first_name) as NAME from CdTitul,Author where CdTitul.idauthor1=Author.idauthor";
wquQCDTitul.Open();
wquQCDTitul.AutomaticRefresh = true;
wquQCDTitul.IntervalQueryRefresh = 30;
wquQCDTitul.Columns["IDCDTITUL"].Caption = "";
wquQCDTitul.Columns["NAME"].Caption = "";
}
else
{
}
if ((!IsPostBack)&&(wquSongs.Active==false))
{
//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();
filterSongs.AddParamFilter("Name", "<b>Názov piesne</b>", "");
filterSongs.AddParamFilter("IDCDTitul", "<b>CD Titul</b>", "");
filterSongs.OrigSQLSelect = "select IdSongs, Name, IDCDTitul, IdOrder, Length from Songs";
wquSongs.ConnectString = AppConst.ConnectString;
wquSongs.SQLSelect = "select IdSongs, Name, IDCDTitul, IdOrder, Length from Songs";
wquSongs.AddParamWebQuery("IDCDTitul", "IDCDTITUL", "name", "name", "IDCDTITUL", "wquQCDTitul");
wquSongs.Open();
wquSongs.AutomaticRefresh = true;
wquSongs.IntervalQueryRefresh = 30;
wquSongs.Columns["IdSongs"].Caption = "Id Pieseò";
wquSongs.Columns["Name"].Caption = "Názov piesne";
wquSongs.Columns["IDCDTitul"].Caption = "CD Titul / Autor";
wquSongs.Columns["IdOrder"].Caption = "Poradie";
wquSongs.Columns["Length"].Caption = "Dåžka piesne v sec.";
}
else
{
}
filterSongs.PxDataSource = wquSongs;
grdSongs.VisibleFields = "IdSongs:40;Name:120;IDCDTitul:120;IdOrder:30;Length:30";
grdSongs.PxDataSource = wquSongs;
//grdSongs.AllowSorting = true;
grdSongs.DataBind();
navSongs.PxDataSource = wquSongs;
navSongs.PxVisibleButtons = "FRNL";
}
}
Návrat na pôvodnú stránku