溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

GridView 行綁定

發(fā)布時間:2020-10-10 11:35:27 來源:網(wǎng)絡 閱讀:342 作者:demon2012d 欄目:編程語言

<asp:TemplateField HeaderText="流程進度">

                    <ItemTemplate>

                        <asp:Label ID="lblFlow"runat="server"></asp:Label>

                    </ItemTemplate>

                </asp:TemplateField>

 

protected void gridList_RowDataBound(object sender, GridViewRowEventArgs e)

    {

        if(e.Row.RowType == DataControlRowType.DataRow)

        {

            DataRowView cutRow =(DataRowView)e.Row.DataItem;

            //對應值

            stringstrID = string.Empty;

            stringstrProjStatenm = string.Empty;

            try

            {

                strID = cutRow["id"].ToString();

                strProjStatenm =cutRow["proj_statenm"].ToString();

                Label xLabel =(Label)e.Row.FindControl("lblFlow");

                if (xLabel != null)

                {

                    if (strProjStatenm == "審批中")

                    {

                        string strSql = string.Format("select f_transidstepname({0}) from dual ",strID);

                        xLabel.Text= string.Format("審批中-{0}",OracleHelperImm.ExecuteScalar(strSql));

                    }

                    else

                    {

                        xLabel.Text= strProjStatenm;

                    }

                }

            }

            catch(System.ArgumentException ex)

            {

                //忽略 

 

            }

 

  }

}


向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI