Beispiel #1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (this.DropDownList1.SelectedValue == "删除用户")
     {
         Model.User user = new Model.User();
         user.id = s;
         BLL.UserBLL userBLL = new BLL.UserBLL();
         userBLL.DelUser(user);
     }
     else if (this.DropDownList1.SelectedValue == "重置密码")
     {
         Model.User user = new Model.User();
         user.id = s;
         BLL.UserBLL userBLL = new BLL.UserBLL();
         if (userBLL.UpdateUser(user))
         {
             Response.Write("<script>alert('重置密码成功,新密码为:123456');location.href='user_management.aspx'</script>");
         }
     }
     else
     {
         Response.Write("<script>alert('请选择操作!')</script>");
     }
 }