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;

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)
        {
            Showleaveword();
        }       
    }
   //显示留言
    private void Showleaveword()
    {
        INews shownews = new Mynews();
        DataSet ds = shownews.DsGetinfo("SELECT * FROM Leaveword ORDER BY Createdate DESC");
        MyGridView.DataSource = ds.Tables["aa"].DefaultView;
        MyGridView.DataBind();
    }
    protected void MyGridView_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        MyGridView.PageIndex = e.NewPageIndex;
        Showleaveword();
    }
    protected string Myleaveword(string sContent,bool bQqh)
    {
        string str="";
        if (bQqh == true)
        {
            str = "******悄悄话******";
        }
        else
        {
            str = sContent;
        }
        return str;
    }
}
