Beispiel #1
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int id = Convert.ToInt32(context.Request["id"]);

            BLL.UserInfoService UserInfoService = new BLL.UserInfoService();
            if (UserInfoService.DeleteUserInfo(id))
            {
                context.Response.Write("ok");
            }
            else
            {
                context.Response.Write("no");
            }
        }
Beispiel #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int id;

            if (int.TryParse(context.Request.QueryString["id"], out id))
            {
                BLL.UserInfoService UserInfoService = new BLL.UserInfoService();
                if (UserInfoService.DeleteUserInfo(id))
                {
                    context.Response.Redirect("UserInfoList.aspx");
                }
                else
                {
                    context.Response.Redirect("/Error.html");
                }
            }
            else
            {
                context.Response.Write("参数错误!!");
            }
        }