Exemple #1
0
        public UnitMeasureCollection FetchByQuery(Query qry)
        {
            UnitMeasureCollection coll = new UnitMeasureCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Exemple #2
0
        public UnitMeasureCollection FetchAll()
        {
            UnitMeasureCollection coll = new UnitMeasureCollection();
            Query qry = new Query(UnitMeasure.Schema);

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Exemple #3
0
        public static AVManager.DAL.UnitMeasureCollection GetUnitMeasureCollection(int varVendorID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM UnitMeasure INNER JOIN ProductVendor ON " +
                "UnitMeasure.UnitMeasureCode=ProductVendor.UnitMeasureCode WHERE ProductVendor.VendorID=@VendorID", Vendor.Schema.Provider.Name);

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

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