protected void ddlArtist1_SelectedIndexChanged(object sender, EventArgs e) { artsngs = new Songs(); artst = new Artist(ddlArtist1.SelectedValue); artsngs.GetSongsForArtist(artst.ArtistID); ddlArtistSongs1.DataSource = artsngs; ddlArtistSongs1.DataTextField = "name"; ddlArtistSongs1.DataValueField = "name"; ddlArtistSongs1.DataBind(); ddlArtistSongs1.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs1); txtAmazonLink.Text = string.Empty; txtiTunesLink.Text = string.Empty; }
private void GetArtistProfile(Artist art, Videos vids) { // photo var aprop = new ArtistProperty(); aprop.GetArtistPropertyForTypeArtist(art.ArtistID, SiteEnums.ArtistPropertyType.PH.ToString()); if (!string.IsNullOrEmpty(aprop.PropertyContent)) { ViewBag.ArtistPhoto = VirtualPathUtility.ToAbsolute(aprop.PropertyContent); ViewBag.ThumbIcon = VirtualPathUtility.ToAbsolute(aprop.PropertyContent); } // meta descriptione aprop = new ArtistProperty(); aprop.GetArtistPropertyForTypeArtist(art.ArtistID, SiteEnums.ArtistPropertyType.MD.ToString()); if (!string.IsNullOrEmpty(aprop.PropertyContent)) ViewBag.MetaDescription = aprop.PropertyContent; // description aprop = new ArtistProperty(); aprop.GetArtistPropertyForTypeArtist(art.ArtistID, SiteEnums.ArtistPropertyType.LD.ToString()); if (!string.IsNullOrEmpty(aprop.PropertyContent)) ViewBag.ArtistDescription = ContentLinker.InsertBandLinks(aprop.PropertyContent, false); var sngss = new Songs(); sngss.GetSongsForArtist(art.ArtistID); foreach (Song sn1 in sngss) { vids.GetVideosForSong(sn1.SongID); } }
protected void ddlArtist6_SelectedIndexChanged(object sender, EventArgs e) { artsngs = new Songs(); artst = new Artist(ddlArtist5.SelectedValue); artsngs.GetSongsForArtist(artst.ArtistID); ddlArtistSongs6.DataSource = artsngs; ddlArtistSongs6.DataTextField = "name"; ddlArtistSongs6.DataValueField = "name"; ddlArtistSongs6.DataBind(); ddlArtistSongs6.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs6); }
private void LoadVideo(string videoKey) { ClearInput(); try { vid = new Video("YT", videoKey); litVideo.Text = string.Format( @"<iframe width=""425"" height=""349"" src=""http://www.youtube.com/embed/{0}"" frameborder=""0"" allowfullscreen></iframe>", vid.ProviderKey); txtSecondsIn.Text = vid.Intro.ToString(); txtElasedEnd.Text = vid.LengthFromStart.ToString(); ddlVideoProvider.SelectedValue = vid.ProviderCode; chkEnabled.Checked = vid.IsEnabled; ddlVolumeLevel.SelectedValue = vid.VolumeLevel.ToString(); lblVideoID.Text = vid.VideoID.ToString(); if (vid.VolumeLevel == 0) { ddlVolumeLevel.SelectedValue = "5"; chkEnabled.Checked = true; } var video = new Google.YouTube.Video(); try { var yousettings = new YouTubeRequestSettings("Das Klub", devkey); var yourequest = new YouTubeRequest(yousettings); var url = new Uri("http://gdata.youtube.com/feeds/api/videos/" + videoKey); video = yourequest.Retrieve<Google.YouTube.Video>(url); txtDuration.Text = video.YouTubeEntry.Duration.Seconds; } catch (GDataRequestException) { vid.IsEnabled = false; vid.Update(); litVideo.Text = string.Empty; return; } if (vid.LengthFromStart == 0) { txtElasedEnd.Text = video.YouTubeEntry.Duration.Seconds; } if (vid.LengthFromStart == 0) { txtDuration.Text = video.YouTubeEntry.Duration.Seconds; } txtUserName.Text = video.Uploader; lblVideoID.Text = vid.VideoID.ToString(); txtVideoKey.Text = video.VideoId; // vid type propTyp = new PropertyType(SiteEnums.PropertyTypeCode.VIDTP); mp = new MultiProperty(vid.VideoID, propTyp.PropertyTypeID, SiteEnums.MultiPropertyType.VIDEO); mps = new MultiProperties(propTyp.PropertyTypeID); mps.Sort(delegate(MultiProperty p1, MultiProperty p2) { return p1.Name.CompareTo(p2.Name); }); ddlVideoType.DataSource = mps; ddlVideoType.DataTextField = "name"; ddlVideoType.DataValueField = "multiPropertyID"; ddlVideoType.DataBind(); ddlVideoType.Items.Insert(0, new ListItem(selectText)); if (mp.MultiPropertyID != 0) ddlVideoType.SelectedValue = mp.MultiPropertyID.ToString(); // human propTyp = new PropertyType(SiteEnums.PropertyTypeCode.HUMAN); mp = new MultiProperty(vid.VideoID, propTyp.PropertyTypeID, SiteEnums.MultiPropertyType.VIDEO); mps = new MultiProperties(propTyp.PropertyTypeID); mps.Sort(delegate(MultiProperty p1, MultiProperty p2) { return p1.Name.CompareTo(p2.Name); }); ddlHumanType.DataSource = mps; ddlHumanType.DataTextField = "name"; ddlHumanType.DataValueField = "multiPropertyID"; ddlHumanType.DataBind(); ddlHumanType.Items.Insert(0, new ListItem(selectText)); if (mp.MultiPropertyID != 0) ddlHumanType.SelectedValue = mp.MultiPropertyID.ToString(); // footage propTyp = new PropertyType(SiteEnums.PropertyTypeCode.FOOTG); mp = new MultiProperty(vid.VideoID, propTyp.PropertyTypeID, SiteEnums.MultiPropertyType.VIDEO); mps = new MultiProperties(propTyp.PropertyTypeID); mps.Sort(delegate(MultiProperty p1, MultiProperty p2) { return p1.Name.CompareTo(p2.Name); }); ddlFootageType.DataSource = mps; ddlFootageType.DataTextField = "name"; ddlFootageType.DataValueField = "multiPropertyID"; ddlFootageType.DataBind(); ddlFootageType.Items.Insert(0, new ListItem(selectText)); if (mp.MultiPropertyID != 0) ddlFootageType.SelectedValue = mp.MultiPropertyID.ToString(); // contest var vidInContest = new ContestVideo(); vidInContest.GetContestVideo(vid.VideoID); if (vidInContest.ContestVideoID != 0) { ddlContest.SelectedValue = vidInContest.ContestID.ToString(); } else ddlContest.SelectedValue = unknownValue; var sngs = new Songs(); artsngs = new Songs(); sngs.GetSongsForVideo(vid.VideoID); Artist art = null; var arts = new Artists(); arts.GetAll(); // artists 1 ddlArtist1.DataSource = arts; ddlArtist1.DataTextField = "name"; ddlArtist1.DataValueField = "name"; ddlArtist1.DataBind(); Utilities.General.SortDropDownList(ddlArtist1); ddlArtist1.Items.Insert(0, new ListItem(unknownValue)); // artists 2 ddlArtist2.DataSource = arts; ddlArtist2.DataTextField = "name"; ddlArtist2.DataValueField = "name"; ddlArtist2.DataBind(); Utilities.General.SortDropDownList(ddlArtist2); ddlArtist2.Items.Insert(0, new ListItem(unknownValue)); // artists 3 ddlArtist3.DataSource = arts; ddlArtist3.DataTextField = "name"; ddlArtist3.DataValueField = "name"; ddlArtist3.DataBind(); Utilities.General.SortDropDownList(ddlArtist3); ddlArtist3.Items.Insert(0, new ListItem(unknownValue)); // artists 4 ddlArtist4.DataSource = arts; ddlArtist4.DataTextField = "name"; ddlArtist4.DataValueField = "name"; ddlArtist4.DataBind(); Utilities.General.SortDropDownList(ddlArtist4); ddlArtist4.Items.Insert(0, new ListItem(unknownValue)); // artists 5 ddlArtist5.DataSource = arts; ddlArtist5.DataTextField = "name"; ddlArtist5.DataValueField = "name"; ddlArtist5.DataBind(); Utilities.General.SortDropDownList(ddlArtist5); ddlArtist5.Items.Insert(0, new ListItem(unknownValue)); // artists 6 ddlArtist6.DataSource = arts; ddlArtist6.DataTextField = "name"; ddlArtist6.DataValueField = "name"; ddlArtist6.DataBind(); Utilities.General.SortDropDownList(ddlArtist6); ddlArtist6.Items.Insert(0, new ListItem(unknownValue)); foreach (Song sng in sngs) { if (sng.Name == unknownValue || string.IsNullOrEmpty(sng.Name)) continue; // sngrcd.SongDisplay += art.Name + " - " + sng.Name + " " ; if (sng.RankOrder == 0 || sng.RankOrder == 1) { // song 1 art = new Artist(sng.ArtistID); ddlArtist1.SelectedValue = art.Name; artsngs = new Songs(); artsngs.GetSongsForArtist(art.ArtistID); ddlArtistSongs1.DataSource = artsngs; ddlArtistSongs1.DataTextField = "name"; ddlArtistSongs1.DataValueField = "name"; ddlArtistSongs1.DataBind(); ddlArtistSongs1.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs1); ddlArtistSongs1.SelectedValue = sng.Name; } else if (sng.RankOrder == 2) { // song 2 art = new Artist(sng.ArtistID); ddlArtist2.SelectedValue = art.Name; artsngs = new Songs(); artsngs.GetSongsForArtist(art.ArtistID); ddlArtistSongs2.DataSource = artsngs; ddlArtistSongs2.DataTextField = "name"; ddlArtistSongs2.DataValueField = "name"; ddlArtistSongs2.DataBind(); ddlArtistSongs2.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs2); ddlArtistSongs2.SelectedValue = sng.Name; } else if (sng.RankOrder == 3) { // song 3 art = new Artist(sng.ArtistID); ddlArtist3.SelectedValue = art.Name; artsngs = new Songs(); artsngs.GetSongsForArtist(art.ArtistID); ddlArtistSongs3.DataSource = artsngs; ddlArtistSongs3.DataTextField = "name"; ddlArtistSongs3.DataValueField = "name"; ddlArtistSongs3.DataBind(); ddlArtistSongs3.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs3); ddlArtistSongs3.SelectedValue = sng.Name; } else if (sng.RankOrder == 4) { // song 4 art = new Artist(sng.ArtistID); ddlArtist4.SelectedValue = art.Name; artsngs = new Songs(); artsngs.GetSongsForArtist(art.ArtistID); ddlArtistSongs4.DataSource = artsngs; ddlArtistSongs4.DataTextField = "name"; ddlArtistSongs4.DataValueField = "name"; ddlArtistSongs4.DataBind(); ddlArtistSongs4.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs4); ddlArtistSongs4.SelectedValue = sng.Name; } else if (sng.RankOrder == 5) { // song 5 art = new Artist(sng.ArtistID); ddlArtist5.SelectedValue = art.Name; artsngs = new Songs(); artsngs.GetSongsForArtist(art.ArtistID); ddlArtistSongs5.DataSource = artsngs; ddlArtistSongs5.DataTextField = "name"; ddlArtistSongs5.DataValueField = "name"; ddlArtistSongs5.DataBind(); ddlArtistSongs5.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs5); ddlArtistSongs5.SelectedValue = sng.Name; } else if (sng.RankOrder == 6) { // song 6 art = new Artist(sng.ArtistID); ddlArtist6.SelectedValue = art.Name; artsngs = new Songs(); artsngs.GetSongsForArtist(art.ArtistID); ddlArtistSongs6.DataSource = artsngs; ddlArtistSongs6.DataTextField = "name"; ddlArtistSongs6.DataValueField = "name"; ddlArtistSongs6.DataBind(); ddlArtistSongs6.Items.Insert(0, new ListItem(unknownValue)); Utilities.General.SortDropDownList(ddlArtistSongs6); ddlArtistSongs6.SelectedValue = sng.Name; } } lblStatus.Text = "OK"; } catch (Exception ex) { lblStatus.Text = ex.Message; } }
public ActionResult ProfileDetail(string userName) { ViewBag.VideoHeight = (Request.Browser.IsMobileDevice) ? 100 : 277; ViewBag.VideoWidth = (Request.Browser.IsMobileDevice) ? 225 : 400; ua = new UserAccount(userName); UserAccountDetail uad = new UserAccountDetail(); uad.GetUserAccountDeailForUser(ua.UserAccountID); uad.BandsSeen = ContentLinker.InsertBandLinks(uad.BandsSeen, false); uad.BandsToSee = ContentLinker.InsertBandLinks(uad.BandsToSee, false); MembershipUser mu = Membership.GetUser(); ProfileModel model = new ProfileModel(); if (ua.UserAccountID > 0) { model.UserAccountID = ua.UserAccountID; model.PhotoCount = PhotoItems.GetPhotoItemCountForUser(ua.UserAccountID); model.CreateDate = ua.CreateDate; } if (mu != null) { ViewBag.IsBlocked = BlockedUser.IsBlockedUser(ua.UserAccountID, Convert.ToInt32(mu.ProviderUserKey)); ViewBag.IsBlocking = BlockedUser.IsBlockedUser(Convert.ToInt32(mu.ProviderUserKey), ua.UserAccountID); if (ua.UserAccountID == Convert.ToInt32(mu.ProviderUserKey)) { model.IsViewingSelf = true; } else { UserConnection ucon = new UserConnection(); ucon.GetUserToUserConnection(Convert.ToInt32(mu.ProviderUserKey), ua.UserAccountID); model.UserConnectionID = ucon.UserConnectionID; if (BlockedUser.IsBlockedUser(Convert.ToInt32(mu.ProviderUserKey), ua.UserAccountID)) { return RedirectToAction("index", "home"); } } } else { if (uad.MembersOnlyProfile) { return RedirectToAction("Account", "LogOn"); } } // model.UserName = ua.UserName; model.CreateDate = ua.CreateDate; model.LastActivityDate = ua.LastActivityDate; // model.DisplayAge = uad.DisplayAge; model.Age = uad.YearsOld; model.BandsSeen = uad.BandsSeen; model.BandsToSee = uad.BandsToSee; model.HardwareAndSoftwareSkills = uad.HardwareSoftware; model.MessageToTheWorld = uad.AboutDescription; model.YouAreFull = uad.Sex; model.InterestedInFull = uad.InterestedFull; model.RelationshipStatusFull = uad.RelationshipStatusFull ; model.RelationshipStatus = uad.RelationshipStatus; model.InterestedIn = uad.InterestedIn; model.YouAre = uad.YouAre; model.Website = uad.ExternalURL; model.CountryCode = uad.Country; model.CountryName = uad.CountryName; model.IsBirthday = uad.IsBirthdayToday; model.ProfilePhotoMain = uad.FullProfilePicURL; model.ProfilePhotoMainThumb = uad.FullProfilePicThumbURL; model.DefaultLanguage = uad.DefaultLanguage; model.EnableProfileLogging = uad.EnableProfileLogging; model.Handed = uad.HandedFull; model.RoleIcon = uad.SiteBages; // StatusUpdate su = new StatusUpdate(); su.GetMostRecentUserStatus(ua.UserAccountID); if (su.StatusUpdateID > 0) { model.LastStatusUpdate = su.CreateDate; model.MostRecentStatusUpdate = su.Message; } model.ProfileVisitorCount = ProfileLog.GetUniqueProfileVisitorCount(ua.UserAccountID); PhotoItems ptiems = new PhotoItems(); ptiems.GetUserPhotos(ua.UserAccountID); if (ptiems.Count > 0) { ptiems.Sort((PhotoItem x, PhotoItem y) => (y.CreateDate.CompareTo(x.CreateDate))); PhotoItems ptiemsDisplay = new PhotoItems(); int maxPhotos = 8; foreach (PhotoItem pitm1 in ptiems) { pitm1.UseThumb = true; if (ptiemsDisplay.Count < maxPhotos) { ptiemsDisplay.Add(pitm1); } else break; } ptiemsDisplay.UseThumb = true; ptiemsDisplay.ShowTitle = false; model.HasMoreThanMaxPhotos = (ptiems.Count > maxPhotos); ptiemsDisplay.IsUserPhoto = true; model.PhotoItems = ptiemsDisplay.ToUnorderdList; } Contents conts = new Contents(); conts.GetContentForUser(ua.UserAccountID); model.NewsCount = conts.Count; if (conts.Count > 0) { conts.Sort((Content x, Content y) => (y.ReleaseDate.CompareTo(x.ReleaseDate))); Contents displayContents = new Contents(); int maxCont = 1; int currentCount = 0; foreach (Content ccn1 in conts) { currentCount++; if (maxCont >= currentCount) { displayContents.Add(ccn1); } else break; } displayContents.IncludeStartAndEndTags = false; model.NewsArticles = displayContents.ToUnorderdList; } model.MetaDescription = ua.UserName + " " + BootBaronLib.Resources.Messages.Profile + " " + FromDate.DateToYYYY_MM_DD(ua.LastActivityDate); // playlist BootBaronLib.AppSpec.DasKlub.BOL.Playlist plyst = new Playlist(); plyst.GetUserPlaylist(ua.UserAccountID); if (plyst.PlaylistID > 0 && PlaylistVideos.GetCountOfVideosInPlaylist(plyst.PlaylistID) > 0) { ViewBag.AutoPlay = plyst.AutoPlay; ViewBag.AutoPlayNumber = (plyst.AutoPlay) ? 1 : 0; ViewBag.UserPlaylistID = plyst.PlaylistID; } if (uad.UserAccountID > 0) { model.Birthday = uad.BirthDate; if (uad.ShowOnMapLegal) { byte[] myarray2 = Encoding.Unicode.GetBytes(string.Empty); // because of the foreign cultures, numbers need to stay in the English version unless a javascript encoding could be added string currentLang = Utilities.GetCurrentLanguageCode(); Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(SiteEnums.SiteLanguages.EN.ToString()); Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(SiteEnums.SiteLanguages.EN.ToString()); Encoding iso = Encoding.GetEncoding("ISO-8859-1"); Encoding utf8 = Encoding.UTF8; model.DisplayOnMap = uad.ShowOnMapLegal; Random rnd = new Random(); int offset = rnd.Next(10, 100); SiteStructs.LatLong latlong = GeoData.GetLatLongForCountryPostal(uad.Country, uad.PostalCode); if (latlong.latitude != 0 && latlong.longitude != 0) { model.Latitude = Convert.ToDecimal(latlong.latitude + Convert.ToDouble("0.00" + offset)).ToString(); model.Longitude = Convert.ToDecimal(latlong.longitude + Convert.ToDouble("0.00" + offset)).ToString(); } else { model.DisplayOnMap = false; } Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(currentLang); Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(currentLang); } ViewBag.ThumbIcon = uad.FullProfilePicThumbURL; LoadCurrentImagesViewBag(uad.UserAccountID); } ViewBag.UserAccountDetail = uad; ViewBag.UserAccount = ua; UserConnections ucons = new UserConnections(); ucons.GetUserConnections(ua.UserAccountID); ucons.Shuffle(); UserAccounts irlContacts = new UserAccounts(); UserAccounts CyberAssociates = new UserAccounts(); UserAccount userCon = null; foreach (UserConnection uc1 in ucons) { if (!uc1.IsConfirmed) continue; switch (uc1.StatusType) { case 'C': if (CyberAssociates.Count >= maxcountusers) continue; if (uc1.ToUserAccountID != ua.UserAccountID) { userCon = new UserAccount(uc1.ToUserAccountID); } else { userCon = new UserAccount(uc1.FromUserAccountID); } CyberAssociates.Add(userCon); break; case 'R': if (irlContacts.Count >= maxcountusers) continue; if (uc1.ToUserAccountID != ua.UserAccountID) { userCon = new UserAccount(uc1.ToUserAccountID); } else { userCon = new UserAccount(uc1.FromUserAccountID); } irlContacts.Add(userCon); break; default: break; } } if (irlContacts.Count > 0) { model.IRLFriendCount = irlContacts.Count; } if (CyberAssociates.Count > 0) { // ViewBag.CyberAssociatesCount = Convert.ToString( CyberAssociates.Count ); model.CyberFriendCount = CyberAssociates.Count; } mu = Membership.GetUser(); UserAccountDetail uadLooker = null; if (mu != null) { uadLooker = new UserAccountDetail(); uadLooker.GetUserAccountDeailForUser(Convert.ToInt32(mu.ProviderUserKey)); } if (mu != null && ua.UserAccountID > 0 && uadLooker.EnableProfileLogging && uad.EnableProfileLogging) { ProfileLog pl = new ProfileLog(); pl.LookedAtUserAccountID = ua.UserAccountID; pl.LookingUserAccountID = Convert.ToInt32(mu.ProviderUserKey); if (pl.LookingUserAccountID != pl.LookedAtUserAccountID) pl.Create(); ArrayList al = ProfileLog.GetRecentProfileViews(ua.UserAccountID); if (al != null && al.Count > 0) { UserAccounts uas = new UserAccounts(); UserAccount viewwer = null; foreach (int ID in al) { viewwer = new UserAccount(ID); if (!viewwer.IsLockedOut && viewwer.IsApproved) { if (uas.Count >= maxcountusers) break; uas.Add(viewwer); } } // model.ViewingUsers = uas.ToUnorderdList; } } UserAccountVideos uavs = null; if (ua.UserAccountID > 0) { uavs = new UserAccountVideos(); uavs.GetRecentUserAccountVideos(ua.UserAccountID, 'F'); if (uavs.Count > 0) { Videos favvids = new Videos(); Video f1 = new Video(); foreach (UserAccountVideo uav1 in uavs) { f1 = new Video(uav1.VideoID); if (f1.IsEnabled) favvids.Add(f1); } SongRecord sng1 = null; SongRecords sngrcds2 = new SongRecords(); foreach (Video v1 in favvids) { sng1 = new SongRecord(v1); sngrcds2.Add(sng1); } sngrcds2.IsUserSelected = true; ViewBag.UserFavorites = sngrcds2.VideosList();//.ListOfVideos(); } } // this is either a youtube user or this is a band Artist art = new Artist( ); art.GetArtistByAltname(userName); if (art.ArtistID > 0) { // try this way for dashers model.UserName = art.Name; } Videos vids = new Videos(); SongRecords sngrs = new SongRecords(); if (art.ArtistID == 0) { vids.GetAllVideosByUser(userName); uavs = new UserAccountVideos(); uavs.GetRecentUserAccountVideos(ua.UserAccountID, 'U'); Video f2 = null; foreach (UserAccountVideo uav1 in uavs) { f2 = new Video(uav1.VideoID); if (!vids.Contains(f2)) vids.Add(f2); } vids.Sort((Video x, Video y) => (y.PublishDate.CompareTo(x.PublishDate))); model.UserName = userName; } else { // photo ArtistProperty aprop = new ArtistProperty(); aprop.GetArtistPropertyForTypeArtist(art.ArtistID, SiteEnums.ArtistPropertyType.PH.ToString()); if (!string.IsNullOrEmpty(aprop.PropertyContent)) { ViewBag.ArtistPhoto = System.Web.VirtualPathUtility.ToAbsolute(aprop.PropertyContent); ViewBag.ThumbIcon = System.Web.VirtualPathUtility.ToAbsolute(aprop.PropertyContent); } // meta descriptione aprop = new ArtistProperty(); aprop.GetArtistPropertyForTypeArtist(art.ArtistID, SiteEnums.ArtistPropertyType.MD.ToString()); if (!string.IsNullOrEmpty(aprop.PropertyContent)) ViewBag.MetaDescription = aprop.PropertyContent; // description aprop = new ArtistProperty(); aprop.GetArtistPropertyForTypeArtist(art.ArtistID, SiteEnums.ArtistPropertyType.LD.ToString()); if (!string.IsNullOrEmpty(aprop.PropertyContent)) ViewBag.ArtistDescription = ContentLinker.InsertBandLinks(aprop.PropertyContent, false); #region rss ///// rss //RssResources rssrs = new RssResources(); //rssrs.GetArtistRssResource(art.ArtistID); //if (rssrs.Count > 0) //{ // RssItems ritems = new RssItems(); // RssItems ritemsOUT = new RssItems(); // foreach (RssResource rssre in rssrs) // { // ritems.GetTopRssItemsForResource(rssre.RssResourceID); // //ritm = new RssItem(rssre..ArtistID); // } // ritems.Sort((RssItem x, RssItem y) => (y.PubDate.CompareTo(x.PubDate))); // foreach (RssItem ritm in ritems) // { // if (ritemsOUT.Count < 10) // { // ritemsOUT.Add(ritm); // } // } // ViewBag.ArtistNews = ritemsOUT.ToUnorderdList; //} //else //{ // ViewBag.ArtistNews = null; //} //ViewBag.DisplayName = art.DisplayName; #endregion Songs sngss = new Songs(); sngss.GetSongsForArtist(art.ArtistID); SongRecord snrcd = new SongRecord(); foreach (Song sn1 in sngss) { vids.GetVideosForSong(sn1.SongID); } } vids.Sort(delegate(Video p1, Video p2) { return p2.PublishDate.CompareTo(p1.PublishDate); }); foreach (BootBaronLib.AppSpec.DasKlub.BOL.Video v1 in vids) { sngrs.Add(new SongRecord(v1)); } if (mu != null && ua.UserAccountID != Convert.ToInt32(mu.ProviderUserKey)) { UserConnection uc1 = new UserConnection(); uc1.GetUserToUserConnection(ua.UserAccountID, Convert.ToInt32(mu.ProviderUserKey)); if (uc1.UserConnectionID > 0) { switch (uc1.StatusType) { case 'C': if (uc1.IsConfirmed) { model.IsCyberFriend = true; } else { model.IsWatingToBeCyberFriend = true; } break; case 'R': if (uc1.IsConfirmed) { model.IsRealFriend = true; } else { model.IsWatingToBeRealFriend = true; } break; default: model.IsDeniedCyberFriend = true; model.IsDeniedRealFriend = true; break; } } } if (sngrs == null || sngrs.Count == 0 && art.ArtistID == 0 && ua.UserAccountID == 0) { // no longer exists Response.RedirectPermanent("/"); return new EmptyResult(); } //sngrs.Sort((SongRecord x, SongRecord y) => (y.cre.CompareTo(x.CreateDate))); SongRecords sngDisplay = new SongRecords(); Video vidToShow = null; foreach (SongRecord sr1 in sngrs) { vidToShow = new Video(sr1.VideoID); if (vidToShow.IsEnabled) { sngDisplay.Add(sr1); } } model.SongRecords = sngDisplay.VideosList(); return View(model); }