📄 managerfileshenpi.aspx.cs
字号:
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 Manager_ManagerFileShenpi : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bind();
}
}
public void bind()
{
FileManage myFile = new FileManage();
DataSet ds = new DataSet();
ds = myFile.GetNoFile(1);
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[4].Text == "2")
{
e.Row.Cells[4].Text = "<font color=red>已通过</font>";
}
else
{
e.Row.Cells[4].Text = "<font color=red>未通过</font>";
}
}
}
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
//string sqlstr = "update UserInfo set UserState=1 ";
//SqlConnection mycon = new SqlConnection(con);
//mycon.Open();
//SqlCommand cmd = new SqlCommand(sqlstr, mycon);
//if ((cmd.ExecuteNonQuery()) > 0)
//{
// sqlstr = "select Userid ,name ,DepartId ,UserState from UserInfo where UserState=0";
// SqlDataAdapter dat = new SqlDataAdapter(sqlstr, con);
// DataSet ds = new DataSet();
// dat.Fill(ds);
// this.GridView1.DataSource = ds;
// this.GridView1.DataBind();
//}
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridView1.PageIndex = e.NewPageIndex;
this.GridView1.DataBind();
}
protected void GridView1_RowUpdating(object sender, GridViewCommandEventArgs e)
{
int fileID = int.Parse(GridView1.DataKeys[0].Value.ToString());
FileManage myFile = new FileManage();
myFile.ZhuguanShenPi(fileID);
bind();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -