void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions serviceoptions = new ServiceQueryOptions(gridManage.PageSize, gridManage.CurrentPageIndex);

        gridManage.DataSource = SessionManager.GetCollection <TransitPlace, string, string, string>(
            GroupName, PropertyName, PropertyValue, serviceoptions, SessionManager.PlaceService.GetPlacesByPropertyValue);
    }
Ejemplo n.º 2
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions serviceoptions = new ServiceQueryOptions(gridManage.PageSize, gridManage.CurrentPageIndex);

        gridManage.DataSource = SessionManager.GetCollection <TransitRefererAccount>(
            serviceoptions, SessionManager.StatsService.GetRefererAccounts);
    }
Ejemplo n.º 3
0
    void picturesView_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(picturesView.PageSize, picturesView.CurrentPageIndex);

        picturesView.DataSource = SessionManager.GetCollection <TransitPlacePicture, int>(
            PlaceId, options, SessionManager.PlaceService.GetPlacePictures);
    }
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(gridManage.PageSize, gridManage.CurrentPageIndex);

        gridManage.DataSource = SessionManager.GetCollection <TransitAccountBlogPost, TransitAccountBlogPostQueryOptions>(
            GetBlogPostsOptions(), options, SessionManager.BlogService.GetAccountBlogPosts);
    }
Ejemplo n.º 5
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(gridManage.PageSize, gridManage.CurrentPageIndex);

        gridManage.DataSource = SessionManager.GetCollection <TransitDiscussion, string, int>(
            "AccountGroup", RequestId, options, SessionManager.DiscussionService.GetDiscussionsByObjectId);
    }
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(gridManage.PageSize, gridManage.CurrentPageIndex);

        gridManage.DataSource = SessionManager.DiscussionService.GetAccountDiscussions(
            SessionManager.Ticket, SessionManager.AccountId, options);
    }
Ejemplo n.º 7
0
    private void GetData()
    {
        ServiceQueryOptions serviceoptions = new ServiceQueryOptions();

        serviceoptions.PageSize = accounts.RepeatColumns;

        // accounts
        accounts.DataSource = SessionManager.GetCollection <TransitFeature, string>(
            "Account", serviceoptions, SessionManager.ObjectService.GetFeatures);
        accounts.DataBind();

        // places
        places.DataSource = SessionManager.GetCollection <TransitFeature, string>(
            "Place", serviceoptions, SessionManager.ObjectService.GetFeatures);
        places.DataBind();

        // feeds
        accountfeeds.DataSource = SessionManager.GetCollection <TransitFeature, string>(
            "AccountFeed", serviceoptions, SessionManager.ObjectService.GetFeatures);
        accountfeeds.DataBind();

        // events
        TransitAccountEventInstanceQueryOptions eventoptions = new TransitAccountEventInstanceQueryOptions();

        eventoptions.StartDateTime = DateTime.UtcNow;
        eventoptions.EndDateTime   = DateTime.MaxValue;
        accountevents.DataSource   = SessionManager.GetCollection <TransitAccountEventInstance, TransitAccountEventInstanceQueryOptions>(
            eventoptions, serviceoptions, SessionManager.EventService.GetAccountEventInstances);
        accountevents.DataBind();
    }
Ejemplo n.º 8
0
    public void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            int pagenumber = int.Parse(Request["PageNumber"]);
            int pagecount  = int.Parse(Request["PageCount"]);
            int pagesize   = int.Parse(Request["PageSize"]);

            ServiceQueryOptions serviceoptions = new ServiceQueryOptions();
            serviceoptions.PageSize   = pagesize;
            serviceoptions.PageNumber = pagenumber;

            TransitAccountFeedQueryOptions options = new TransitAccountFeedQueryOptions();
            gridManage.DataSource = SessionManager.SyndicationService.GetAccountFeeds(
                SessionManager.Ticket, options, serviceoptions);
            gridManage.DataBind();

            if (pagenumber > 0)
            {
                linkPrev.HRef = string.Format("AccountFeedsViewList.aspx?PageNumber={0}&PageSize={1}&PageCount={2}",
                                              pagenumber - 1, pagesize, pagecount);
            }

            if (pagenumber < pagecount - 1)
            {
                linkNext.HRef = string.Format("AccountFeedsViewList.aspx?PageNumber={0}&PageSize={1}&PageCount={2}",
                                              pagenumber + 1, pagesize, pagecount);
            }
        }
    }
