Výpis zdrojového kódu súboru AddSongs.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 AddSongs : 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
{
}
if (wquSongs.StateQuery == PxWebQuery.eStateQuery.sqInsert)
lblAddEditPanel.Text = "Prida Pieseò";
else lblAddEditPanel.Text = "Editova Pieseò";
edtIdSongs.PxDataSource = wquSongs;
edtIdSongs.FieldName = "IdSongs";
edtName.PxDataSource = wquSongs;
edtName.FieldName = "Name";
cmbIDCDTitul.PxDataSource = wquSongs;
cmbIDCDTitul.FieldName = "IDCDTitul";
edtIdOrder.PxDataSource = wquSongs;
edtIdOrder.FieldName = "IdOrder";
edtLength.PxDataSource = wquSongs;
edtLength.FieldName = "Length";
}
protected void ButtonOk_Click(object sender, EventArgs e)
{
wquSongs.Post();
wquSongs.GoBackPreviousPage();
}
protected void ButtonStorno_Click(object sender, EventArgs e)
{
wquSongs.Cancel();
wquSongs.GoBackPreviousPage();
}
}
Návrat na pôvodnú stránku