예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tb_Phone.Attributes.Add("style", "background-color:transparent");

            tb_name.Attributes.Add("style", "background-color:transparent");
            tb_pwd.Attributes.Add("style", "background-color:transparent");
            tb_age.Attributes.Add("style", "background-color:transparent");
            id     = Request["id"];
            showId = int.Parse(id);
            Client client = clientBll.SelectClient2(showId);

            phone2 = client.Phone;
            if (!Page.IsPostBack)
            {
                tb_Phone.Text = client.Phone;
                //phone2 = tb_Phone.Text.Trim();
                tb_pwd.Text  = client.Pwd;
                tb_name.Text = client.Name;
                tb_age.Text  = client.Age == null ? "" : client.Age.ToString();
                if (client.Sex == "男")
                {
                    rbl_sex.SelectedValue = "男";
                }

                else if (client.Sex == "女")
                {
                    rbl_sex.SelectedValue = "女";
                }
            }
        }
예제 #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello World");
            string id     = context.Request["id"];
            int    showId = int.Parse(id);
            Client client = clientBll.SelectClient2(showId);
            string phone  = client.Phone;

            if (clientBll.AdminDelete(showId) && replyBll.Delete2(phone) && feedBackBll.Delete2(phone))
            {
                context.Response.Redirect("adminClient.aspx");
            }
            else
            {
                context.Response.Write("删除失败");
                context.Response.Write(id);
            }
        }