Exemplo n.º 1
0
        private void BindingList()
        {
            DataTable dtList = null;

            using (appDac = new BoardDac())
            {
                DataSet ds = null;
                ds = appDac.CreateAppBaseInfo("1", writer, password, title, message, ref_id,
                                              inner_id, depth, read_count, del_flag, reg_date, delete_chid, out int totalCount, _TOPSIZE, this._page, this._searchKeyword);

                this.TotalCount = totalCount;
                dtList          = ds.Tables[0];
            }

            if (dtList != null)
            {
                if (this.TotalCount == 0)
                {
                    this.ltrNone.Text    = "<div style='text-align:center;margin:10px; padding-bottom:10px; border-bottom:1px solid #999;'>조회결과가 없습니다</div>";
                    this.rptList.Visible = false;
                }
                else
                {
                    this.rptList.DataSource = dtList;
                    this.rptList.DataBind();
                }

                //페이징 구성
                if (this.TotalCount > _TOPSIZE)
                {
                    this.ltrPaging.Text = Utility.GetPagingLinkSting2(_PAGESIZE,
                                                                      ((this.TotalCount % _TOPSIZE) > 0) ? this.TotalCount / _TOPSIZE + 1 : this.TotalCount / _TOPSIZE,
                                                                      this._page,
                                                                      Request.RawUrl,
                                                                      "page",
                                                                      "", "", "", "", "", "", "", "", "");
                }
                //Session["NowPageIndex"] = this._page;
            }
        }