using MESClassLibrary.BLL.User; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace MESWebSite.HttpHandlers { /// /// IndexHandler 的摘要说明 /// public class IndexHandler : IHttpHandler { HttpRequest Request = null; HttpResponse Response = null; public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; Request = context.Request; Response = context.Response; string method = Request.Params["method"]; switch (method) { case "SaveInfo": SaveInfo(); break; default: break; } } public bool IsReusable { get { return false; } } void SaveInfo() { string userid = Request.Params["userid"]; string old_password = Request.Params["old_password"]; string password_1 = Request.Params["password_1"]; string password_2 = Request.Params["password_2"]; if (password_1 == password_2) { UserBLL bll = new UserBLL(); Response.Write(bll.UpdateUserPassword(old_password, password_1, userid) == true ? "true" : "false"); } else { Response.Write("false"); } Response.End(); } } }