コード例 #1
0
    private void generoneclass(oneclass oneclass)
    {
        StringBuilder sb = new StringBuilder();
        generSB(oneclass.id, oneclass.classname, sb);

        List<oneclass> nclist = clsslogic.GetList(oneclass.id);
        foreach (oneclass item in nclist)
        {
            generSB(item.id, item.classname, sb, false);

        }
        if (oneclass.id == 2)
        {
            //基地建设下,还得添加基地新闻
            List<newclass> newlist = newlogic.GetList(7);
            foreach (newclass item in newlist)
            {
                generSB(item.id, "news", item.classname, sb, false);

            }

        }
        OutStr = sb.ToString();
    }
コード例 #2
0
    public string getOneClassNav()
    {
        string res = string.Empty;
        string lb = Request.QueryString.Get("sid");
        string newsid = Request.QueryString.Get("id");

        classManager mgr = new classManager();

        if (!string.IsNullOrEmpty(newsid))
        {

            WhereClip where = new WhereClip();
            where = where && oneclasso._.id == newsid;
            oneclasso model = new oneclasso();
            model = mgr.GetoneclassoItemById(where);
            if (model != null)
            {
                lb = model.classid.ToString();
            }
        }
        oneclass modelclass = new oneclass();
        WhereClip where2 = new WhereClip();
        where2 = where2 && oneclass._.id == lb;
        modelclass = mgr.GetItemById(where2);
        res = string.Format(@"<a href='Category.aspx?sid=3&type=oneclass'>组织机构</a>&nbsp;&gt;&nbsp;&nbsp;<a href='Category.aspx?sid={0}&type=oneclass'>{1}</a>", modelclass.id, modelclass.classname);
        return res;
    }