예제 #1
0
        public ContactCollection FetchByQuery(Query qry)
        {
            ContactCollection coll = new ContactCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
예제 #2
0
        public ContactCollection FetchAll()
        {
            ContactCollection coll = new ContactCollection();
            Query             qry  = new Query(Contact.Schema);

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
예제 #3
0
        public static AVManager.DAL.ContactCollection GetContactCollection(int varVendorID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Contact INNER JOIN VendorContact ON " +
                "Contact.ContactID=VendorContact.ContactID WHERE VendorContact.VendorID=@VendorID", Vendor.Schema.Provider.Name);

            cmd.AddParameter("@VendorID", varVendorID, DbType.Int32);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            ContactCollection coll = new ContactCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }