zoukankan      html  css  js  c++  java
  • 动态生成Table

    Script:

     <tr>

                <td valign="top">

                    <table style="100%; border-color:Gray; border-style:double; border-3">

                        <%=ViewState["ViewCarePlanRiskFactors"]%>

                    </table>

                </td>

                <td valign="top">

                    <table style="100%; border-color:Gray; border-style:double; border-3">

                        <%=ViewState["ViewCarePlanGoals/Instructions"]%>

                    </table>

                </td>

                <td valign="top">

                    <table style="100%; border-color:Gray; border-style:double; border-3">

                        <%=ViewState["ViewCarePlanInterventions"]%>

                    </table>

                </td>

                <td valign="top">

                    <table style="100%; border-color:Gray; border-style:double; border-3">

                        <%=ViewState["ViewPlanMedications"]%>

                        <%=ViewState["ViewCarePlanOtherMedications"]%>

                    </table>

                </td>

                <td valign="top">

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

                </td>

            </tr>

    Code:

        protected void CreateSectionAndItemStrBasic(Dictionary<string, MyBasicProtocolStructure[]> dictStruc,

                Dictionary<string, MyPatientProtocolItem[]> dictPatientItem,ref string str, string prefixstr, string parentId)

            {

                if (dictStruc.ContainsKey(parentId))

                {

                    MyBasicProtocolStructure[] myBasicProtocolStruList = dictStruc[parentId] as MyBasicProtocolStructure[];

                    foreach (MyBasicProtocolStructure myBasicProtocolStruc in myBasicProtocolStruList)

                    {

                        str += "<tr><td>" + prefixstr + myBasicProtocolStruc.Name + "</td></tr>";

     

                        CreateSectionAndItemStrBasic(dictStruc, dictPatientItem, ref str, "&nbsp;&nbsp;&nbsp;&nbsp;" + prefixstr, myBasicProtocolStruc.Id);

                    }

                }

                if (dictPatientItem.ContainsKey(parentId))

                {

                    MyPatientProtocolItem[] myPatientProtocolItemList = dictPatientItem[parentId] as MyPatientProtocolItem[];

     

                    foreach (MyPatientProtocolItem myPatientProtocolItem in myPatientProtocolItemList)

                    {

                        str += "<tr><td>" + prefixstr + myPatientProtocolItem.Content + "</td></tr>";

                    }

                }

            }

  • 相关阅读:
    如何制作Python百分比进度条
    如何按列表的元素中的第二个元素排序
    map的用法Python
    上一个问题增加用户名密码登陆
    最近alex买了个Tesla Model S,通过转账的形式,并且支付了5%的手续费,tesla价格为95万。账户文件为json,请用程序实现该提现行为。
    最近alex买了个Tesla Model S,通过转账的形式,并且支付了5%的手续费,tesla价格为95万。账户文件为json,请用程序实现该转账行为。
    写一个6位随机验证码程序,要求验证码中至少包含一个数字,一个小写字母,一个大写字母
    传统html和html5网页布局
    图片路径问题
    面向对象编程的一个形象比喻
  • 原文地址:https://www.cnblogs.com/quietwalk/p/2283953.html
Copyright © 2011-2022 走看看