Ejemplo n.º 1
0
    /// <summary>
    /// 首页公告列表
    /// </summary>
    /// <param name="Show_Num"></param>
    /// <param name="Cate_ID"></param>
    /// <returns></returns>
    public string Home_Top_Notice(int Show_Num, int Cate_ID)
    {
        string    notice_list = "";
        QueryInfo Query       = new QueryInfo();

        Query.PageSize    = Show_Num;
        Query.CurrentPage = 1;
        Query.ParamInfos.Add(new ParamInfo("AND", "int", "NoticeInfo.Notice_Cate", "=", Cate_ID.ToString()));
        Query.ParamInfos.Add(new ParamInfo("AND", "int", "NoticeInfo.Notice_IsAudit", "=", "1"));
        Query.ParamInfos.Add(new ParamInfo("AND", "str", "NoticeInfo.Notice_Site", "=", "CN"));
        Query.OrderInfos.Add(new OrderInfo("NoticeInfo.Notice_ID", "Desc"));
        IList <NoticeInfo> Notices = Webnotice.GetNoticeList(Query, pub.CreateUserPrivilege("9d4d1366-35ab-4eb6-b88e-e49e6bfae9d7"));

        if (Notices != null)
        {
            foreach (NoticeInfo entity in Notices)
            {
                notice_list = notice_list + " <li><a href=\"/notice/detail.aspx?notice_id=" + entity.Notice_ID + "&cate_id=" + entity.Notice_Cate + "\" target=\"_blank\">" + tools.CutStr(entity.Notice_Title, 36) + "</a></li>";
            }
        }

        return(notice_list);
    }