📄 commoncankan.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 Common_CommonCankan : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
bind();
}
public void bind()
{
FileManage myFile = new FileManage();
DataSet ds = new DataSet();
int UserId = int.Parse(Session["Userid"].ToString());
ds = myFile.GetSingleFile(UserId);
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
this.GridView1.PageIndex = e.NewPageIndex;
this.GridView1.DataBind();
}
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//判断后勤部门是否审核
if (e.Row.Cells[4].Text == "1"||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>";
}
// 判断主管部门是否审核
if (e.Row.Cells[5].Text == "2")
{
e.Row.Cells[5].Text = "<font color=red>已通过</font>";
}
else
{
e.Row.Cells[5].Text = "<font color=red>未通过</font>";
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -