温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:达达ASP.NET企业信息管理系统
当前文件路径:DaDaEnterprise/Admin/Admin_Class.aspx.cs

1using System; 2
using System.Collections; 3
using System.Configuration; 4
using System.Data; 5
using System.Web; 6
using System.Web.Security; 7
using System.Web.UI; 8
using System.Web.UI.HtmlControls; 9
using System.Web.UI.WebControls; 10
using System.Web.UI.WebControls.WebParts; 11
//源码下载及讨论地址:http://www.51aspx.com/CV/DaDaEnterprise 12
public partial class Admin_Admin_Class : System.Web.UI.Page 13
{ 14
protected void Page_Load(object sender, EventArgs e) 15
{ 16
DataAccess.IsAdmin(); 17
if (!IsPostBack) 18
{ 19
string sql = "select * from [Class] order by Sort"; 20
Repeater1.DataSource = DataAccess.GetDataSet(sql); 21
Repeater1.DataBind(); 22
} 23
} 24
25
protected void Del_Click(object sender,CommandEventArgs e) 26
{ 27
string id = e.CommandName; 28
string sql = "delete from [Class] where id=" + id; 29
if (DataAccess.ExecuteCmd(sql) > 0) 30
{ 31
Response.Redirect("./Admin_Class.aspx"); 32
} 33
Response.Write("<scripr>alert('删除失败!');</script>"); 34
} 35
} 36





}
}