当前位置: 首页>>代码示例>>C#>>正文


C# HtmlTable.RenderControl方法代码示例

本文整理汇总了C#中HtmlTable.RenderControl方法的典型用法代码示例。如果您正苦于以下问题:C# HtmlTable.RenderControl方法的具体用法?C# HtmlTable.RenderControl怎么用?C# HtmlTable.RenderControl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HtmlTable的用法示例。


在下文中一共展示了HtmlTable.RenderControl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RenderAccounts

    public string RenderAccounts(TransitAccount[] accounts)
    {
        HtmlTable table = new HtmlTable();
        table.Border = 0;
        table.BorderColor = "White";
        HtmlTableRow row = new HtmlTableRow();
        table.Rows.Add(row);
        foreach (TransitAccount ta in accounts)
        {
            HtmlTableCell cell = new HtmlTableCell();
            cell.Controls.Add(new LiteralControl(string.Format(
                "<div><a href='AccountView.aspx?id={0}'>" +
                "<img border=0 style='width: 50%;' src='AccountPictureThumbnail.aspx?id={1}'></a></div>" +
                "<div class=sncore_link><a href='AccountView.aspx?id={0}'>{2}</a>", ta.Id, ta.PictureId, Render(ta.Name))));
            row.Cells.Add(cell);
            if (row.Cells.Count % 4 == 0)
            {
                row = new HtmlTableRow();
                table.Rows.Add(row);
            }
        }

        StringBuilder sb = new StringBuilder();
        StringWriter sw = new StringWriter(sb);
        table.RenderControl(new HtmlTextWriter(sw));
        return sb.ToString();
    }
开发者ID:dblock,项目名称:sncore,代码行数:27,代码来源:PlaceFriendsQueueView.aspx.cs

示例2: GetTitle

    //---------------------------------------------------------------------------
    public string GetTitle(string Title, int ColSpan)
    {
        //�� table
        string strTemp = "";
        HtmlTable table = new HtmlTable();
        HtmlTableRow row;
        HtmlTableCell cell;
        CssStyleCollection css;

        table.Border = 0;
        table.CellPadding = 3;
        table.CellSpacing = 0;
        css = table.Style;
        css.Add("font-size", _titleFontSize);
        css.Add("font-family", _titleFontFamily);
        css.Add("width", "100%");
        css.Add("font-weight", _titleFontWeight);

        //--------------------------------------------
        row = new HtmlTableRow();

        cell = new HtmlTableCell();
        strTemp = Title;
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", _titleAlign);
        css.Add("font-size", _titleFontSize);
        cell.ColSpan = ColSpan;
        row.Cells.Add(cell);

        table.Rows.Add(row);
        //--------------------------------------------
        //�ন html �X
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);

        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:40,代码来源:ExportDataTable.cs

示例3: GetReport


//.........这里部分代码省略.........
            cell = new HtmlTableCell();
            css = cell.Style;
            css.Add("text-align", "left");
            css.Add("font-size", strFontSize);
            css.Add("font-weight", strWeight);
            Util.AddTDLine(css, 23, strColor);
            cell.InnerHtml = "6.基督徒:<span style=" + strMemberColor + " >" + dr["Christian"].ToString() + "</span>";
            row.Cells.Add(cell);
            table.Rows.Add(row);
            //table.RenderControl(htw);

            //table = new HtmlTable();
            //table.Border = 0;
            //table.BorderColor = "black";
            //table.CellPadding = 0;
            //table.CellSpacing = 0;
            //table.Align = "center";
            //css = table.Style;
            //css.Add("font-size", strFontSize);
            //css.Add("font-family", "標楷體");
            //css.Add("width", "900px");

            row = new HtmlTableRow();
            cell = new HtmlTableCell();
            css = cell.Style;
            css.Add("text-align", "left");
            css.Add("font-size", strFontSize);
            css.Add("font-weight", strWeight);
            Util.AddTDLine(css, 123, strColor);
            cell.ColSpan = 3;
            cell.InnerHtml = "備註:<span style=" + strMemberColor + " >" + dr["M_Memo"].ToString() + "</span>";
            row.Cells.Add(cell);
            table.Rows.Add(row);
            table.RenderControl(htw);

            table = new HtmlTable();
            table.Border = 0;
            table.BorderColor = "black";
            table.CellPadding = 0;
            table.CellSpacing = 0;
            table.Align = "center";
            css = table.Style;
            css.Add("font-size", strFontSize);
            css.Add("font-family", "標楷體");
            css.Add("width", "900px");

            row = new HtmlTableRow();
            cell = new HtmlTableCell();
            css = cell.Style;
            css.Add("text-align", "left");
            css.Add("font-size", strFontSize);
            css.Add("font-weight", strWeight);
            css.Add("height", "30px");
            Util.AddTDLine(css, 123, strColor);
            cell.ColSpan = 1;
            cell.InnerHtml = "志工:<span style=color:darkseagreen >" + dr["ServiceUser"].ToString() + "</span>";
            row.Cells.Add(cell);
            string TotalTalkTime = "";
            DateTime t1, t2;
            if (dr["CreateDate"].ToString() != "" && dr["EndDate"].ToString() != "")
            {
                t1 = DateTime.Parse(Util.DateTime2String(dr["CreateDate"].ToString(), DateType.yyyyMMddHHmmss, EmptyType.ReturnNull));
                t2 = DateTime.Parse(Util.DateTime2String(dr["EndDate"].ToString(), DateType.yyyyMMddHHmmss, EmptyType.ReturnNull));

                TotalTalkTime = DateDiff(t1, t2);
            }
