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

            coll.LoadAndCloseReader(qry.ExecuteReader());
            return(coll);
        }
        public static MasterDetailItem GetResource(int moduleId, string cultureCode)
        {
            MasterDetailItemCollection itemResL = new MasterDetailItemCollection()
                                                  .Where(MasterDetailItem.Columns.ModuleId, moduleId)
                                                  .Where(MasterDetailItem.Columns.Culture, cultureCode)
                                                  .Load();

            if (null == itemResL || itemResL.Count == 0)
            {
                return(null);
            }
            else
            {
                return(itemResL[0]);
            }
        }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
        public MasterDetailItemCollection FetchByID(object Id)
        {
            MasterDetailItemCollection coll = new MasterDetailItemCollection().Where("Id", Id).Load();

            return(coll);
        }