Web/Admin/AdminFederation.aspx.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class Web_Admin_AdminFederation : System.Web.UI.Page
{
Dbhelp dh = new Dbhelp();
protected void Page_Load(object sender, EventArgs e)
{
if (Session["UserPower"] == null)
{
Response.Redirect("Admin.aspx");
return;
}
LblMassage.Text = "";
GVBinit();
}
#region 数据绑定
protected void GVBinit()
{
string sql = "select Id,Department,Duty from AssociationInfor";
GVInfor.DataSource = dh.GetData(sql);
GVInfor.DataBind();
}
#endregion
protected void GVInfor_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
string sql = "delete from AssociationInfor where Id='"+GVInfor.DataKeys[e.RowIndex].Value.ToString()+"'";
dh.Exucte(sql);
GVBinit();
}
protected void GVInfor_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onMouseOver", "Color=this.style.backgroundColor='#99ccff'");
e.Row.Attributes.Add("onMouseOut", "Color=this.style.backgroundColor='#ffffff'");
((LinkButton)(e.Row.Cells[4].Controls[0])).Attributes.Add("onclick", "return confirm('是否删除当前行数据?')");
}
}
protected void BtnSubmit_Click1(object sender, ImageClickEventArgs e)
{
SelectInfor();
}
#region 查询部门
protected void SelectInfor()
{
if (TxtName.Text != "")
{
string sql = "select Id,Department,Duty from AssociationInfor where Department='" + TxtName.Text.Trim() + "'";
GVInfor.DataSource = dh.GetData(sql);
GVInfor.DataBind();
后面还有 8 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