开发者ID:samuellin124,项目名称:cms,代码行数:67,代码来源:QryReport.aspx.cs

示例4: GetRptHead2


//.........这里部分代码省略.........
        row.Cells.Add(cell);
        //----------------------------------- 5.2
        //row = new HtmlTableRow();
        cell = new HtmlTableCell();
        strTemp = "B";
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", "18px");
        css.Add("font-family", "標楷體");
        //css.Add("border-style", "none");
        css.Add("width", "100px");
        Util.AddTDLine(css, 34, strColor);
        //css.Add("font-weight", "bold");
        //cell.ColSpan = 7;
        row.Cells.Add(cell);
        //----------------------------------- 5.3
        //row = new HtmlTableRow();
        cell = new HtmlTableCell();
        strTemp = year[0].ToString();
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", "18px");
        css.Add("font-family", "標楷體");
        //css.Add("border-style", "none");
        css.Add("width", "100px");
        Util.AddTDLine(css, 34, strColor);
        //css.Add("font-weight", "bold");
        //cell.ColSpan = 7;
        row.Cells.Add(cell);
        //----------------------------------- 5.4
        //row = new HtmlTableRow();
        cell = new HtmlTableCell();
        strTemp = year[1].ToString();
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", "18px");
        css.Add("font-family", "標楷體");
        //css.Add("border-style", "none");
        css.Add("width", "100px");
        Util.AddTDLine(css, 34, strColor);
        //css.Add("font-weight", "bold");
        //cell.ColSpan = 7;
        row.Cells.Add(cell);
        //----------------------------------- 5.5
        //row = new HtmlTableRow();
        cell = new HtmlTableCell();
        strTemp = year[2].ToString();
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", "18px");
        css.Add("font-family", "標楷體");
        //css.Add("border-style", "none");
        css.Add("width", "100px");
        Util.AddTDLine(css, 34, strColor);
        //css.Add("font-weight", "bold");
        //cell.ColSpan = 7;
        row.Cells.Add(cell);
        //----------------------------------- 5.6
        //row = new HtmlTableRow();
        cell = new HtmlTableCell();
        strTemp = year[3].ToString();
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", "18px");
        css.Add("font-family", "標楷體");
        //css.Add("border-style", "none");
        css.Add("width", "100px");
        Util.AddTDLine(css, 34, strColor);
        //css.Add("font-weight", "bold");
        //cell.ColSpan = 7;
        row.Cells.Add(cell);
        //----------------------------------- 5.7
        //row = new HtmlTableRow();
        cell = new HtmlTableCell();
        strTemp = year[4].ToString();
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", "18px");
        css.Add("font-family", "標楷體");
        //css.Add("border-style", "none");
        css.Add("width", "100px");
        Util.AddTDLine(css, 34, strColor);
        //css.Add("font-weight", "bold");
        //cell.ColSpan = 7;
        row.Cells.Add(cell);
        table.Rows.Add(row);

        //*************************************
        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);
        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:Rtp_Yaer.aspx.cs

示例5: GetReport


