Listing the source code file 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;
using System.Globalization;
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();
PxCulture.CurrentCulture = new CultureInfo("en-US");
if (/*(!IsPostBack)&&*/(wquKateg_Zaner.Active == false))
{
wquKateg_Zaner.ConnectString = AppConst.ConnectString;
wquKateg_Zaner.SQLSelect = "select IDKateg_Zaner, Name from Kateg_Zaner order by IDKateg_Zaner";
wquKateg_Zaner.AfterScroll += new AfterScrollEventHandler(wquKateg_Zaner_AfterScroll);
wquKateg_Zaner.Open();
wquKateg_Zaner.Columns["IDKateg_Zaner"].Caption = "Id Category the Genre";
wquKateg_Zaner.Columns["Name"].Caption = "Category the Genre";
}
else
{
wquKateg_Zaner.AfterScroll += new AfterScrollEventHandler(wquKateg_Zaner_AfterScroll);
}
if (/*(!IsPostBack)&&*/(wquZaner.Active == false))
{
//string sSQLTextCis = "select IDKateg_Zaner as aKey, Name as aValue from Kateg_Zaner Order By aValue";
wquZaner.ConnectString = AppConst.ConnectString;
wquZaner.SQLSelect = "select IdZaner, Name, IDKateg_Zaner from Zaner where IDKateg_Zaner=" + wquKateg_Zaner.Fields["IDKateg_Zaner"].ToString();
//wquZaner.AddParamKey("IDKateg_Zaner", "aKey", "aValue", "aValue", "aKey", sSQLTextCis);
wquZaner.AddParamWebQuery("IDKateg_Zaner", "IDKateg_Zaner", "Name", "Name", "IDKateg_Zaner", "wquKateg_Zaner");
wquZaner.Open();
wquZaner.Columns["IdZaner"].Caption = "Id Genre";
wquZaner.Columns["Name"].Caption = "Name the Genre";
wquZaner.Columns["IDKateg_Zaner"].Caption = "Id Category the Genre";
}
else
{
// wquZaner.SQLSelect = "select IdZaner, Name, IDKateg_Zaner from Zaner where IDKateg_Zaner=" + wquKateg_Zaner.Fields["IDKateg_Zaner"].ToString();
// wquZaner.ReOpen();
}
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.AllowSorting = true;
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.AllowSorting = true;
grdZaner.DataBind();
navZaner.PxDataSource = wquZaner;
navZaner.PxVisibleButtons = "FRNL";
}
}
Return to original page