protected void gvInfo_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            Button btnDel = e.Row.FindControl("btnDel") as Button;   //找服务器控件
            HtmlInputButton btnCheck = e.Row.FindControl("btnCheck") as HtmlInputButton; //找客户端控件
            if (btnDel != null)
            {
                string UseFlag = e.Row.Cells[8].Text;
                if (UseFlag == "0" || UseFlag == "1")
                {
                    btnDel.Enabled = true; //使用标志为0(不可用)或1(未发出) -- 删除按扭可用
                }
                else
                {
                    btnDel.Enabled = false;
                }
            }
            if (btnCheck != null)
            {
                string UseFlag = e.Row.Cells[8].Text;
                if (UseFlag == "2")
                {
                    btnCheck.Disabled = false; //使用标志为2(已发送) -- 核销按扭可用
                }
                else
                {
                    btnCheck.Disabled = true;
                }
            }
        }

相关文章:

  • 2021-06-03
  • 2021-09-26
  • 2021-10-16
  • 2021-08-07
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2021-09-24
猜你喜欢
  • 2022-12-23
  • 2021-10-20
  • 2021-11-01
  • 2021-10-31
  • 2022-12-23
  • 2021-09-05
相关资源
相似解决方案