public VoyageTableCollection FetchAll() { VoyageTableCollection coll = new VoyageTableCollection(); Query qry = new Query(VoyageTable.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 VoyageTableCollection _tbl = new VoyageTableCollection(); if (mode != "Insert") { int _pid = wwi_func.vint(wwi_security.DecryptString(get_token("pid").ToString(), "publiship")); VoyageTable _vt = new VoyageTable(_pid); _tbl.Add(_vt); } else { VoyageTable _vt = new VoyageTable(); _tbl.Add(_vt); } this.fmvVoyage.DataSource = _tbl; this.fmvVoyage.DataBind(); }
public VoyageTableCollection FetchByQuery(Query qry) { VoyageTableCollection coll = new VoyageTableCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public VoyageTableCollection FetchByID(object VoyageID) { VoyageTableCollection coll = new VoyageTableCollection().Where("VoyageID", VoyageID).Load(); return coll; }