filechakan.aspx.cs

来自「很好的啊!中小型企业用的」· CS 代码 · 共 59 行

CS
59
字号
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 Houqin_FileChakan : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        bind();
    }
    public void bind()
    {
        FileManage myFile = new FileManage();
        DataSet ds = new DataSet();
        ds = myFile.GetAllFile();
        GridView1.DataSource = ds;
        GridView1.DataBind();
    }
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        this.GridView1.PageIndex = e.NewPageIndex;
        this.GridView1.DataBind();
    }
 
    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 + =
减小字号Ctrl + -
显示快捷键?