public string GetUserPhotoURL(int personId) { UserPreferences userPreference = new UserPreferences(); userPreference = new UserBL().GetUserPreferences(personId); string url = ConfigUtil.GetConfigItem("DefaultPersonImageURL"); if (userPreference.PhotoPref == 9) { url = string.Format("Thumbnail.ashx?id={0}&random={1}", personId, new Random().Next().ToString()); } else { DataSet photoDS = new PhotoDA().GetUserPhotoList(personId, 2); if (photoDS.Tables[0].Rows.Count > 0) { if (photoDS.Tables[0].Rows[userPreference.PhotoPref] != null) { url = Convert.ToString(photoDS.Tables[0].Rows[userPreference.PhotoPref]["PhotoLink"]); } } } return(url); }
public Byte[] GetUserPhoto(int personId) { Byte[] img = null; PhotoDA photo = new PhotoDA(); DataSet photoDS = photo.GetUserPhotoList(personId, photo.GetUsageCode()); // Currently limited to one if (photoDS.Tables[0].Rows.Count > 0) { if (photoDS.Tables[0].Rows[0] != null) { img = (byte[])photoDS.Tables[0].Rows[0]["Photo"]; } } return(img); }
public UnitTestDA() { AlbumDA = new AlbumDA(); PhotoDA = new PhotoDA(); }
public PhotoBL() { PhotoDA = new PhotoDA(); }