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

            BLL.User_Service userSer = new BLL.User_Service();
            if (userSer.DeleteUser(id))
            {
                context.Response.Write("yes");
            }
            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.User_Service userSer = new BLL.User_Service();
                if (userSer.DeleteUser(id))
                {
                    context.Response.Redirect("Index.ashx");
                }
                else
                {
                    context.Response.Redirect("Error.html");
                }
            }
        }