protected void bind_formview(string mode) { //have to use a collection as formview needs to bind to enumerable CountryTableCollection _tbl = new CountryTableCollection(); if (mode != "Insert") { int _pid = wwi_func.vint(wwi_security.DecryptString(get_token("pid").ToString(), "publiship")); CountryTable _ct = new CountryTable(_pid); _tbl.Add(_ct); //store original value for country name so we can check against database when saving if (this.dxhfOrder.Contains("oldvalue")) { this.dxhfOrder.Remove("oldvalue"); } this.dxhfOrder.Add("oldvalue", _ct.CountryName); } else { CountryTable _ct = new CountryTable(); _tbl.Add(_ct); } this.fmvCountry.DataSource = _tbl; this.fmvCountry.DataBind(); }
public CountryTableCollection FetchAll() { CountryTableCollection coll = new CountryTableCollection(); Query qry = new Query(CountryTable.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
protected void bind_formview(string mode) { //have to use a collection as formview needs to bind to enumerable CountryTableCollection _tbl = new CountryTableCollection(); if (mode != "Insert") { int _pid = wwi_func.vint(wwi_security.DecryptString(get_token("pid").ToString(), "publiship")); CountryTable _ct = new CountryTable(_pid); _tbl.Add(_ct); //store original value for country name so we can check against database when saving if (this.dxhfOrder.Contains("oldvalue")) { this.dxhfOrder.Remove("oldvalue"); } this.dxhfOrder.Add("oldvalue", _ct.CountryName); } else { CountryTable _ct = new CountryTable(); _tbl.Add(_ct); } this.fmvCountry.DataSource = _tbl; this.fmvCountry.DataBind(); }
public CountryTableCollection FetchByQuery(Query qry) { CountryTableCollection coll = new CountryTableCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public CountryTableCollection FetchByID(object CountryID) { CountryTableCollection coll = new CountryTableCollection().Where("CountryID", CountryID).Load(); return coll; }