コード例 #1
0
        private void CountTotal(string name)
        {
            ShareActivitySearch query = new ShareActivitySearch
            {
                status     = ShareActivityStatus.All,
                IsCount    = true,
                PageIndex  = this.pager1.PageIndex,
                PageSize   = this.pager1.PageSize,
                SortBy     = "Id",
                SortOrder  = SortAction.Desc,
                CouponName = name
            };
            DataTable data = (DataTable)ShareActHelper.Query(query).Data;

            this.lblAll.Text     = (data != null) ? data.Rows.Count.ToString() : "0";
            query.status         = ShareActivityStatus.In;
            data                 = (DataTable)ShareActHelper.Query(query).Data;
            this.lblIn.Text      = (data != null) ? data.Rows.Count.ToString() : "0";
            query.status         = ShareActivityStatus.End;
            data                 = (DataTable)ShareActHelper.Query(query).Data;
            this.lblEnd.Text     = (data != null) ? data.Rows.Count.ToString() : "0";
            query.status         = ShareActivityStatus.unBegin;
            data                 = (DataTable)ShareActHelper.Query(query).Data;
            this.lblUnBegin.Text = (data != null) ? data.Rows.Count.ToString() : "0";
        }
コード例 #2
0
        private void CountTotal(string name)
        {
            ShareActivitySearch shareActivitySearch = new ShareActivitySearch();

            shareActivitySearch.status     = ShareActivityStatus.All;
            shareActivitySearch.IsCount    = true;
            shareActivitySearch.PageIndex  = this.pager1.PageIndex;
            shareActivitySearch.PageSize   = this.pager1.PageSize;
            shareActivitySearch.SortBy     = "Id";
            shareActivitySearch.SortOrder  = SortAction.Desc;
            shareActivitySearch.CouponName = name;
            DbQueryResult dbQueryResult = ShareActHelper.Query(shareActivitySearch);

            System.Data.DataTable dataTable = (System.Data.DataTable)dbQueryResult.Data;
            this.lblAll.Text           = ((dataTable != null) ? dataTable.Rows.Count.ToString() : "0");
            shareActivitySearch.status = ShareActivityStatus.In;
            dbQueryResult              = ShareActHelper.Query(shareActivitySearch);
            dataTable                  = (System.Data.DataTable)dbQueryResult.Data;
            this.lblIn.Text            = ((dataTable != null) ? dataTable.Rows.Count.ToString() : "0");
            shareActivitySearch.status = ShareActivityStatus.End;
            dbQueryResult              = ShareActHelper.Query(shareActivitySearch);
            dataTable                  = (System.Data.DataTable)dbQueryResult.Data;
            this.lblEnd.Text           = ((dataTable != null) ? dataTable.Rows.Count.ToString() : "0");
            shareActivitySearch.status = ShareActivityStatus.unBegin;
            dbQueryResult              = ShareActHelper.Query(shareActivitySearch);
            dataTable                  = (System.Data.DataTable)dbQueryResult.Data;
            this.lblUnBegin.Text       = ((dataTable != null) ? dataTable.Rows.Count.ToString() : "0");
        }
コード例 #3
0
        private void BindData()
        {
            string        text          = this.txt_name.Text.Trim();
            DbQueryResult dbQueryResult = ShareActHelper.Query(new ShareActivitySearch
            {
                status     = this.status,
                IsCount    = true,
                PageIndex  = this.pager1.PageIndex,
                PageSize   = this.pager1.PageSize,
                SortBy     = "Id",
                SortOrder  = SortAction.Desc,
                CouponName = text
            });

            System.Data.DataTable dataSource = (System.Data.DataTable)dbQueryResult.Data;
            this.grdDate.DataSource = dataSource;
            this.grdDate.DataBind();
            this.pager1.TotalRecords = dbQueryResult.TotalRecords;
            this.CountTotal(text);
        }
コード例 #4
0
        private void BindData()
        {
            string name = this.txt_name.Text.Trim();
            ShareActivitySearch query = new ShareActivitySearch {
                status     = this.status,
                IsCount    = true,
                PageIndex  = this.pager1.PageIndex,
                PageSize   = this.pager1.PageSize,
                SortBy     = "Id",
                SortOrder  = SortAction.Desc,
                CouponName = name
            };
            DbQueryResult result = ShareActHelper.Query(query);
            DataTable     data   = (DataTable)result.Data;

            this.grdDate.DataSource = data;
            this.grdDate.DataBind();
            this.pager1.TotalRecords = result.TotalRecords;
            this.CountTotal(name);
        }