Ejemplo n.º 9
0
    public string GetReplies(int post_id, int thread_id)
    {
        StringBuilder result = new StringBuilder();

        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber = 0;
        options.PageSize   = 3;
        IList <TransitDiscussionPost> items = SessionManager.GetCollection <TransitDiscussionPost, int>(
            thread_id, options, SessionManager.DiscussionService.GetDiscussionThreadPostsByOrder);

        foreach (TransitDiscussionPost t_instance in items)
        {
            if (t_instance.Id == post_id)
            {
                continue;
            }

            result.Append(string.Format("<div>&#187; <b>{0}</b> replied {1}</a></div>",
                                        Renderer.Render(t_instance.AccountName),
                                        SessionManager.ToAdjustedString(t_instance.Created)));
        }

        if (result.Length > 0)
        {
            result.Insert(0, "<div class=\"sncore_message_reply\">");
            result.Append("</div>");
        }

        return(result.ToString());
    }
Ejemplo n.º 10
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        TransitAccountFeedItemQueryOptions options = GetQueryOptions();

        ServiceQueryOptions serviceoptions = new ServiceQueryOptions();

        serviceoptions.PageSize   = gridManage.PageSize;
        serviceoptions.PageNumber = gridManage.CurrentPageIndex;
        gridManage.DataSource     = SessionManager.GetCollection <TransitAccountFeedItem, TransitAccountFeedItemQueryOptions>(
            options, serviceoptions, SessionManager.SyndicationService.GetAllAccountFeedItems);

        string queryargs = string.Format("city={0}&country={1}&state={2}&search={3}&page={4}",
                                         Renderer.UrlEncode(options.City),
                                         Renderer.UrlEncode(options.Country),
                                         Renderer.UrlEncode(options.State),
                                         Renderer.UrlEncode(options.Search),
                                         gridManage.CurrentPageIndex);

        if (((SnCoreMasterPage)Master).ScriptManager.IsInAsyncPostBack &&
            !((SnCoreMasterPage)Master).ScriptManager.IsNavigating)
        {
            NameValueCollection history = new NameValueCollection();
            history.Add("city", options.City);
            history.Add("country", options.Country);
            history.Add("state", options.State);
            history.Add("search", options.Search);
            history.Add("page", gridManage.CurrentPageIndex.ToString());
            ((SnCoreMasterPage)Master).ScriptManager.AddHistoryPoint(history, Page.Title);
        }

        linkRelRss.NavigateUrl    = string.Format("AccountFeedItemsRss.aspx?{0}", queryargs);
        linkPermalink.NavigateUrl = string.Format("AccountFeedItemsView.aspx?{0}", queryargs);

        panelLinks.Update();
    }
Ejemplo n.º 11
0
    public void linkLookup_Click(object sender, EventArgs e)
    {
        panelLookup.Update();

        if (string.IsNullOrEmpty(inputName.Text))
        {
            labelLookupError.Visible = true;
            labelLookupError.Text    = "&#187; please enter a name.";
            return;
        }

        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber          = 0;
        options.PageSize            = 6;
        gridLookupPlaces.DataSource = SessionManager.GetCollection <TransitPlace, string>(
            inputName.Text, options, SessionManager.PlaceService.SearchPlaces);
        gridLookupPlaces.DataBind();

        if (gridLookupPlaces.Items.Count == 0)
        {
            panelLookupContents.Visible = false;
            labelLookupError.Visible    = true;
            labelLookupError.Text       = string.Format("&#187; no places matching '{0}'",
                                                        base.Render(inputName.Text));
        }
        else
        {
            panelLookupContents.Visible = true;
            labelLookupError.Visible    = false;
        }
    }
