using System;
using System.Data;
using System.Configuration;
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;
//该源码首发自www.51aspx.com(５１ａsｐｘ．ｃｏｍ)

public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Title = ConfigurationManager.AppSettings["WebTitle"].ToString() + "--企业新闻";
        if (!Page.IsPostBack)
        {
            Bindnews("企业新闻", Newsgridview);
            Bindnews("业内资讯", Zixungridview);
            Bindnews("技术文档", Jishugridview);
        }
        
    }
    //绑定新闻控件
    private void Bindnews(string sNews,GridView myGridView)
    {
        INews Shownews = new Mynews();
        DataSet ds = Shownews.Getnews(sNews,8);
        myGridView.DataSource = ds.Tables["aa"].DefaultView;
        myGridView.DataBind();
    }
}
