BBSMain.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:10k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections.Generic;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. public partial class BBS_BBSMain : System.Web.UI.Page
  12. {
  13.     /// <summary>
  14.     /// 大分类模板
  15.     /// </summary>
  16.     Model.BBSBigTYPE MBBSTYPE = new Model.BBSBigTYPE();
  17.     /// <summary>
  18.     /// 大分类逻辑
  19.     /// </summary>
  20.     BLL.BBSBigTYPE BBBSTYPE = new BLL.BBSBigTYPE();
  21.     /// <summary>
  22.     /// 小分类模板
  23.     /// </summary>
  24.     Model.BBSSmailTYPE MsmailType = new Model.BBSSmailTYPE();
  25.     /// <summary>
  26.     /// 小分类业务
  27.     /// </summary>
  28.     BLL.BBSSmailTYPE BsmailType = new BLL.BBSSmailTYPE();
  29.     public string AllTheStr = "";
  30.     protected void Page_Load(object sender, EventArgs e)
  31.     {
  32.         LoginLogic.MatchLoad("../", "BBS_BBSMain");
  33.         List<Model.BBSBigTYPE> LMB = BBBSTYPE.GetList();
  34.         foreach (Model.BBSBigTYPE MB in LMB)
  35.         {
  36.             AllTheStr += BigTypeString(MB);
  37.         }
  38.     }
  39.     public string BigTypeString(Model.BBSBigTYPE _MBBSTYPE)
  40.     {
  41.        
  42.       string Content=@"    <table class=""usertableborder"" cellspacing=""1"" cellpadding=""3"" width=""96%"" align=""center""
  43.         border=""0"">
  44.         <tr>
  45.             <th colspan=""3"" style=""height: 25px"">
  46.                 " + _MBBSTYPE.FLMC + @"</th>
  47.         </tr>
  48.         <tr>
  49.             <td class=""usertablerow2"" align=""left"" style=""height: 32px; width: 100%;"" colspan=""2"">
  50.                 <table border=""1"" cellpadding=""0"" cellspacing=""1"" style=""width: 100%"">
  51.                    <tr>
  52.                         <th style=""width: 72px; height: 19px"">
  53.                         </th>
  54.                         <th style=""width: 461px; height: 19px"">
  55.                             论坛</th>
  56.                         <th style=""width: 100px; height: 19px"">
  57.                             主题</th>
  58.                         <th style=""width: 100px; height: 19px"">
  59.                             最后更新</th>
  60.                     </tr>
  61. " + GetContent(_MBBSTYPE.ID) + @"
  62.                 </table>
  63.             </td>
  64.         </tr>
  65.     </table>";
  66.       return Content;
  67.     }
  68.     public string GetContent(int _MBBSID)
  69.     {
  70.         string ContentStr = "";
  71.         BLL.BBSSmailTYPE BB=new BLL.BBSSmailTYPE();
  72.        int Count=BB.GetCount("DFLID='"+_MBBSID.ToString()+"'");
  73.        List<Model.BBSSmailTYPE> MsmailTypes = BB.GetPageList(Count, 1, "ID", false, "DFLID='" + _MBBSID.ToString() + "'");
  74.        foreach (Model.BBSSmailTYPE MBBS in MsmailTypes)
  75.        {
  76.            ContentStr += SmallType(MBBS);
  77.        }
  78.        return ContentStr;
  79.     }
  80.     public string SmallType(Model.BBSSmailTYPE _MsmailType)
  81.     {
  82.         int Count = new BLL.BBS().GetCount("FL='" + _MsmailType.ID + "'");
  83.         string Content = @" 
  84.                     <tr>
  85.                         <td style=""width: 72px; height: 84px"" align=""center"" valign=""middle"">
  86.                             <img src=""" + _MsmailType.TPPath+ @""" style=""width: 100%; height: 57px"" /></td>
  87.                         <td style=""width: 461px; height: 84px"">
  88.                        <a href='BBSNews.aspx?type=" + _MsmailType.ID+ "'>" + _MsmailType.MC + @"</a></td>
  89.        
  90.                         <td style=""width: 100px; height: 84px"" align=""center"" valign=""middle"">
  91.                            " + Count.ToString() + @"</td>
  92.                         <td style=""width: 100px; height: 84px"" align=""center"">
  93.                            " + DateTime.Now.ToString("yyyy-MM-dd")+@"
  94.                         </td>
  95.                     </tr>
  96. ";
  97.         return Content;
  98.     }
  99. }
  100.     //<table class="usertableborder" cellspacing="1" cellpadding="3" width="96%" align="center"
  101.     //    border="0">
  102.     //    <tr>
  103.     //        <th colspan="3" style="height: 25px">
  104.     //            ☆学习园地☆</th>
  105.     //    </tr>
  106.     //    <tr>
  107.     //        <td class="usertablerow2" align="left" style="height: 32px; width: 100%;" colspan="2">
  108.     //            <table border="1" cellpadding="0" cellspacing="1" style="width: 100%">
  109.     //                <tr>
  110.     //                    <th style="width: 72px; height: 19px">
  111.     //                    </th>
  112.     //                    <th style="width: 461px; height: 19px">
  113.     //                        论坛</th>
  114.     //                    <th style="width: 100px; height: 19px">
  115.     //                        主题</th>
  116.     //                    <th style="width: 100px; height: 19px">
  117.     //                        回复</th>
  118.     //                    <th style="width: 100px; height: 19px">
  119.     //                        最后更新</th>
  120.     //                </tr>
  121.     //                <tr>
  122.     //                    <td style="width: 72px; height: 84px" align="center" valign="middle">
  123.     //                        <img src="Images/user_login_03.gif" style="width: 100%; height: 57px" /></td>
  124.     //                    <td style="width: 461px; height: 84px">
  125.     //                        ☆本论坛板块专门进行计算机技术方面内容☆</td>
  126.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  127.     //                        12</td>
  128.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  129.     //                        66</td>
  130.     //                    <td style="width: 100px; height: 84px">
  131.     //                        2009-10-11
  132.     //                        <br />
  133.     //                        10:10:10</td>
  134.     //                </tr>
  135.     //                <tr>
  136.     //                    <td style="width: 72px; height: 84px" align="center" valign="middle">
  137.     //                        <img src="Images/user_suc.gif" style="width: 52px; height: 57px" /></td>
  138.     //                    <td style="width: 461px; height: 84px">
  139.     //                        ☆本论坛板块专门进行工作技术方面内容☆</td>
  140.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  141.     //                        12</td>
  142.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  143.     //                        66</td>
  144.     //                    <td style="width: 100px; height: 84px">
  145.     //                        2009-10-11
  146.     //                        <br />
  147.     //                        10:10:10</td>
  148.     //                </tr>
  149.     //            </table>
  150.     //        </td>
  151.     //    </tr>
  152.     //</table>
  153.     //<table class="usertableborder" cellspacing="1" cellpadding="3" width="100%" align="center"
  154.     //    border="0">
  155.     //    <tr>
  156.     //        <th colspan="3" style="height: 25px">
  157.     //            ☆业务交流☆</th>
  158.     //    </tr>
  159.     //    <tr>
  160.     //        <td class="usertablerow2" align="center" style="height: 32px; width: 100%;" colspan="2">
  161.     //            <table border="1" cellpadding="0" cellspacing="1" style="width: 100%">
  162.     //                <tr>
  163.     //                    <th style="width: 72px; height: 19px">
  164.     //                    </th>
  165.     //                    <th style="width: 461px; height: 19px">
  166.     //                        论坛</th>
  167.     //                    <th style="width: 100px; height: 19px">
  168.     //                        主题</th>
  169.     //                    <th style="width: 100px; height: 19px">
  170.     //                        回复</th>
  171.     //                    <th style="width: 100px; height: 19px">
  172.     //                        最后更新</th>
  173.     //                </tr>
  174.     //                <tr>
  175.     //                    <td style="width: 72px; height: 84px" align="center" valign="middle">
  176.     //                        <img src="Images/login-welcome.gif" style="width: 52px; height: 57px" /></td>
  177.     //                    <td style="width: 461px; height: 84px">
  178.     //                        ☆本论坛板块专门进行营销技术方面内容☆</td>
  179.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  180.     //                        12</td>
  181.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  182.     //                        66</td>
  183.     //                    <td style="width: 100px; height: 84px">
  184.     //                        2009-10-11
  185.     //                        <br />
  186.     //                        10:10:10</td>
  187.     //                </tr>
  188.     //                <tr>
  189.     //                    <td style="width: 72px; height: 84px" align="center" valign="middle">
  190.     //                        <img src="Images/user_err.gif" style="width: 52px; height: 57px" /></td>
  191.     //                    <td style="width: 461px; height: 84px">
  192.     //                        ☆本论坛板块专门进行培训技术方面内容☆</td>
  193.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  194.     //                        12</td>
  195.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  196.     //                        66</td>
  197.     //                    <td style="width: 100px; height: 84px">
  198.     //                        2009-10-11
  199.     //                        <br />
  200.     //                        10:10:10</td>
  201.     //                </tr>
  202.     //                           <tr>
  203.     //                    <td style="width: 72px; height: 84px" align="center" valign="middle">
  204.     //                        <img src="Images/worldmap.jpg" style="width: 52px; height: 57px" /></td>
  205.     //                    <td style="width: 461px; height: 84px">
  206.     //                        ☆本论坛板块专门进行培训技术方面内容☆</td>
  207.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  208.     //                        12</td>
  209.     //                    <td style="width: 100px; height: 84px" align="center" valign="middle">
  210.     //                        66</td>
  211.     //                    <td style="width: 100px; height: 84px">
  212.     //                        2009-10-11
  213.     //                        <br />
  214.     //                        10:10:10</td>
  215.     //                </tr>
  216.     //            </table>
  217.    
  218.           
  219.          
  220.     //        </td>
  221.     //    </tr>
  222.      
  223.     //</table>