Ejemplo n.º 1
0
        protected override void Render(HtmlTextWriter writer)
        {
            if (this._n4TotalRowCount <= 0)
                return;

            //이전 페이지 셋
            //throw new Exception(n4StartPage + "/" + _n4PageArraySize);
            if (this.n4StartPage > 1)
            {
                AtzLinker alBefore = new AtzLinker();
                alBefore.Attributes.Add("border","0");
                alBefore.strText = strPrevButtonText+" ";
                int n4Bf = this.n4StartPage - this._n4PageArraySize;
                n4Bf += this.n4StartPage % this._n4PageArraySize == 0 ? 1 : 0;
                alBefore.SetLink("n4PageNo", n4Bf.ToString());
                this.Controls.Add(alBefore);
            }

            // 숫자 페이저
            for (int i = this.n4StartPage; i <= this.n4EndPage; i++)
            {
                AtzLinker alPage = new AtzLinker();

                alPage.strText = i.ToString();//"["+i+"] ";
                alPage.strText = i == this.n4PageNo ? "<b>" + alPage.strText + "</b>" : alPage.strText;
                alPage.SetLink("n4PageNo", i.ToString());

                if (i > this.n4StartPage)
                {
                    Label lblSplit = new Label();
                    lblSplit.Text = strSplitter;
                    this.Controls.Add(lblSplit);
                }
                this.Controls.Add(alPage);
            }

            //throw new Exception(n4EndPage + "/" + n4PageCount);
            //다음 페이지 셋
            if (this.n4EndPage < this.n4PageCount)
            {
                AtzLinker alAfter = new AtzLinker();
                alAfter.strText = " "+strNextButtonText;
                alAfter.Attributes.Add("border", "0");
                alAfter.SetLink("n4PageNo", Convert.ToString(this.n4EndPage + 1));
                this.Controls.Add(alAfter);
            }

            base.Render(writer);
        }
Ejemplo n.º 2
0
        protected override void Render(HtmlTextWriter writer)
        {
            if (this._n4TotalRowCount <= 0)
                return;

            //이전 페이지 셋
            if (this.n4PageNo > 1)
            {
                AtzLinker alBefore = new AtzLinker();
                alBefore.strText = strPrevButtonText+" ";
                int n4Bf = this.n4PageNo-1;
                n4Bf += this.n4StartPage % this._n4PageArraySize == 0 ? 1 : 0;
                alBefore.SetLink("n4PageNo", n4Bf.ToString());
                this.Controls.Add(alBefore);
            }

            // 숫자 페이저

            Label alPage = new Label();

            alPage.Text = string.Format(" <span><b>{0}</b> / {1}</span> ", this.n4PageNo, this.n4PageCount);
            this.Controls.Add(alPage);

            //다음 페이지 셋
            if (this.n4PageNo < this.n4PageCount)
            {
                AtzLinker alAfter = new AtzLinker();
                alAfter.strText = " " + strNextButtonText;
                alAfter.SetLink("n4PageNo", Convert.ToString(this.n4PageNo + 1));
                this.Controls.Add(alAfter);
            }

            base.Render(writer);
        }