Výpis zdrojového kódu súboru ZanerKatMasterDet.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 ZanerKatMasterDet : 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 (wquKateg_Zaner.Active == false)
{
wquKateg_Zaner.ConnectString = AppConst.ConnectString;
wquKateg_Zaner.SQLSelect = "select IDKateg_Zaner, Name from Kateg_Zaner";
wquKateg_Zaner.Open();
wquKateg_Zaner.Columns["IDKateg_Zaner"].Caption = "Id Kategória Žáner";
wquKateg_Zaner.Columns["Name"].Caption = "Kategória Žáner";
}
else
{
wquKateg_Zaner.AfterScroll += new AfterScrollEventHandler(wquKateg_Zaner_AfterScroll);
}
if (wquZaner.Active == false)
{
wquZaner.ConnectString = AppConst.ConnectString;
wquZaner.SQLSelect = "select IdZaner, Name, IDKateg_Zaner from Zaner where IDKateg_Zaner=" + wquKateg_Zaner.Fields["IDKateg_Zaner"].ToString();
wquZaner.Open();
wquZaner.Columns["IdZaner"].Caption = "Id Žáner";
wquZaner.Columns["Name"].Caption = "Meno žánru";
wquZaner.Columns["IDKateg_Zaner"].Caption = "Id Kategória Žáner";
}
else
{
}
grdKateg_Zaner.VisibleFields = "IDKateg_Zaner;Name:100";
grdKateg_Zaner.PxDataSource = wquKateg_Zaner;
//grdKateg_Zaner.AllowSorting = true;
grdKateg_Zaner.DataBind();
navKateg_Zaner.PxDataSource = wquKateg_Zaner;
navKateg_Zaner.PxVisibleButtons = "FRNL";
grdZaner.VisibleFields = "IdZaner; Name:100;IDKateg_Zaner";
grdZaner.PxDataSource = wquZaner;
grdZaner.DataBind();
navZaner.PxDataSource = wquZaner;
navZaner.PxVisibleButtons = "FRNL";
}
void wquKateg_Zaner_AfterScroll(object sender, EventArgs e)
{
string SQLSelect1 = "select IdZaner, Name, IDKateg_Zaner from Zaner where IDKateg_Zaner=" + wquKateg_Zaner.Fields["IDKateg_Zaner"].ToString();
if (wquZaner.SQLSelect != SQLSelect1)
{
wquZaner.SQLSelect = SQLSelect1;
wquZaner.ReOpen();
}
grdZaner.VisibleFields = "IdZaner; Name:100;IDKateg_Zaner";
grdZaner.PxDataSource = wquZaner;
grdZaner.DataBind();
navZaner.PxDataSource = wquZaner;
navZaner.PxVisibleButtons = "FRNL";
}
}
Návrat na pôvodnú stránku