代码修改后的版本,全部提交
This commit is contained in:
34
Mtxfw.shop/_Admin/admin_Delete_Data.aspx.cs
Normal file
34
Mtxfw.shop/_Admin/admin_Delete_Data.aspx.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace Mtxfw.shop._admin
|
||||
{
|
||||
public partial class admin_Delete_Data : Mtxfw.Utility.AdminPage
|
||||
{
|
||||
public Mtxfw.DAL.user_info daoUser = new Mtxfw.DAL.user_info();
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
if (!IsPostBack)
|
||||
{
|
||||
Btn_Delete.Attributes.Add("onclick", "return confirm(\"您确定要清空数据吗?\");");
|
||||
}
|
||||
|
||||
Btn_Delete.Click += delegate(object s, EventArgs ex)
|
||||
{
|
||||
daoUser.DeleteData();
|
||||
Response.Redirect(Request.Url.AbsolutePath);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user