public AddressTypeCollection FetchByQuery(Query qry) { AddressTypeCollection coll = new AddressTypeCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public AddressTypeCollection FetchAll() { AddressTypeCollection coll = new AddressTypeCollection(); Query qry = new Query(AddressType.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return(coll); }
public static AVManager.DAL.AddressTypeCollection GetAddressTypeCollection(int varVendorID) { SubSonic.QueryCommand cmd = new SubSonic.QueryCommand( "SELECT * FROM AddressType INNER JOIN VendorAddress ON " + "AddressType.AddressTypeID=VendorAddress.AddressTypeID WHERE VendorAddress.VendorID=@VendorID", Vendor.Schema.Provider.Name); cmd.AddParameter("@VendorID", varVendorID, DbType.Int32); IDataReader rdr = SubSonic.DataService.GetReader(cmd); AddressTypeCollection coll = new AddressTypeCollection(); coll.LoadAndCloseReader(rdr); return(coll); }