using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class lookmore : System.Web.UI.Page
{
    DataBaseLayer db = new DataBaseLayer();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            DataListBind();
        }
    }
    public void DataListBind()
    {
        int count = db.DataSetFactoryWithPager(DataList1, AspNetPager1, "Pr_Mp4_GetAllMp4Look", "Pr_Mp4_GetAllMp4LookNum");
        Label1.Text = "共" + count.ToString() + "条";
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string mp4Name = TextBox1.Text.Trim().ToString();
        if (mp4Name != "")
        {
            Response.Redirect("mp4search.aspx?name=" + mp4Name);
        }
        else
        {
            TextBox1.Text = "请输入关键字!";
            //Response.Write("<script>alert(\"请输入关键字！\")</script>");
        }
    }
    protected void AspNetPager1_PageChanged(object src, Wuqi.Webdiyer.PageChangedEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        DataListBind();
    }
}
