Listing the source code file Zaner.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 Zaner : 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)&&*/(wquZanerOnly.Active == false))
        {
            string sSQLTextCis = "select IDKateg_Zaner as aKey, Name as aValue from Kateg_Zaner Order By aValue";

            wquZanerOnly.ConnectString = AppConst.ConnectString;
            wquZanerOnly.SQLSelect = "select IdZaner, Name, IDKateg_Zaner from Zaner";

            wquZanerOnly.AddParamKey("IDKateg_Zaner""aKey""aValue""aValue""aKey", sSQLTextCis);
            wquZanerOnly.Open();

            wquZanerOnly.Columns["IdZaner"].Caption = "Id Genre";

            wquZanerOnly.Columns["Name"].Caption = "Name the Genre";

            wquZanerOnly.Columns["IDKateg_Zaner"].Caption = "Id Category the Genre";


        }
        else
        {
          string sSQLText1="select IdZaner, Name, IDKateg_Zaner from Zaner";
          if (wquZanerOnly.SQLSelect != sSQLText1)
          {
              wquZanerOnly.SQLSelect = sSQLText1;
              wquZanerOnly.ReOpen();
          }
        }


        grdZaner.VisibleFields = "IdZaner; Name:100;IDKateg_Zaner";
        grdZaner.PxDataSource = wquZanerOnly;
        //grdZaner.AllowSorting = true;
        grdZaner.DataBind();

        navZaner.PxDataSource = wquZanerOnly;
        navZaner.PxVisibleButtons = "FRNL";
     }


}

Return to original page