예제 #1
0
        private void InitBind(string table)
        {
            if (Session["sConn"] == null)
            {
                return;
            }
            ToolBll _bll = new ToolBll(Session["sConn"].ToString());
            DataSet ds   = _bll.getDataTopList(table);

            if (ds != null)
            {
                gvDataList.DataSource = ds.Tables[0];
                gvDataList.DataBind();
                litName.Text = tName + mName;
                if (gvDataList.PageCount > 1)
                {
                    litPage.Text = "页码:" + (gvDataList.PageIndex + 1) + "/" + gvDataList.PageCount;
                }
                hidTableName.Value = table;
            }
        }