protected void Page_Load(object sender, EventArgs e) { // if (!IsPostBack) // { //TODO: Pull data from notification aggregator // IList<INotification> cnNotifs = TelligentService.ReadFriendshipRequests(CurrentMember.ScreenName); List<INotification> cnNotifs = new List<INotification>(); //if (Notifications != null) // cnNotifs = Notifications; //else cnNotifs = TelligentService.GetNotifications(CurrentMember.ScreenName); //TelligentService.ReadFriendshipRequests("PosesTony"); Notifications = cnNotifs; if (cnNotifs != null && cnNotifs.Count() > 0) { pnlPolulatedNotifs.Visible = true; pnlEmptyNotifs.Visible = false; } else { pnlPolulatedNotifs.Visible = false; pnlEmptyNotifs.Visible = true; } FeedsCollection lnf = new FeedsCollection(cnNotifs); lvNotificationFeed.DataSource = lnf; lvNotificationFeed.DataBind(); // } }
protected void Page_Load(object sender, EventArgs e) { // if (!IsPostBack) // { //TODO: Pull data from notification aggregator // IList<INotification> cnNotifs = TelligentService.ReadFriendshipRequests(CurrentMember.ScreenName); List <INotification> cnNotifs = new List <INotification>(); //if (Notifications != null) // cnNotifs = Notifications; //else cnNotifs = TelligentService.GetNotifications(CurrentMember.ScreenName); //TelligentService.ReadFriendshipRequests("PosesTony"); Notifications = cnNotifs; if (cnNotifs != null && cnNotifs.Count() > 0) { pnlPolulatedNotifs.Visible = true; pnlEmptyNotifs.Visible = false; } else { pnlPolulatedNotifs.Visible = false; pnlEmptyNotifs.Visible = true; } FeedsCollection lnf = new FeedsCollection(cnNotifs); lvNotificationFeed.DataSource = lnf; lvNotificationFeed.DataBind(); // } }
/// <summary> /// Used to keep the internal structures in sync. with the feed list. /// Images from feeds that are not found anymore in the feeds collection, are deleted. /// New feeds, that do not have any infos about any image requests, will be added /// to an internal queue for later retrive/request the image(s). /// </summary> /// <param name="feeds"></param> public void Synchronize(FeedsCollection feeds) { if (!_loaded) { this.Load(); } if (_loaded) // issue while load { return; } }
public async Task CreateCollection(FeedsCollection collection) { await appContext.FeedsCollections.AddAsync(collection); await appContext.SaveChangesAsync(); }