Example #1
0
        private static DBPage ExtractDataFromDataReader(System.Data.Common.DbDataReader result)
        {
            DBPage dbPage = new DBPage();

            dbPage.ID        = result.GetInt32(0);
            dbPage.IDFichier = result.GetInt32(1);
            dbPage.Ordre     = result.GetInt32(2);
            if (!string.IsNullOrEmpty(result.GetValue(3).ToString()) && !string.IsNullOrWhiteSpace(result.GetValue(3).ToString()))
            {
                dbPage.Element = ReadToEnd(result.GetStream(3));
            }
            return(dbPage);
        }
Example #2
0
        private static DBSerie ExtractDataFromDataReader(System.Data.Common.DbDataReader result)
        {
            DBSerie dbSerie = new DBSerie();

            dbSerie.ID   = result.GetInt32(0);
            dbSerie.Name = result.GetString(1);
            if (!string.IsNullOrEmpty(result.GetValue(2).ToString()) && !string.IsNullOrWhiteSpace(result.GetValue(2).ToString()))
            {
                dbSerie.Image = ReadToEnd(result.GetStream(2));
            }
            dbSerie.Extension = result.GetString(3);
            if (!string.IsNullOrEmpty(result.GetValue(4).ToString()) && !string.IsNullOrWhiteSpace(result.GetValue(4).ToString()))
            {
                dbSerie.ParentID = result.GetInt32(4);
            }
            return(dbSerie);
        }
Example #3
0
        private static DBFichier ExtractDataFromDataReader(System.Data.Common.DbDataReader result)
        {
            DBFichier dBFichier = new DBFichier();

            dBFichier.ID   = result.GetInt32(0);
            dBFichier.Name = result.GetString(1);
            if (!string.IsNullOrEmpty(result.GetValue(2).ToString()) && !string.IsNullOrWhiteSpace(result.GetValue(2).ToString()))
            {
                dBFichier.Order = result.GetInt32(2);
            }
            if (!string.IsNullOrEmpty(result.GetValue(3).ToString()) && !string.IsNullOrWhiteSpace(result.GetValue(3).ToString()))
            {
                dBFichier.Image = ReadToEnd(result.GetStream(3));
            }
            if (!string.IsNullOrEmpty(result.GetValue(4).ToString()) && !string.IsNullOrWhiteSpace(result.GetValue(4).ToString()))
            {
                dBFichier.ParentID = result.GetInt32(4);
            }
            if (!string.IsNullOrEmpty(result.GetValue(5).ToString()) && !string.IsNullOrWhiteSpace(result.GetValue(5).ToString()))
            {
                dBFichier.Collection = result.GetString(5);
            }
            return(dBFichier);
        }