Beispiel #1
0
        public ContactTypeCollection FetchByQuery(Query qry)
        {
            ContactTypeCollection coll = new ContactTypeCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Beispiel #2
0
        public ContactTypeCollection FetchAll()
        {
            ContactTypeCollection coll = new ContactTypeCollection();
            Query qry = new Query(ContactType.Schema);

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Beispiel #3
0
        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);
        }