Beispiel #1
0
        protected void PRFileListBind(string df_id)
        {
            string fieldNames, whereClause, orderBy;

            fieldNames  = "df_id,dfOrder,dfName,dfDescription,dfOriginName";
            whereClause = "df_id=" + df_id;
            orderBy     = "dfOrder ASC";
            dbUtil      = new DBLib();
            dsPR        = dbUtil.Select_DS(fieldNames, "t_DocFileAssets", whereClause, orderBy);
            dbUtil.SqlConnection.Close();
        }
Beispiel #2
0
        protected void PR_Bind()
        {
            string fieldNames, whereClause, orderBy;

            fieldNames  = "da_id,daName,daDescription";
            whereClause = "daStatus = 255 And daType='기업투자(IR)'";             //
            if (tbSearchString.Text.Trim() != "")
            {
                Paging.Self.SetCurrentPage(1);
                string search = HTML.ReplaceToDB(tbSearchString.Text);
                whereClause += " AND (daName LIKE '%" + search + "%'";
                whereClause += " OR daDescription LIKE '%" + search + "%')";
                //Response.Write("tbSearchString.Text=>> " + tbSearchString.Text);
            }

            orderBy = "da_id DESC";
            string subQryOrderBy = "da_id ASC";                 //orderBy와 반대

            //페이지사이즈초기화
            int topCnt;

            topCnt = Paging.Self.PageSize(10);
            dbUtil = new DBLib();
            //총레코드수 저장
            Paging.Self.TotRecordCount = dbUtil.GetRecordCount("t_DocumentAssets", whereClause);
            //상관쿼리 설정, AbsolutePage와 같은 역활을 한다. 실 쿼리실행 이전에 설정해야 한다//Paging.Self.SetPagePortion();
            //실제쿼리실행
            dsPR = dbUtil.Select_DS(topCnt, fieldNames, "t_DocumentAssets", whereClause, orderBy, Paging.Self.SetPagePortion(), subQryOrderBy);
            dbUtil.SqlConnection.Close();

            if (dsPR.Tables["t_DocumentAssets"].Rows.Count > 0)
            {
                this.rptPR.DataSource = dsPR.Tables["t_DocumentAssets"];
                this.rptPR.DataBind();
                rptPR.Visible        = true;
                InfoMessages.Visible = false;
            }
            else
            {
                rptPR.Visible = false;
                //에러유져컨트롤 바인딩
                //InfoMessages.LoadControl("../InfoMessages/InfoMessages.ascx");
                Literal lit        = (Literal)InfoMessages.FindControl("litMsg");
                Literal litDetails = (Literal)InfoMessages.FindControl("litDetails");
                lit.Text             = "자료가 없습니다.";
                litDetails.Text      = SearchResultDisplay(this.tbSearchString.Text);
                InfoMessages.Visible = true;
                //Response.Write(InfoMessages.);
            }
        }