Beispiel #1
0
        public RdsCollection[] GetRDSCollectonsPaged(int itemId, int maximumRows, int startRowIndex, string sortColumn, string filterValue)
        {
            rdsCollections = ES.Services.RDS.GetRdsCollectionsPaged(itemId, "Name", filterValue, sortColumn, startRowIndex, maximumRows);

            return rdsCollections.Collections;

            //return new RdsCollection[] { new RdsCollection { Name = "Collection 1", Description = "" },
            //                             new RdsCollection { Name = "Collection 2", Description = "" },
            //                             new RdsCollection { Name = "Collection 3", Description = "" }};
        }
        private static RdsCollectionPaged GetRdsCollectionsPagedInternal(int itemId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows)
        {
            DataSet ds = DataProvider.GetRDSCollectionsPaged(itemId, filterColumn, filterValue, sortColumn, startRow, maximumRows);

            var result = new RdsCollectionPaged
            {
                RecordsCount = (int)ds.Tables[0].Rows[0][0]
            };

            List<RdsCollection> tmpCollections = new List<RdsCollection>();

            ObjectUtils.FillCollectionFromDataView(tmpCollections, ds.Tables[1].DefaultView);

            foreach (var collection in tmpCollections)
            {
                collection.Servers = GetCollectionRdsServersInternal(collection.Id);
            }

            result.Collections = tmpCollections.ToArray();

            return result;
        }