示例#1
0
        private void LoadPostSaleData()
        {
            PostSaleCount = EbayTransactionDAL.GetPendingOrdersCount(0);
            int postSalePageCnt = PostSaleCount / PostSalePageSize + 1;

            if (CurrentPostSalePage < 1)
            {
                CurrentPostSalePage = 1;
            }
            else if (CurrentPostSalePage > postSalePageCnt)
            {
                CurrentPostSalePage = postSalePageCnt;
            }

            this.buttonPostSaleFirstPage.Enabled = true;
            this.buttonPostSaleLastPage.Enabled  = true;
            this.buttonPostSalePrevPage.Enabled  = true;
            this.buttonPostSaleNextPage.Enabled  = true;

            if (CurrentPostSalePage == 1)
            {
                this.buttonPostSaleFirstPage.Enabled = false;
                this.buttonPostSalePrevPage.Enabled  = false;
            }
            if (CurrentPostSalePage == postSalePageCnt)
            {
                this.buttonPostSaleLastPage.Enabled = false;
                this.buttonPostSaleNextPage.Enabled = false;
            }

            this.labelPostSalePage.Text = string.Format("{0} / {1}", CurrentPostSalePage, postSalePageCnt);

            AllPostSaleOrdersCacheTable          = EbayTransactionDAL.GetPagedPendingOrders(CurrentPostSalePage, PostSalePageSize, 0);
            this.dataGridViewPostSale.DataSource = AllPostSaleOrdersCacheTable;
        }