Výpis zdrojového kódu súboru InfoSongs.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 InfoSongs : 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))
{
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
{
}
lblIdSongs.PxDataSource = wquSongs;
lblIdSongs.FieldName = wquSongs.Columns["IdSongs"].ToString();
lblName.PxDataSource = wquSongs;
lblName.FieldName = wquSongs.Columns["Name"].ToString();
lblIDCDTitul.PxDataSource = wquSongs;
lblIDCDTitul.FieldName = wquSongs.Columns["IDCDTitul"].ToString();
lblIdOrder.PxDataSource = wquSongs;
lblIdOrder.FieldName = wquSongs.Columns["IdOrder"].ToString();
lblLength.PxDataSource = wquSongs;
lblLength.FieldName = wquSongs.Columns["Length"].ToString();
}
protected void ButtonClose_Click(object sender, EventArgs e)
{
this.Response.Redirect("~/Songs.aspx");
}
}
Návrat na pôvodnú stránku