Esempio n. 1
0
    private void GenertOneNotice()
    {
        List<notice> list = new noticeManager().GetTopList(1);
        if (list.Count == 1)
        {
            notice n = list[0];
            OutStr = string.Format(@"  <a style='font-family:Microsoft YaHei;color:#ffff00;font-size:24px;' href='Info.aspx?type=notice&id={0}' target='_blank' title='标题:{1}'>{1}</a>", n.id, n.title);

        }


    }
Esempio n. 2
0
    private void GenertleftNotice()
    {
        string temlate = @"
           <table width='96%' height='160' border='0' cellpadding='0' cellspacing='0' bordercolor='#FFFFFF'
                    background='images/bg/01.gif' class='kk22'>
                    <tr>
                        <td valign='top'>
                            <table width='100%' border='0' cellpadding='0' cellspacing='0'>
                                <tr>
                                    <td width='90' height='28' align='center' background='images/left.gif' class='title14b'>
                                        {0}
                                    </td>
                                    <td align='right' background='images/left2.gif'>
                                        <img src='images/HOT.gif' />
                                    </td>
                                </tr>
                            </table>
                            <table width='98%' height='24' border='0' align='center' cellpadding='0' cellspacing='0'>";
        string listTeml = @" <tr>
                                    <td height='27' align='left' valign='middle'>
                                        &nbsp;<img src='images/HOT2.gif' width='7' height='7' />&nbsp;<a href='Info.aspx?type=notice&id={0}'
                                            target='_blank' title='标题:{1}'>{2}</a>
                                    </td>
                                </tr> ";
        StringBuilder sb = new StringBuilder();
        sb.AppendFormat(temlate, "通知公告");
        List<notice> list = new noticeManager().GetTopList();

        foreach (notice item in list)
        {
            string title = item.title;
            if (title.Length > 17)
            {
                title = title.Substring(0, 17) + "...";
            }
            sb.AppendFormat(listTeml, item.id, item.title, title);
        }


        sb.Append(@"</table>
                        </td>
                    </tr>
                </table>
                <table height='5' border='0' cellpadding='0' cellspacing='0'>
                    <tr>
                        <td>
                        </td>
                    </tr>
                </table>");
        OutStr = sb.ToString();
    }
Esempio n. 3
0
    private void GenertNotice()
    {
        //公告的模板标签


        List<notice> list = new noticeManager().GetTopList();
        StringBuilder sb = new StringBuilder("<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0' id='marqueelist'>");
        foreach (notice item in list)
        {
            sb.AppendFormat(@"<tr>
                            <td height='25' align='left' valign='middle'>
                                &nbsp;<img src='images/biao.gif' /><a href='info.aspx?type=notice&id={0}' target='_blank'
                                    title='标题:{1}'>{1}</a> &nbsp;
                            </td>
                        </tr>", item.id, item.title);
        }
        sb.Append(" </table>");
        OutStr = sb.ToString();
    }