Пример #1
0
    private void InitArtList()
    {
        if (Request["cl"] != null)
        {
            clsid = Convert.ToInt32(Request["cl"]);
        }
        clsSn = clsid.ToString();
        REQEXTINFO ext;

        GetPageCtrlValue(out ext);
        if (ext.dwStartLine == null)
        {
            ext.dwStartLine = 1;
        }
        else
        {
            ext.dwStartLine++;
        }
        List <InfoItem> list = ibll.GetAllArticlesTitleByClass(clsid, (int)ext.dwStartLine, (int)ext.dwNeedLines);

        if (list != null && list.Count > 0)
        {
            for (int i = 0; i < list.Count; i++)
            {
                InfoItem art = list[i];
                artList += "<tr>";
                artList += "<td>" + art.Title + "</td>";
                artList += "<td>" + art.Summary + "</td>";
                artList += "<td >" + art.Author + "</td>";
                artList += "<td>" + converter.ValueToDateConverter(art.Credate) + "</td>";
                artList += "<td >" + converter.StatusConverter(art.Infostatus) + "</td>";
                artList += "<td >" + "<a class='edit' artId='" + art.Infoid + "' style='cursor:pointer;color:#0094ff;'>编辑</a> | " +
                           "<a target='_blank' href='" + ResolveClientUrl("~/ClientWeb/xcus/zyy/ArticleList.aspx") + "?gr=" + art.Infogroup + "&art=" + art.Infoid + "'>预览</a></td>";
                artList += "</tr>";
            }
            ext.dwTotolLines = (uint)ibll.GetAllArticleNumberByClass(clsid);
            updatePCtrl(ext);
        }
    }
Пример #2
0
    private void GetArtListByCls(int sta)
    {
        if (string.IsNullOrEmpty(Request["cl"]))
        {
            ErrMsg("参数错误!");
            return;
        }
        int             cls   = Convert.ToInt32(Request["cl"]);
        int             start = Convert.ToInt32(Request["start"]);
        int             need  = Convert.ToInt32(Request["need"]);
        List <InfoItem> arts;

        if (sta == -1)
        {
            arts = ibll.GetPubArticlesTitleByClass(cls, start, need);
        }
        else if (sta == -2)
        {
            arts = ibll.GetAllArticlesTitleByClass(cls, start, need);
        }
        else if (sta == 1)
        {
            arts = ibll.GetPubArticlesByClass(cls, start, need);
        }
        else
        {
            arts = new List <InfoItem>();
        }
        List <uniart> list = new List <uniart>();

        ToArt(ref list, arts);
        unipctrl pc = new unipctrl();

        pc.total = ibll.GetPubArticleNumberByClass(cls);
        pc.start = start;
        pc.need  = need;
        SucRltPCtrl(list, pc);
    }