//.........这里部分代码省略.........
            {
                Util.AddTDLine(css, 23);
            }
            if (i == 8)
            {
                Util.AddTDLine(css, 23);
            }
            if (i == 9)
            {
                Util.AddTDLine(css, 23);
            }

            row.Cells.Add(cell);

        }

        cell = new HtmlTableCell();
        string strTemp1 = "";
        cell.InnerHtml = strTemp1;
        css = cell.Style;
        css.Add("text-align", "left");
        css.Add("font-size", "12px");
        cell.Width = "8";
        row.Cells.Add(cell);
        table.Rows.Add(row);
        //--------------------------------------------
        //第2行,資料顯示
        //*********第一排*********
        string strFontSize = "18px";
        DataTable dt = GetDataTable();

        foreach (DataRow dr in dt.Rows)
        {
            row = new HtmlTableRow();

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["姓名"].ToString();     //從GetDataTable()抓Name值
            css.Add("text-align", "center");            //excel文字置中
            css.Add("font-size", strFontSize);          //excel文字大小
            Util.AddTDLine(css, 1234);                  //excel 一個儲存格左(1)上(2)右(3)下(4) 框線
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["備註"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["電話"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["建檔時間"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["城市"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["來電諮詢別(大類)"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["來電諮詢別(分項)"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            table.Rows.Add(row);
        }

        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);
        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:Rtp_Yaer.aspx.cs

示例6: GetTableA


//.........这里部分代码省略.........
        css = cell.Style;
        css.Add("text-align", "left");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 34);
        // cell.ColSpan = 3;
        row.Cells.Add(cell);
        //table.Rows.Add(row);

        cell = new HtmlTableCell();
        strTemp = "主管";
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "left");
        css.Add("font-size", strFontSize);
        row.Cells.Add(cell);
        Util.AddTDLine(css, 34);
        // table.Rows.Add(row);

        cell = new HtmlTableCell();
        strTemp = "財產登記";
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "left");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 34);
        row.Cells.Add(cell);
        // table.Rows.Add(row);

        cell = new HtmlTableCell();
        strTemp = "審核";
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "left");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 34);
        row.Cells.Add(cell);
        //table.Rows.Add(row);

        cell = new HtmlTableCell();
        strTemp = "費用編號";
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "left");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 34);
        row.Cells.Add(cell);
        //table.Rows.Add(row);

        cell = new HtmlTableCell();
        strTemp = "&nbsp&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        css.Add("text-align", "left");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 34);
        cell.ColSpan = 2;

        row.Cells.Add(cell);
        table.Rows.Add(row);

        row = new HtmlTableRow();

        for (int i = 0; i < 9; i++)
        {
            cell = new HtmlTableCell();
            if (i == 7)
            {
                strTemp = "預算編號";
            }
            else
            {
                strTemp = "&nbsp";
            }
            //strTemp = "&nbsp;";
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "left");

            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 34);
            if (i == 0)
            {
                Util.AddTDLine(css, 13);
            }
            if (i == 8)
            {
                cell.ColSpan = 2;
            }
            cell.Height = "20";
            row.Cells.Add(cell);
        }

        table.Rows.Add(row);

        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);
        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:Church_report.aspx.cs

示例7: GetRptHead

    private string GetRptHead()
    {
        string strTemp = "";
            HtmlTable table = new HtmlTable();
            HtmlTableRow row;
            HtmlTableCell cell;
            CssStyleCollection css;

            string FontSize = "14px";
            table.Border = 0;
            table.CellPadding = 0;
            table.CellSpacing = 0;
            table.Align = "center";
            css = table.Style;
            css.Add("font-size", "12px");
            css.Add("font-family", "���");
            css.Add("width", "100%");
            //****************************************
            row = new HtmlTableRow();
            cell = new HtmlTableCell();
            string time = "";
            string Year1 = "";
            string Querter = "";
            string Data = "";
            if (txtBegCreateDate.Text != "" && txtEndCreateDate.Text != "")
            {
                time = txtBegCreateDate.Text + "~" + txtEndCreateDate.Text;
            }
            if (ddlYear1.SelectedValue != "")
            {
                Year1 = ddlYear1.SelectedValue;
            }
            strTemp =  "���h�M�u�ӹq" + ddlYear.SelectedValue + Year1  + "�~�ײέp" + time ;
            if (ddlQuerter.SelectedValue != "")
            {
                Querter = ddlQuerter.SelectedValue;
                strTemp =  "���h�M�u�ӹq" + ddlYear.SelectedValue + Year1 + "��" + Querter + "�u�~�ײέp" + time ;
            }
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "24px");
            css.Add("font-family", "���");
            css.Add("border-style", "none");
            css.Add("font-weight", "bold");
            //ColSpan���m���X��
            cell.ColSpan = 5;
            row.Cells.Add(cell);
            table.Rows.Add(row);
            //*************************************
            //�ন html �X
            StringWriter sw = new StringWriter();
            HtmlTextWriter htw = new HtmlTextWriter(sw);
            table.RenderControl(htw);

            return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:57,代码来源:CallerCategory.aspx.cs

