コード例 #1
0
ファイル: WebTagWordService.cs プロジェクト: qwdf1615/sncore
        public List <TransitTagWord> GetTagWords(string ticket, TransitTagWordQueryOptions queryoptions, ServiceQueryOptions options)
        {
            StringBuilder query = new StringBuilder();

            query.Append("SELECT word FROM TagWord word LEFT JOIN word.TagWordAccounts acct");
            query.Append(" GROUP BY word.Id, word.Promoted, word.Excluded, word.Word");
            switch (queryoptions)
            {
            case TransitTagWordQueryOptions.Excluded:
                query.Append(" WHERE Excluded = 1");
                break;

            case TransitTagWordQueryOptions.New:
                query.Append(" WHERE Excluded = 0 and Promoted = 0");
                break;

            case TransitTagWordQueryOptions.Promoted:
                query.Append(" WHERE Promoted = 1");
                break;
            }
            query.Append(" ORDER BY COUNT(acct) DESC");

            return(WebServiceImpl <TransitTagWord, ManagedTagWord, TagWord> .GetList(
                       ticket, options, query.ToString()));
        }
コード例 #2
0
ファイル: Reference.cs プロジェクト: qwdf1615/sncore
 public int GetTagWordsCount(string ticket, TransitTagWordQueryOptions queryoptions)
 {
     object[] results = this.Invoke("GetTagWordsCount", new object[] {
         ticket,
         queryoptions
     });
     return((int)(results[0]));
 }
コード例 #3
0
ファイル: Reference.cs プロジェクト: qwdf1615/sncore
 public TransitTagWord[] GetTagWords(string ticket, TransitTagWordQueryOptions queryoptions, ServiceQueryOptions options)
 {
     object[] results = this.Invoke("GetTagWords", new object[] {
         ticket,
         queryoptions,
         options
     });
     return((TransitTagWord[])(results[0]));
 }
コード例 #4
0
ファイル: Reference.cs プロジェクト: qwdf1615/sncore
 /// <remarks/>
 public void GetTagWordsCountAsync(string ticket, TransitTagWordQueryOptions queryoptions, object userState)
 {
     if ((this.GetTagWordsCountOperationCompleted == null))
     {
         this.GetTagWordsCountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetTagWordsCountOperationCompleted);
     }
     this.InvokeAsync("GetTagWordsCount", new object[] {
         ticket,
         queryoptions
     }, this.GetTagWordsCountOperationCompleted, userState);
 }
コード例 #5
0
    void gridManage_OnGetDataSource(object sender, EventArgs e)
    {
        TransitTagWordQueryOptions options = (TransitTagWordQueryOptions)
                                             Enum.Parse(typeof(TransitTagWordQueryOptions), listboxSelectType.SelectedValue);
        ServiceQueryOptions serviceoptions = new ServiceQueryOptions();

        serviceoptions.PageSize   = gridManage.PageSize;
        serviceoptions.PageNumber = gridManage.CurrentPageIndex;
        gridManage.DataSource     = SessionManager.TagWordService.GetTagWords(
            SessionManager.Ticket, options, serviceoptions);
    }
コード例 #6
0
    public void GetData(object sender, EventArgs e)
    {
        TransitTagWordQueryOptions options = (TransitTagWordQueryOptions)
                                             Enum.Parse(typeof(TransitTagWordQueryOptions), listboxSelectType.SelectedValue);

        gridManage.CurrentPageIndex = 0;
        gridManage.VirtualItemCount = SessionManager.TagWordService.GetTagWordsCount(
            SessionManager.Ticket, options);
        gridManage_OnGetDataSource(sender, e);
        gridManage.DataBind();
    }
コード例 #7
0
ファイル: WebTagWordService.cs プロジェクト: qwdf1615/sncore
        public int GetTagWordsCount(string ticket, TransitTagWordQueryOptions queryoptions)
        {
            string query = null;

            switch (queryoptions)
            {
            case TransitTagWordQueryOptions.Excluded:
                query = "WHERE TagWord.Excluded = 1";
                break;

            case TransitTagWordQueryOptions.New:
                query = "WHERE TagWord.Excluded = 0 and TagWord.Promoted = 0";
                break;

            case TransitTagWordQueryOptions.Promoted:
                query = "WHERE TagWord.Promoted = 1";
                break;
            }

            return(WebServiceImpl <TransitTagWord, ManagedTagWord, TagWord> .GetCount(
                       ticket, query.ToString()));
        }
