public DateTime TimeStamp { get; set; }// the time the photo was taken

        public static List<NspotPhoto> PopulateNSpotMember(IDataReader dr)
        {
            List<NspotPhoto> arr = new List<NspotPhoto>();

            while (dr.Read())
            {
                NspotPhoto nsPhoto = new NspotPhoto();

                nsPhoto.ThumbnailURL = WebNSpot.RootURL + (string)dr["ThumbnailURL"];
                nsPhoto.MainPhotoURL = WebNSpot.RootURL + (string)dr["MainPhotoURL"];
                nsPhoto.ThumbnailWebResourceFileID = (string)dr["ThumbnailWebResourceFileID"];
                nsPhoto.PhotoWebResourceFileID = (string)dr["PhotoWebResourceFileID"];
                nsPhoto.TimeStamp = (DateTime)dr["TimeStamp"];

                arr.Add(nsPhoto);
            }

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

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

            List <NspotPhoto> arr = null;

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

            // Create the object array from the datareader
            return(arr.ToArray());
        }
Exemple #3
0
        }                                      // the time the photo was taken

        public static List <NspotPhoto> PopulateNSpotMember(IDataReader dr)
        {
            List <NspotPhoto> arr = new List <NspotPhoto>();

            while (dr.Read())
            {
                NspotPhoto nsPhoto = new NspotPhoto();

                nsPhoto.ThumbnailURL = WebNSpot.RootURL + (string)dr["ThumbnailURL"];
                nsPhoto.MainPhotoURL = WebNSpot.RootURL + (string)dr["MainPhotoURL"];
                nsPhoto.ThumbnailWebResourceFileID = (string)dr["ThumbnailWebResourceFileID"];
                nsPhoto.PhotoWebResourceFileID     = (string)dr["PhotoWebResourceFileID"];
                nsPhoto.TimeStamp = (DateTime)dr["TimeStamp"];

                arr.Add(nsPhoto);
            }

            return(arr);
        }