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

public partial class manage_membersseek : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string sql0 = "select count(*) from members where mname='" + TextBox1.Text + "'";
        if (oper.isfind(sql0))
        {
            Panel1.Visible = true;
            lblerror.Visible = false;
            string sql1 = "select * from members where mname='" + TextBox1.Text + "'";
            DataRow dr = oper.dr(sql1);
            Label1.Text = dr["mname"].ToString();
            Label2.Text = dr["mcartype"].ToString();
            Label3.Text = dr["mcarno"].ToString();
            Label4.Text = dr["mmoney"].ToString();
            Image1.ImageUrl ="../"+ dr["mcarpic"].ToString();

            string sql2 = "select * from 会员消费记录 where 会员名='" + TextBox1.Text + "'";
            GridView1.DataSource = oper.dt(sql2);
            GridView1.DataBind();
        }
        else
        {
            Panel1.Visible = false;
            lblerror.Visible = true;
        }
    }
}
