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

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

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Beispiel #3
0
        public static AVManager.DAL.SalesReasonCollection GetSalesReasonCollection(int varSalesOrderID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM SalesReason INNER JOIN SalesOrderHeaderSalesReason ON " +
                "SalesReason.SalesReasonID=SalesOrderHeaderSalesReason.SalesReasonID WHERE SalesOrderHeaderSalesReason.SalesOrderID=@SalesOrderID", SalesOrderHeader.Schema.Provider.Name);

            cmd.AddParameter("@SalesOrderID", varSalesOrderID, DbType.Int32);
            IDataReader           rdr  = SubSonic.DataService.GetReader(cmd);
            SalesReasonCollection coll = new SalesReasonCollection();

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