示例8: GetRptHead

    //-------------------------------------------------------------------------------------------------------------
    private string GetRptHead()
    {
        string strTemp = "";
        HtmlTable table = new HtmlTable();
        HtmlTableRow row;
        HtmlTableCell cell;
        CssStyleCollection css;

        string FontSize = "14px";
        table.Border = 0;
        table.CellPadding = 0;
        table.CellSpacing = 0;
        table.Align = "center";
        css = table.Style;
        css.Add("font-size", "12px");
        css.Add("font-family", "標楷體");
        css.Add("width", "100%");
        //****************************************
        row = new HtmlTableRow();
        cell = new HtmlTableCell();
        //查詢城市代碼名稱
        DataTable dt = GetDataTable();
        //查詢城市代碼名稱
        string Age = "";
        string Sex = "";
        string Firstphone = "";
        string time = "";
        string Christian = "";

        if (ddlAge.SelectedValue != "")
        {
            Age += "約" + ddlAge.SelectedValue + "歲";
        }
        if (rdoSex.SelectedValue != "" && rdoSex.SelectedValue != "全部")
        {
            Sex += rdoSex.SelectedValue + "生";
        }
        if (CKB_Firstphone.Checked == true)
        {
            Firstphone = "第一次來電";
        }
        if (CKB_Christian.Checked.ToString() == "True")
        {
            Christian += " 是基督徒";
        }
        if (txtBegCreateDate.Text != "" && txtEndCreateDate.Text != "")
        {
            time = txtBegCreateDate.Text + "~" + txtEndCreateDate.Text;
        }
        foreach (DataRow dr in dt.Rows)
        {
            string city = "";
            if (ddlCity.SelectedValue != "")
                city += dr["縣市"].ToString();
            strTemp = city;
            strTemp += " 個案數分布表";
            if (time != "" || Firstphone != "" || Age != "" || Christian != "")
            {
                strTemp += "(" + time + Firstphone + Christian + Age + Sex + ")";
            }
        }

        cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
        css = cell.Style;
        //教會跨行置中
        cell.ColSpan = 5;
        //cell.ColSpan = 8;
        css.Add("text-align", "center");
        css.Add("font-size", "24px");
        css.Add("font-family", "標楷體");
        css.Add("border-style", "none");
        css.Add("font-weight", "bold");
        row.Cells.Add(cell);
        table.Rows.Add(row);
        //*************************************

        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);

        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:84,代码来源:CasesNumber.aspx.cs

示例9: GetRptHead6


