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 WTOSYSadmin_vipmag_Commentsedit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["WtoRightName"] == null)
        {
            Response.Redirect("~/SYSADMIN/main/error.aspx?err=非法登陆!或系统超时，请刷新后重新登录");
        }

            SqlConnection conn = CDatabase.wtoconn();
            conn.Open();
            SqlCommand smd = new SqlCommand("select * from newscomm where id=" + Request.QueryString["id"], conn);
            SqlDataReader sdr = smd.ExecuteReader();
            sdr.Read();
            this.username.Text = sdr["username"].ToString();
            this.ip.Text = sdr["ip"].ToString();
            this.ProductName.Text = sdr["pname"].ToString();
            this.tel.Text = sdr["tel"].ToString();
            this.Content.Text = sdr["Content"].ToString();
            this.pic.ImageUrl = sdr["pic"].ToString();
            this.gname.Text = sdr["gname"].ToString();
            this.address.Text = sdr["address"].ToString();
            this.gtype.Text = sdr["gtype"].ToString();

            sdr.Close();         
            conn.Close();

        
    }

}
