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