Ejemplo n.º 12
0
 /// ticket + arg1 + arg2 + arg3 + ServiceQueryOptions
 public IList <TransitType> GetPrivateCollection <TransitType, ArgType1, ArgType2, ArgType3>(
     ArgType1 arg1, ArgType2 arg2, ArgType3 arg3, ServiceQueryOptions options,
     WebClientImpl <TransitType> .GetCollectionDelegate <ArgType1, ArgType2, ArgType3> functor)
 {
     return(WebClientImpl <TransitType> .GetCollection <ArgType1, ArgType2, ArgType3>(
                Ticket, arg1, arg2, arg3, options, functor, Cache, DefaultCacheTimeSpan, Ticket));
 }
Ejemplo n.º 13
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        if (!HasRows)
        {
            return;
        }

        gridManage.RepeatRows = mDefaultViewRows.HasValue ? mDefaultViewRows.Value : GetDiscussion().DefaultViewRows;
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber = gridManage.CurrentPageIndex;
        options.PageSize   = gridManage.PageSize;

        DiscussionViewTypes type = GetDiscussionViewType();

        switch (type)
        {
        case DiscussionViewTypes.FlatWithNewestOnTop:
        case DiscussionViewTypes.FlatFullWithNewestOnTop:
            gridManage.DataSource = SessionManager.GetCollection <TransitDiscussionPost, int>(
                DiscussionId, options, SessionManager.DiscussionService.GetLatestDiscussionPostsById);
            break;

        case DiscussionViewTypes.ThreadedWithNewestOnTop:
        case DiscussionViewTypes.ThreadedFullWithNewestOnTop:
        default:
            gridManage.DataSource = SessionManager.GetCollection <TransitDiscussionPost, int>(
                DiscussionId, options, SessionManager.DiscussionService.GetDiscussionThreadsByDiscussionId);
            break;
        }
    }
Ejemplo n.º 14
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ServiceQueryOptions options = new ServiceQueryOptions();
         options.PageNumber = 0;
         options.PageSize   = 10;
         // get new members
         rssRepeaterMembers.DataSource = SessionManager.GetCollection <TransitAccountGroupAccount, int>(
             AccountGroupId, options, SessionManager.GroupService.GetAccountGroupAccounts);
         rssRepeaterMembers.DataBind();
         // get new places
         rssRepeaterPlaces.DataSource = SessionManager.GetCollection <TransitAccountGroupPlace, int>(
             AccountGroupId, options, SessionManager.GroupService.GetAccountGroupPlaces);
         rssRepeaterPlaces.DataBind();
         // get new discussion posts
         discussionsRss.ObjectId = RequestId;
         discussionsRss.Type     = "AccountGroup";
         // get new blog posts
         if (AccountGroup.AccountBlogId > 0)
         {
             rssRepeaterBlogItems.DataSource = SessionManager.GetCollection <TransitAccountBlogPost, TransitAccountBlogPostQueryOptions>(
                 GetBlogPostsOptions(), options, SessionManager.BlogService.GetAccountBlogPosts);
             rssRepeaterBlogItems.DataBind();
         }
     }
 }
Ejemplo n.º 15
0
 void listSent_OnGetDataSource(object sender, EventArgs e)
 {
     ServiceQueryOptions options = new ServiceQueryOptions();
     options.PageNumber = listSent.CurrentPageIndex;
     options.PageSize = listSent.PageSize;
     listSent.DataSource = SessionManager.SocialService.GetSentAccountFriendRequests(
         SessionManager.Ticket, SessionManager.AccountId, options);
 }
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber    = gridManage.CurrentPageIndex;
        options.PageSize      = gridManage.PageSize;
        gridManage.DataSource = SessionManager.MarketingService.GetCampaigns(SessionManager.Ticket, options);
    }
Ejemplo n.º 17
0
    void queue_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber = queue.CurrentPageIndex;
        options.PageSize   = queue.PageSize;
        queue.DataSource   = SessionManager.PlaceService.GetPlaceQueueItems(SessionManager.Ticket, RequestId, options);
    }
Ejemplo n.º 18
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions serviceoptions = new ServiceQueryOptions(gridManage.PageSize, gridManage.CurrentPageIndex);

        gridManage.DataSource = SessionManager.GetCollection <TransitAccountGroup>(
            serviceoptions, SessionManager.GroupService.GetAccountGroups);
        panelLinks.Update();
    }
