void gridManage_OnGetDataSource(object sender, EventArgs e)
 {
     SyndicationService.TransitAccountFeedItemQueryOptions options = GetQueryOptions();
     SyndicationService.ServiceQueryOptions serviceoptions         = new SyndicationService.ServiceQueryOptions();
     serviceoptions.PageSize   = gridManage.PageSize;
     serviceoptions.PageNumber = gridManage.CurrentPageIndex;
     gridManage.DataSource     = SessionManager.GetCollection <SyndicationService.TransitAccountFeedItem, SyndicationService.ServiceQueryOptions, SyndicationService.TransitAccountFeedItemQueryOptions>(
         options, serviceoptions, SessionManager.SyndicationService.GetAllAccountFeedItems);
 }
 private SyndicationService.TransitAccountFeedItemQueryOptions GetQueryOptions()
 {
     SyndicationService.TransitAccountFeedItemQueryOptions options = new SyndicationService.TransitAccountFeedItemQueryOptions();
     options.PublishedOnly = true;
     options.City          = inputCity.Text;
     options.Country       = inputCountry.Text;
     options.State         = inputState.Text;
     return(options);
 }
Esempio n. 3
0
 private SyndicationService.TransitAccountFeedItemQueryOptions GetQueryOptions()
 {
     SyndicationService.TransitAccountFeedItemQueryOptions options = new SyndicationService.TransitAccountFeedItemQueryOptions();
     options.PublishedOnly = true;
     options.City = inputCity.Text;
     options.Country = inputCountry.Text;
     options.State = inputState.Text;
     return options;
 }
    private void GetData(object sender, EventArgs e)
    {
        SyndicationService.TransitAccountFeedItemQueryOptions options = GetQueryOptions();

        gridManage.CurrentPageIndex = 0;

        gridManage.VirtualItemCount = SessionManager.GetCount <
            SyndicationService.TransitAccountFeedItem, SyndicationService.ServiceQueryOptions, SyndicationService.TransitAccountFeedItemQueryOptions>(
            options, SessionManager.SyndicationService.GetAllAccountFeedItemsCount);

        SyndicationService.TransitAccountFeedQueryOptions feed_options = new SyndicationService.TransitAccountFeedQueryOptions();
        feed_options.PublishedOnly     = true;
        feed_options.PicturesOnly      = false;
        feed_options.City              = options.City;
        feed_options.State             = options.State;
        feed_options.Country           = options.Country;
        feed_options.WithFeedItemsOnly = true;

        gridManage_OnGetDataSource(this, null);
        gridManage.DataBind();
    }