Exemple #1
0
        public static void Populate(object dataContainer, int libraryId)
        {
            DataProviderObject dataProviderObject = (DataProviderObject)dataContainer;

            object[] fieldValues = new object[15]
            {
                string.Empty,
                TimeSpan.Zero,
                0,
                0,
                string.Empty,
                string.Empty,
                string.Empty,
                0,
                0,
                string.Empty,
                0L,
                string.Empty,
                0,
                0,
                Guid.Empty
            };
            ZuneLibrary.GetFieldValues(libraryId, EListType.eVideoList, ColumnIndexes.Length, ColumnIndexes, fieldValues, PlaylistManager.Instance.QueryContext);
            for (int index = 0; index < ColumnIndexes.Length; ++index)
            {
                if (ColumnIndexes[index] == 177)
                {
                    dataProviderObject.SetProperty("MediaType", MediaDescriptions.Map((MediaType)fieldValues[index]));
                }
                dataProviderObject.SetProperty(DataProperties[index], fieldValues[index]);
            }
        }
        public static void Populate(object dataContainer, int libraryId)
        {
            DataProviderObject dataProviderObject = (DataProviderObject)dataContainer;

            object[] fieldValues = new object[19]
            {
                string.Empty,
                TimeSpan.Zero,
                0,
                0,
                string.Empty,
                string.Empty,
                string.Empty,
                new ArrayList(),
                string.Empty,
                string.Empty,
                DateTime.MinValue,
                0,
                0,
                string.Empty,
                string.Empty,
                string.Empty,
                string.Empty,
                0L,
                string.Empty
            };
            bool[] isEmptyValues = new bool[fieldValues.Length];
            ZuneLibrary.GetFieldValues(libraryId, EListType.eTrackList, ColumnIndexes.Length, ColumnIndexes, fieldValues, isEmptyValues, PlaylistManager.Instance.QueryContext);
            for (int index = 0; index < ColumnIndexes.Length; ++index)
            {
                if (ColumnIndexes[index] == 177)
                {
                    fieldValues[index] = MediaDescriptions.Map((MediaType)fieldValues[index]);
                }
                dataProviderObject.SetProperty(DataProperties[index], fieldValues[index]);
            }
        }