Listing the source code file Author.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 Author : 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)&&*/(wquAuthor.Active==false))
        {
            filterAuthor.AddParamFilter("First_Name;Last_Name""<b>Name and Surname</b>""");
            filterAuthor.OrigSQLSelect = "select IdAuthor, First_Name, Last_Name, Notice from Author";

            wquAuthor.ConnectString = AppConst.ConnectString;
            wquAuthor.SQLSelect = "select IdAuthor, First_Name, Last_Name, Notice from Author";
            wquAuthor.AddParamValidation("Last_Name""vtIsNotNull");

            wquAuthor.Open();

            wquAuthor.AutomaticRefresh = true;
            wquAuthor.IntervalQueryRefresh = 30;

            wquAuthor.Columns["IdAuthor"].Caption = "Id Author";

            wquAuthor.Columns["First_Name"].Caption = "Name";

            wquAuthor.Columns["Last_Name"].Caption = "Surname";

            wquAuthor.Columns["Notice"].Caption = "Notice";

        }
        else
        {

        }

            filterAuthor.PxDataSource = wquAuthor;

            grdAuthor.VisibleFields = "IdAuthor; First_Name:150; Last_Name:150; Notice:100";
            grdAuthor.PxDataSource = wquAuthor;
            //grdAuthor.AllowSorting = true;
            grdAuthor.DataBind();

            navAuthor.PxDataSource = wquAuthor;
            navAuthor.PxVisibleButtons = "FRNL";
     }


     protected void Button1_Click1(object sender, EventArgs e)
     {
         Label1.Text = wquAuthor.Version;
     }
}

Return to original page