public TypeTableCollection FetchAll() { TypeTableCollection coll = new TypeTableCollection(); Query qry = new Query(TypeTable.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 TypeTableCollection _tbl = new TypeTableCollection(); if (mode != "Insert") { int _pid = wwi_func.vint(wwi_security.DecryptString(get_token("pid").ToString(), "publiship")); TypeTable _ct = new TypeTable(_pid); _tbl.Add(_ct); //store original value for company type name so we can check against database when saving if (this.dxhfOrder.Contains("oldvalue")) { this.dxhfOrder.Remove("oldvalue"); } this.dxhfOrder.Add("oldvalue", _ct.TypeName); } else { TypeTable _ct = new TypeTable(); _tbl.Add(_ct); } this.fmvCompanyType.DataSource = _tbl; this.fmvCompanyType.DataBind(); }
public TypeTableCollection FetchByQuery(Query qry) { TypeTableCollection coll = new TypeTableCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public TypeTableCollection FetchByID(object TypeID) { TypeTableCollection coll = new TypeTableCollection().Where("TypeID", TypeID).Load(); return coll; }