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;
using Bll;
//51-asp-x
public partial class OrdersManage_client_open : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
           OrdersBll ob=new OrdersBll();
           SqlDataReader sr = ob.GetClientInfo(Request["id"]);
           if(sr.Read())
           {
               clien_name.Text = sr[0].ToString();
               mobile.Text = sr[1].ToString();
               address.Text = sr[2].ToString();
               mome.Text = sr[3].ToString();
           }
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string id = Request["id"];
        if(id != "")
        {
            OrdersBll ob = new OrdersBll();
            ob.UpdataClientInfo(clien_name.Text, mobile.Text, address.Text, mome.Text,id);
            Response.Write("<script>alert('信息修改成功');opener.location='ClientManage.aspx';window.close()</script>");
        }
    }
}
