using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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 System.Xml.Linq;
using PxControls;
public partial class AddAdresar : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (wquAdresar.StateQuery == PxWebQuery.eStateQuery.sqInsert)
lblAddEditPanel.Text = "Pridať adresu";
else lblAddEditPanel.Text = "Editovať adresu";
edtIDADRESAR.PxDataSource = wquAdresar;
edtIDADRESAR.FieldName = wquAdresar.Columns["IDADRESAR"].ToString();
edtName.PxDataSource = wquAdresar;
edtName.FieldName = wquAdresar.Columns["NAME"].ToString();
edtADDRESS.PxDataSource = wquAdresar;
edtADDRESS.FieldName = wquAdresar.Columns["ADDRESS"].ToString();
cmbPravnaForma.PxDataSource = wquAdresar;
cmbPravnaForma.FieldName = wquAdresar.Columns["idpravnaforma"].ToString();
edtCREATE_DATE.PxDataSource = wquAdresar;
edtCREATE_DATE.FieldName = wquAdresar.Columns["CREATE_DATE"].ToString();
chkInvalid_Adress.PxDataSource = wquAdresar;
chkInvalid_Adress.FieldName = wquAdresar.Columns["Invalid_Adress"].ToString();
chkInvalid_Adress.Text = "Adresa neplatná 2";
}
protected void ButtonOk_Click(object sender, EventArgs e)
{
wquAdresar.Post();
wquAdresar.GoBackPreviousPage();
}
protected void ButtonStorno_Click(object sender, EventArgs e)
{
wquAdresar.Cancel();
wquAdresar.GoBackPreviousPage();
}
}