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

            using (appDac = new BoardDac())
            {
                DataSet ds = null;
                if (Request["sn"] != null)
                {
                    ds = appDac.CreateReadBoardData(Request["sn"].ToString());
                }
                else
                {
                    ds = appDac.CreateReadBoardData("1");
                }

                dtList = ds.Tables[0];
                sn     = Request["sn"].ToString();
            }

            if (dtList != null)
            {
                DataRow[] rows = dtList.Select();


                if (Request["sn"] != null)
                {
                    writer   = rows[0]["writer"].ToString();
                    time     = rows[0]["reg_date"].ToString();
                    title    = rows[0]["title"].ToString();
                    contents = rows[0]["message"].ToString();
                }
            }
        }
Exemplo n.º 2
0
        private void BindingList()
        {
            DataTable dtList = null;

            using (appDac = new BoardDac())
            {
                DataSet ds = null;
                if (Request["sn"] != null)
                {
                    ds = appDac.CreateReadBoardData(Request["sn"].ToString());
                }
                else
                {
                    ds = appDac.CreateReadBoardData("1");
                }

                dtList = ds.Tables[0];
                sn     = Request["sn"].ToString();
            }

            if (dtList != null)
            {
                //writer
                //time
                //title
                //contents

                DataRow[] rows = dtList.Select();

                // Print the value one column of each DataRow.
                //for (int i = 0; i < rows.Length; i++)
                //{
                //    string temp =rows[i]["writer"].ToString();
                //}
                if (Request["sn"] != null)
                {
                    writer   = rows[0]["writer"].ToString();
                    time     = rows[0]["reg_date"].ToString();
                    title    = rows[0]["title"].ToString();
                    contents = rows[0]["message"].ToString();
                }
            }
        }
Exemplo n.º 3
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;
            }
        }