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

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

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
예제 #3
0
        public static AVManager.DAL.CountryRegionCollection GetCountryRegionCollection(string varCurrencyCode)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM CountryRegion INNER JOIN CountryRegionCurrency ON " +
                "CountryRegion.CountryRegionCode=CountryRegionCurrency.CountryRegionCode WHERE CountryRegionCurrency.CurrencyCode=@CurrencyCode", Currency.Schema.Provider.Name);

            cmd.AddParameter("@CurrencyCode", varCurrencyCode, DbType.String);
            IDataReader             rdr  = SubSonic.DataService.GetReader(cmd);
            CountryRegionCollection coll = new CountryRegionCollection();

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