示例#1
0
        }                                       // the time the video was filmed

        public static List <NspotVideo> PopulateNSpotMemberWithJoin(IDataReader dr)
        {
            List <NspotVideo> arr = new List <NspotVideo>();

            while (dr.Read())
            {
                NspotVideo nsVideo = new NspotVideo();

                nsVideo.ThumbnailURL = WebNSpot.RootURL + (string)dr["ThumbnailURL"];
                nsVideo.MainVideoURL = WebNSpot.RootURL + (string)dr["MainVideoURL"];
                nsVideo.ThumbnailWebResourceFileID = (string)dr["ThumbnailWebResourceFileID"];
                nsVideo.VideoWebResourceFileID     = (string)dr["VideoWebResourceFileID"];
                nsVideo.TimeStamp = (DateTime)dr["TimeStamp"];

                arr.Add(nsVideo);
            }

            return(arr);
        }
示例#2
0
        /// <summary>
        /// Gets all the NspotVideo in the for the NSpot
        /// </summary>
        public static NspotVideo[] GetAllNSpotMemberAndVideoByNSpotID(int NSpotID)
        {
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetStoredProcCommand("HG_GetNSpotVideoNSpotID");

            db.AddInParameter(dbCommand, "NSpotID", DbType.Int32, NSpotID);

            List <NspotVideo> arr = null;

            //execute the stored procedure
            using (IDataReader dr = db.ExecuteReader(dbCommand))
            {
                arr = NspotVideo.PopulateNSpotMemberWithJoin(dr);
                dr.Close();
            }

            // Create the object array from the datareader
            return(arr.ToArray());
        }
示例#3
0
        public DateTime TimeStamp { get; set; } // the time the video was filmed

        public static List<NspotVideo> PopulateNSpotMemberWithJoin(IDataReader dr)
        {
            List<NspotVideo> arr = new List<NspotVideo>();

            while (dr.Read())
            {
                NspotVideo nsVideo = new NspotVideo();

                nsVideo.ThumbnailURL = WebNSpot.RootURL + (string)dr["ThumbnailURL"];
                nsVideo.MainVideoURL = WebNSpot.RootURL + (string)dr["MainVideoURL"];
                nsVideo.ThumbnailWebResourceFileID = (string)dr["ThumbnailWebResourceFileID"];
                nsVideo.VideoWebResourceFileID = (string)dr["VideoWebResourceFileID"];
                nsVideo.TimeStamp = (DateTime)dr["TimeStamp"];

                arr.Add(nsVideo);
            }

            return arr;
        }