Exemplo n.º 1
0
        public MasterDetailItemCollection FetchByQuery(Query qry)
        {
            MasterDetailItemCollection coll = new MasterDetailItemCollection();

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
Exemplo n.º 2
0
        public MasterDetailItemCollection FetchAll()
        {
            MasterDetailItemCollection coll = new MasterDetailItemCollection();
            Query qry = new Query(MasterDetailItem.Schema);

            // Begin Bayshore custom code block (rread 6/26/07)
            // Ignore records marked for deletion when doing a FetchAll
            if (MasterDetailItem.Schema.GetColumn("IsDeleted") != null)
            {
                qry.WHERE("IsDeleted <> true");
            }
            else if (MasterDetailItem.Schema.GetColumn("Deleted") != null)
            {
                qry.WHERE("Deleted <> true");
            }
            // End Bayshore custom code block

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }