Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     FileFunction.DataToExcel(NewsInfoService.Get_NewsInfoViewList(21), new string[] { "编号", "标题", "内容" }, "数据导出报表", "1234567");
     //GridView1.DataSource = NewsInfoService.Get_NewsInfoViewList(21);
     //GridView1.DataBind();
     //GridView1.Columns[2].Visible = true;
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int       tid    = Convert.ToInt32(Request.QueryString["tid"]);
         DataTable dtNews = NewsInfoService.Get_NewsInfoViewList(tid);
         ViewState["dtNews"] = dtNews;
     }
 }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Session["reportuser"] == null)
            {
                Response.Redirect("login.aspx");
            }

            rptReportList.DataSource = NewsInfoService.Get_NewsInfoViewList(6);
            rptReportList.DataBind();
        }
    }
    void binddata(int tid)
    {
        DataTable dt = NewsInfoService.Get_NewsInfoViewList(tid);

        AspNetPager1.RecordCount = dt.Rows.Count;
        if (dt.Rows.Count >= 0)
        {
            PagedDataSource ps = new PagedDataSource();
            DataView        dv = new DataView(dt);
            ps.DataSource        = dv;
            ps.AllowPaging       = true;
            ps.CurrentPageIndex  = AspNetPager1.CurrentPageIndex - 1;
            ps.PageSize          = AspNetPager1.PageSize;
            GridView1.DataSource = ps;
            GridView1.DataBind();
        }
    }
    void binddata(int tid, string startDate, string endDate)
    {
        DataTable dt = NewsInfoService.Get_NewsInfoViewList(tid, startDate, endDate);

        AspNetPager1.RecordCount = dt.Rows.Count;
        if (dt.Rows.Count >= 0)
        {
            PagedDataSource ps = new PagedDataSource();
            DataView        dv = new DataView(dt);
            ps.DataSource             = dv;
            ps.AllowPaging            = true;
            ps.CurrentPageIndex       = AspNetPager1.CurrentPageIndex - 1;
            ps.PageSize               = AspNetPager1.PageSize;
            rptWorkExpress.DataSource = ps;
            rptWorkExpress.DataBind();
        }
    }
Example #6
0
    /// <summary>
    /// 绑定新闻列表
    /// </summary>
    protected void BindData()
    {
        DataTable dt = NewsInfoService.Get_NewsInfoViewList(Convert.ToInt32(Request.QueryString["tid"].ToString()));

        Paging.BindPageData(dt, Repeater_dwgl, AspNetPager1);
    }