//.........这里部分代码省略.........
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //緊急求助O6[2]----------------------------------------------------------------
        if (int.Parse(O6[2]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O6[2];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "150px");
            row.Cells.Add(cell);
        }
        //暴力O6[3]----------------------------------------------------------------
        if (int.Parse(O6[3]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O6[3];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //隱症O6[4]----------------------------------------------------------------
        if (int.Parse(O6[4]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O6[4];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //性侵O6[5]----------------------------------------------------------------
        if (int.Parse(O6[5]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O6[5];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //身心疾病O6[6]----------------------------------------------------------------
        if (int.Parse(O6[6]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O6[6];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //求助O6[7]----------------------------------------------------------------
        if (int.Parse(O6[7]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O6[7];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //----------------
        table.Rows.Add(row);
        //*************************************
        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);

        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:SearchCallerCategory.aspx.cs

示例10: GetRptHead5


//.........这里部分代码省略.........
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 134, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //未婚懷孕O5[1]----------------------------------------------------------------
        if (int.Parse(O5[1]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O5[1];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //各癮症O5[2]----------------------------------------------------------------
        if (int.Parse(O5[2]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O5[2];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "150px");
            row.Cells.Add(cell);
        }
        //社會福利O5[3]----------------------------------------------------------------
        if (int.Parse(O5[3]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O5[3];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //法律諮商O5[4]----------------------------------------------------------------
        if (int.Parse(O5[4]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O5[4];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //精神醫療O5[5]----------------------------------------------------------------
        if (int.Parse(O5[5]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O5[5];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //性問題O5[6]----------------------------------------------------------------
        if (int.Parse(O5[6]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O5[6];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //----------------
        table.Rows.Add(row);
        //*************************************
        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);

        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:SearchCallerCategory.aspx.cs

示例11: GetRptHead4


//.........这里部分代码省略.........
        /////////////////////////////////////////   第一行 by apple  //////////////////////////////////////////////////////////////////
        //感恩祝福O4[0]----------------------------------------------------------
        row = new HtmlTableRow();
        if (int.Parse(O4[0]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = "感恩祝福";
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 1234, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //宗教問題O4[1]----------------------------------------------------------------
        if (int.Parse(O4[1]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = "宗教問題";
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 234, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //代禱O4[2]----------------------------------------------------------------
        if (int.Parse(O4[2]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = "代禱";
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 234, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //----------------
        table.Rows.Add(row);
        /////////////////////////////////////////   第二行by apple  //////////////////////////////////////////////////////////////////
        //感恩祝福O4[0]----------------------------------------------------------
        row = new HtmlTableRow();
        if (int.Parse(O4[0]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O4[0];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 134, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //宗教問題O4[1]----------------------------------------------------------------
        if (int.Parse(O4[1]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O4[1];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //代禱O4[2]----------------------------------------------------------------
        if (int.Parse(O4[2]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O4[2];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "150px");
            row.Cells.Add(cell);
        }
        //----------------
        table.Rows.Add(row);
        //*************************************
        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);

        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:SearchCallerCategory.aspx.cs

示例12: GetRptHead3


//.........这里部分代码省略.........
            row.Cells.Add(cell);
        }
        //其他O3[4]----------------------------------------------------------------
        if (int.Parse(O3[4]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = "其他";
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 234, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
         //----------------
        table.Rows.Add(row);
        /////////////////////////////////////////   第二行by apple  //////////////////////////////////////////////////////////////////
        //猥褻O3[0]----------------------------------------------------------
        row = new HtmlTableRow();
        if (int.Parse(O3[0]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O3[0];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 134, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //攻擊O3[1]----------------------------------------------------------------
        if (int.Parse(O3[1]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O3[1];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //沉默O3[2]----------------------------------------------------------------
        if (int.Parse(O3[2]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O3[2];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "150px");
            row.Cells.Add(cell);
        }
        //精神錯亂O3[3]----------------------------------------------------------------
        if (int.Parse(O3[3]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O3[3];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //其他O3[4]----------------------------------------------------------------
        if (int.Parse(O3[4]) != 0)
        {
            cell = new HtmlTableCell();
            strTemp = O3[4];
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", "center");
            css.Add("font-size", "18px");
            css.Add("font-family", "標楷體");
            Util.AddTDLine(css, 34, strColor);
            css.Add("width", "130px");
            row.Cells.Add(cell);
        }
        //----------------
        table.Rows.Add(row);
        //*************************************
        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);

        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:SearchCallerCategory.aspx.cs

示例13: GetReport


//.........这里部分代码省略.........
        css.Add("font-size", strFontSize);
        css.Add("mso-number-format", "\\@");
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtChurchPhone.Text;
        row.Cells.Add(cell);

        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtChurchEmail2.Text;
        row.Cells.Add(cell);

        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtPriest.Text;
        row.Cells.Add(cell);

        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        css.Add("mso-number-format", "\\@");
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtPriestPhone.Text;
        row.Cells.Add(cell);
        table.Rows.Add(row);

        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        css.Add("mso-number-format", "\\@");
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtPriestEmail.Text;
        row.Cells.Add(cell);
        table.Rows.Add(row);

        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtContact.Text;
        row.Cells.Add(cell);
        table.Rows.Add(row);

        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        css.Add("mso-number-format", "\\@");
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtChurchMphone.Text;
        row.Cells.Add(cell);

        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 234);
        cell.InnerHtml = txtChurchEmail.Text;
        row.Cells.Add(cell);

        string Mministry = "";
        if (CHK_Mministry1.Checked == true)
            Mministry = CHK_Mministry1.Text + ",";
        if (CHK_Mministry2.Checked == true)
            Mministry += CHK_Mministry2.Text + ",";
        if (CHK_Mministry3.Checked == true)
            Mministry += CHK_Mministry3.Text + ",";
        if (CHK_Mministry4.Checked == true)
            Mministry += CHK_Mministry4.Text + ",";
        if (CHK_Mministry5.Checked == true)
            Mministry += CHK_Mministry5.Text + ",";
        if (CHK_Mministry6.Checked == true)
            Mministry += CHK_Mministry6.Text + ",";
        if (CHK_Mministry7.Checked == true)
            Mministry += "其他:("+txt_Mministry7.Text+")";
        cell = new HtmlTableCell();
        css = cell.Style;
        css.Add("text-align", "center");
        css.Add("font-size", strFontSize);
        Util.AddTDLine(css, 234);
        cell.InnerHtml = Mministry;
        row.Cells.Add(cell);

        table.Rows.Add(row);

        //轉成 html 碼
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);
        return htw.InnerWriter.ToString();
    
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:Church_Edit.aspx.cs

示例14: GetReport


//.........这里部分代码省略.........
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["�D����v"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["�D����v�q��"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            css.Add("mso-number-format", "\\@");
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["�D����vEmail"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            string Churchministry = "";
            if (dr["�з|�Ƥu"].ToString() != "")
            {
                string tmp = dr["�з|�Ƥu"].ToString();
                string[] split = tmp.Split(new Char[] { ',' });
                split[0].ToString();
                split[1].ToString();
                split[2].ToString();
                split[3].ToString();
                split[4].ToString();
                split[5].ToString();
                split[6].ToString();
                if (split[0] == "�B�e")
                    Churchministry = "�B�e,";
               // Churchministry = ",";
                if (split[1] == "�B��")
                    Churchministry += "�B��,";
                if (split[2] == "�C��")
                    Churchministry = "�C��,";
                if (split[3] == "�ѤH")
                    Churchministry += "�ѤH,";
                if (split[4] == "�a�x���h")
                    Churchministry += "�a�x���h,";
                if (split[5] == "��ͻ���")
                    Churchministry += "��ͻ���,";
                if (split[6] == "��L")
                    Churchministry += "��L";
            }
            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = Churchministry;
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["�p�����f"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["���f�q��"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            css.Add("mso-number-format", "\\@");
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            cell = new HtmlTableCell();
            css = cell.Style;
            cell.InnerHtml = dr["���fEmail"].ToString();
            css.Add("text-align", "center");
            css.Add("font-size", strFontSize);
            Util.AddTDLine(css, 1234);
            row.Cells.Add(cell);

            table.Rows.Add(row);
        }

        //�ন html �X
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);
        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:101,代码来源:Church.aspx.cs

示例15: Render

    //-------------------------------------------------------------------------
    public string Render()
    {
        //�� table
        string strTemp = "";
        HtmlTable table = new HtmlTable();
        HtmlTableRow row;
        HtmlTableCell cell;
        CssStyleCollection css;

        table.Border = 1;
        table.CellPadding = 3;
        table.CellSpacing = 0;
        css = table.Style;
        css.Add("font-size", _fontSize);
        css.Add("font-family", _fontFamily);
        css.Add("width", "100%");
        //--------------------------------------------
        //��1��
        row = new HtmlTableRow();
        for (int i = 0; i < _dataTable.Columns.Count; i++)
        {
            string ColumnName = _dataTable.Columns[i].ColumnName;
            if (_disableColumn.Contains(ColumnName))
            {
                continue;
            }

            cell = new HtmlTableCell();
            strTemp = _dataTable.Columns[i].ColumnName;
            cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
            css = cell.Style;
            css.Add("text-align", _columnAlign);
            css.Add("font-size", _columnFontSize);
            row.Cells.Add(cell);
        }
        table.Rows.Add(row);
        //--------------------------------------------
        //��2��,������
        foreach (DataRow dr in _dataTable.Rows)
        {
            row = new HtmlTableRow();

            for (int i = 0; i < _dataTable.Columns.Count; i++)
            {
                string ColumnName = _dataTable.Columns[i].ColumnName;
                if (_disableColumn.Contains(ColumnName))
                {
                    continue;
                }

                cell = new HtmlTableCell();
                strTemp = dr[_dataTable.Columns[i].ColumnName].ToString();

                cell.InnerHtml = strTemp == "" ? "&nbsp" : strTemp;
                css = cell.Style;

                if (_forceText.Contains(ColumnName))
                {
                    css.Add("mso-number-format", "\\@");
                }
                css.Add("text-align", _textAlign[i]);
                css.Add("font-size", _fontSize);
                row.Cells.Add(cell);
            }
            table.Rows.Add(row);
        }
        //--------------------------------------------
        //�ন html �X
        StringWriter sw = new StringWriter();
        HtmlTextWriter htw = new HtmlTextWriter(sw);
        table.RenderControl(htw);

        return htw.InnerWriter.ToString();
    }
开发者ID:samuellin124,项目名称:cms,代码行数:75,代码来源:ExportDataTable.cs


注:本文中的HtmlTable.RenderControl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。