zoukankan      html  css  js  c++  java
  • 动态添加table表格内容,填充审批意见。

    一,前台

    <asp:table id="tblApprove" runat="server" Width="100%"></asp:table>

    二、后台 

    QueryApproveInfo
          private void SetTable()
            {
    
                TableRow tblRow = new TableRow();
                TableCell tblCell = new TableCell();
                tblCell.Text = "审批信息";
                tblCell.Font.Size = 10;
                tblCell.Font.Bold = true;
                tblCell.ForeColor = System.Drawing.Color.Green;
                tblRow.Cells.Add(tblCell);
    
                tblCell = new TableCell();
                tblCell.Text = "审批人";
                tblRow.Cells.Add(tblCell);
    
                TextBox tBox = new TextBox();
                object code = Session["login.wname"];
                tBox.Text = code.ToString();
                tBox.ReadOnly = true;
                tblCell = new TableCell();
    
                tblCell.Controls.Add(tBox);
                tblRow.Cells.Add(tblCell);
                tblApprove.Rows.Add(tblRow);
                tblCell = new TableCell();
    
                tblCell.Text = "审批日期";
                tblRow.Cells.Add(tblCell);
                tBox = new TextBox();
                tBox.Text = System.DateTime.Now.ToShortDateString();
                tBox.ReadOnly = true;
                tblCell = new TableCell();
                //tblCell.Width=100;
                tblCell.Controls.Add(tBox);
                tblRow.Cells.Add(tblCell);
    
                tblApprove.Rows.Add(tblRow);
    
    
                tblRow = new TableRow();
                tblCell = new TableCell();
                tBox = new TextBox();
                tBox.CssClass = "MultTextbox";
                tBox.ID = "opinion";
                tBox.TextMode = System.Web.UI.WebControls.TextBoxMode.MultiLine;
                tblCell.Controls.Add(tBox);
                tblCell.ColumnSpan = 5;
    
                tblRow.Cells.Add(tblCell);
                tblApprove.Rows.Add(tblRow);
    
    
                /*Table t1=new Table();
                t1.CssClass="tblStyle2";
                row=new TableRow();
                c1=new TableCell();
                c1.Text="审批人";    
                row.Cells.Add(c1);        
                c1=new TableCell();
                c1.Text="审批日期";    
                row.Cells.Add(c1);
                c1=new TableCell();
                c1.Text="审批日期";    
                row.Cells.Add (c1);
                c1=new TableCell();
                c1.Text="审批人";    
                row.Cells.Add(c1);
                
                
                t1.Rows.Add(row);
                row=new TableRow();
                c1=new TableCell();
                c1.Controls.Add(t1);
                c1.CssClass="tblStyle2";
                row.Cells.Add(c1);
                tblApprove.Rows.Add(row);
                */
    
            }
  • 相关阅读:
    Hlg 1740 DP求路径且按最小字典序输出.cpp
    Uestc 1720 【容斥原理】.cpp
    Uva 10112 【简单的计算几何】.cpp
    Vijos 1071 【DP之记录路径】
    Hlg 1665 【KMP】.cpp
    cf 226b 唯美思维题~.cpp
    Hlg 1049 【广搜+康拓展开】.cpp
    Hlg 1067 【状态压缩DP】.cpp
    Pythoner.CN: 中小企业IT不可错过的十大虚拟机软件 | Pythoner.CN
    OpenStack Hacker养成指南 | UnitedStack Inc.
  • 原文地址:https://www.cnblogs.com/camelroyu/p/4164250.html
Copyright © 2011-2022 走看看