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;
public partial class Adresar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if ((!IsPostBack)&&(wquAdresar.Active==false))
{
string sSQLText1 = "SELECT IDPRAVFORM AS aKEY, NAME AS aVALUE FROM PRAVFORM ORDER BY NAME";
wquAdresar.ConnectString = "Database=db;Data Source=localhost;User Id=root;Password=aa21aa;";
wquAdresar.SQLSelect = "SELECT IDADRESAR , NAME, ADDRESS, IDPRAVNAFORMA, CREATE_DATE FROM ADRESAR";
wquAdresar.AddParamKey("IDPRAVNAFORMA", "aKEY", "aVALUE", "aVALUE", "aKEY", sSQLText1);
wquAdresar.Open();
wquAdresar.Columns["idadresar"].Caption = "ID";
wquAdresar.Columns["name"].Caption = "Meno Osoby";
wquAdresar.Columns["idpravnaforma"].Caption = "Právna Forma";
wquAdresar.Columns["address"].Caption = "Adresa";
wquAdresar.Columns["create_date"].Caption = "Dátum založenia";
}
else
{
}
grdAdresar.PxDataSource = wquAdresar;
grdAdresar.DataBind();
}
}