//更新列表 public void Flush() { CMS_Column bCol = new CMS_Column(); GVinfo.DataSource = bCol.GetList(""); GVinfo.DataBind(); }
public void FlushConnection(string sd) { String strConn = ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString; SqlConnection conn = new SqlConnection(strConn); SqlCommand cmd = new SqlCommand(sd, conn); conn.Open(); SqlDataReader dr = cmd.ExecuteReader(); GVinfo.DataSource = dr; GVinfo.DataBind(); conn.Close(); dr.Close(); }
public void FlushConnection() { String strConn = ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString; SqlConnection conn = new SqlConnection(strConn); string sd = "select newsTitle as 标题,pubTime as 时间,publisher as 发布者,readTimes as 阅读次数 from news"; SqlCommand cmd = new SqlCommand(sd, conn); conn.Open(); SqlDataReader dr = cmd.ExecuteReader(); GVinfo.DataSource = dr; GVinfo.DataBind(); conn.Close(); dr.Close(); }
// 更新列表 注意显示优先级 先排onTop desc 再按时间PostDate desc public void Flush(string strWhere) { if (strWhere == null) { strWhere = ""; } // 添加新闻后返回的页面 if (Session["pageIndex"] != null) { AspNetPager1.CurrentPageIndex = Convert.ToInt32(Session["pageIndex"]); } int ReCount = 0; DataSet ds; BLL.CMS_Article bAtc = new BLL.CMS_Article(); ds = bAtc.GetPageListWithColumn("onTop desc,PostDate desc", strWhere, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, ref ReCount); AspNetPager1.RecordCount = ReCount; GVinfo.DataSource = ds; GVinfo.DataBind(); }
public void Flush() { BLL.CMS_AdminUser bau = new BLL.CMS_AdminUser(); GVinfo.DataSource = bau.GetList(""); GVinfo.DataBind(); }
static int Id;//Id放外面原因:以修改为目的点击确定,需要获取GVinfo_RowCommand里Id号,否则一直是Id=0,导致更新失败 //更新列表 public void Flush() { BLL.CMS_FriendLink bfl = new BLL.CMS_FriendLink(); GVinfo.DataSource = bfl.GetList(""); GVinfo.DataBind(); }
public void Flush() { BLL.CMS_AdminRole bar = new BLL.CMS_AdminRole(); GVinfo.DataSource = bar.GetList(""); GVinfo.DataBind(); }