Ejemplo n.º 19
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(gridManage.PageSize, gridManage.CurrentPageIndex);

        gridManage.DataSource = SessionManager.GetCollection <TransitAccount, string, string, string>(
            Request["GroupName"], Request["PropertyName"], Request["PropertyValue"], options,
            SessionManager.AccountService.GetAccountsByPropertyValue);
    }
Ejemplo n.º 20
0
    void accountWebsites_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(accountWebsites.PageSize, accountWebsites.CurrentPageIndex);

        accountWebsites.DataSource = SessionManager.GetCollection <TransitAccountWebsite, int>(
            AccountId, options, SessionManager.AccountService.GetAccountWebsites);
        panelGrid.Update();
    }
    void placesList_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(placesList.PageSize, placesList.CurrentPageIndex);

        placesList.DataSource = SessionManager.GetCollection <TransitAccountPlace, int>(
            AccountId, options, SessionManager.PlaceService.GetAccountPlaces);
        panelGrid.Update();
    }
    void PlaceWebsites_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions(PlaceWebsites.PageSize, PlaceWebsites.CurrentPageIndex);

        PlaceWebsites.DataSource = SessionManager.GetCollection <TransitPlaceWebsite, int>(
            PlaceId, options, SessionManager.PlaceService.GetPlaceWebsites);
        panelGrid.Update();
    }
Ejemplo n.º 23
0
    void gridManageFavorites_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions serviceoptions = new ServiceQueryOptions(
            gridManageFavorites.PageSize, gridManageFavorites.CurrentPageIndex);

        gridManageFavorites.DataSource = SessionManager.GetCollection <TransitPlace>(
            serviceoptions, SessionManager.PlaceService.GetFavoritePlaces);
    }
Ejemplo n.º 24
0
    public ServiceQueryOptions GetServiceQueryOptions()
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber = Grid.CurrentPageIndex;
        options.PageSize   = Grid.PageSize;
        return(options);
    }
Ejemplo n.º 25
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageSize      = gridManage.PageSize;
        options.PageNumber    = gridManage.CurrentPageIndex;
        gridManage.DataSource = SessionManager.AccountService.GetAllAccountRedirects(SessionManager.Ticket, options);
    }
Ejemplo n.º 26
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber    = gridManage.CurrentPageIndex;
        options.PageSize      = gridManage.PageSize;
        gridManage.DataSource = SessionManager.GetCollection <TransitAccountFriend, TransitAccountFriendQueryOptions>(
            GetOptions(), options, SessionManager.SocialService.GetAccountFriends);
    }
Ejemplo n.º 27
0
    void accountSurveyAnswers_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageSize   = accountSurveyAnswers.PageSize;
        options.PageNumber = accountSurveyAnswers.CurrentPageIndex;
        accountSurveyAnswers.DataSource = SessionManager.GetCollection <TransitAccountSurveyAnswer, int>(
            SurveyQuestionId, options, SessionManager.AccountService.GetAccountSurveyAnswersByQuestionId);
    }
Ejemplo n.º 28
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions serviceoptions = new ServiceQueryOptions();

        serviceoptions.PageSize   = gridManage.PageSize;
        serviceoptions.PageNumber = gridManage.CurrentPageIndex;
        gridManage.DataSource     = SessionManager.GetCollection <TransitFeature, string>(
            "AccountGroup", serviceoptions, SessionManager.ObjectService.GetFeatures);
    }
Ejemplo n.º 29
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber    = gridManage.CurrentPageIndex;
        options.PageSize      = gridManage.PageSize;
        gridManage.DataSource = SessionManager.PlaceService.GetPlaceChangeRequestsByPlaceId(
            SessionManager.Ticket, RequestId, options);
    }
    void listPending_OnGetDataSource(object sender, EventArgs e)
    {
        ServiceQueryOptions options = new ServiceQueryOptions();

        options.PageNumber     = listPending.CurrentPageIndex;
        options.PageSize       = listPending.PageSize;
        listPending.DataSource = SessionManager.GroupService.GetAccountGroupAccountInvitationsByAccountId(
            SessionManager.Ticket, SessionManager.AccountId, options);
    }