コード例 #8
0
ファイル: WebTagWordService.cs プロジェクト: dblock/sncore
        public List<TransitTagWord> GetTagWords(string ticket, TransitTagWordQueryOptions queryoptions, ServiceQueryOptions options)
        {
            StringBuilder query = new StringBuilder();
            query.Append("SELECT word FROM TagWord word LEFT JOIN word.TagWordAccounts acct");
            query.Append(" GROUP BY word.Id, word.Promoted, word.Excluded, word.Word");
            switch(queryoptions)
            {
                case TransitTagWordQueryOptions.Excluded:
                    query.Append(" WHERE Excluded = 1");
                    break;
                case TransitTagWordQueryOptions.New:
                    query.Append(" WHERE Excluded = 0 and Promoted = 0");
                    break;
                case TransitTagWordQueryOptions.Promoted:
                    query.Append(" WHERE Promoted = 1");
                    break;
            }
            query.Append(" ORDER BY COUNT(acct) DESC");

            return WebServiceImpl<TransitTagWord, ManagedTagWord, TagWord>.GetList(
                ticket, options, query.ToString());
        }
コード例 #9
0
ファイル: Reference.cs プロジェクト: qwdf1615/sncore
 /// <remarks/>
 public void GetTagWordsCountAsync(string ticket, TransitTagWordQueryOptions queryoptions)
 {
     this.GetTagWordsCountAsync(ticket, queryoptions, null);
 }
コード例 #10
0
ファイル: Reference.cs プロジェクト: qwdf1615/sncore
 /// <remarks/>
 public void GetTagWordsAsync(string ticket, TransitTagWordQueryOptions queryoptions, ServiceQueryOptions options)
 {
     this.GetTagWordsAsync(ticket, queryoptions, options, null);
 }
コード例 #11
0
ファイル: Reference.cs プロジェクト: dblock/sncore
 /// <remarks/>
 public void GetTagWordsCountAsync(string ticket, TransitTagWordQueryOptions queryoptions, object userState) {
     if ((this.GetTagWordsCountOperationCompleted == null)) {
         this.GetTagWordsCountOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetTagWordsCountOperationCompleted);
     }
     this.InvokeAsync("GetTagWordsCount", new object[] {
                 ticket,
                 queryoptions}, this.GetTagWordsCountOperationCompleted, userState);
 }
コード例 #12
0
ファイル: Reference.cs プロジェクト: dblock/sncore
 /// <remarks/>
 public void GetTagWordsCountAsync(string ticket, TransitTagWordQueryOptions queryoptions) {
     this.GetTagWordsCountAsync(ticket, queryoptions, null);
 }
コード例 #13
0
ファイル: Reference.cs プロジェクト: dblock/sncore
 public int GetTagWordsCount(string ticket, TransitTagWordQueryOptions queryoptions) {
     object[] results = this.Invoke("GetTagWordsCount", new object[] {
                 ticket,
                 queryoptions});
     return ((int)(results[0]));
 }
コード例 #14
0
ファイル: Reference.cs プロジェクト: dblock/sncore
 /// <remarks/>
 public void GetTagWordsAsync(string ticket, TransitTagWordQueryOptions queryoptions, ServiceQueryOptions options) {
     this.GetTagWordsAsync(ticket, queryoptions, options, null);
 }
コード例 #15
0
ファイル: Reference.cs プロジェクト: dblock/sncore
 public TransitTagWord[] GetTagWords(string ticket, TransitTagWordQueryOptions queryoptions, ServiceQueryOptions options) {
     object[] results = this.Invoke("GetTagWords", new object[] {
                 ticket,
                 queryoptions,
                 options});
     return ((TransitTagWord[])(results[0]));
 }
コード例 #16
0
ファイル: WebTagWordService.cs プロジェクト: dblock/sncore
        public int GetTagWordsCount(string ticket, TransitTagWordQueryOptions queryoptions)
        {
            string query = null;
            switch (queryoptions)
            {
                case TransitTagWordQueryOptions.Excluded:
                    query = "WHERE TagWord.Excluded = 1";
                    break;
                case TransitTagWordQueryOptions.New:
                    query = "WHERE TagWord.Excluded = 0 and TagWord.Promoted = 0";
                    break;
                case TransitTagWordQueryOptions.Promoted:
                    query = "WHERE TagWord.Promoted = 1";
                    break;
            }

            return WebServiceImpl<TransitTagWord, ManagedTagWord, TagWord>.GetCount(
                ticket, query.ToString());
        }