this.GridView1.DataSource =TbcontractBLL.GetTbcontract();
        this.GridView1.DataBind();
        for (int i = 0; i < GridView1.Rows.Count;i++ )
        {然后循环
 string State = GridView1.Rows[i].Cells[10].Text;//判断是否需要隐藏操作按钮存在于模版列
           if(State=="编辑")//可编辑可删除可审核科查看日志  不可作废
           {
               ((LinkButton)(GridView1.Rows[i].Cells[11].Controls[7])).Visible  = false;// Visible = false;//不可作废
           }
           if (State == "启用")//不可审核,不可删除,可编辑,可作废 日志
           {
               ((LinkButton)(GridView1.Rows[i].Cells[11].Controls[3])).Visible = false;//不可删除
               ((LinkButton)(GridView1.Rows[i].Cells[11].Controls[5])).Visible = false;//不可审核
           }
           if (State == "作废")//不可编辑不可审核不可删除。可作废、看日志
           {
               ((LinkButton)(GridView1.Rows[i].Cells[11].Controls[1])).Visible = false;//不可编辑
               ((LinkButton)(GridView1.Rows[i].Cells[11].Controls[3])).Visible = false;//不可删除
               ((LinkButton)(GridView1.Rows[i].Cells[11].Controls[5])).Visible = false;//不可审核
           }
}