コード例 #1
0
        public SalesPersonCollection FetchByQuery(Query qry)
        {
            SalesPersonCollection coll = new SalesPersonCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
コード例 #2
0
        public SalesPersonCollection FetchAll()
        {
            SalesPersonCollection coll = new SalesPersonCollection();
            Query qry = new Query(SalesPerson.Schema);

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
コード例 #3
0
        public static AVManager.DAL.SalesPersonCollection GetSalesPersonCollection(int varTerritoryID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM SalesPerson INNER JOIN SalesTerritoryHistory ON " +
                "SalesPerson.SalesPersonID=SalesTerritoryHistory.SalesPersonID WHERE SalesTerritoryHistory.TerritoryID=@TerritoryID", SalesTerritory.Schema.Provider.Name);

            cmd.AddParameter("@TerritoryID", varTerritoryID, DbType.Int32);
            IDataReader           rdr  = SubSonic.DataService.GetReader(cmd);
            SalesPersonCollection coll = new SalesPersonCollection();

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