Пример #1
0
    public string LoadMenuTop()
    {
        StringBuilder str = new StringBuilder();

        foreach (var item in repo.GetModByBoxCode("MenuTop"))
        {
            str.Append("<li><a href=\"/" + item.Mod_Url + ".htm\">" + item.Mod_Name + "</a></li>");
            if (repo.GetModByBoxCode("MenuTop").IndexOf(item) != repo.GetModByBoxCode("MenuTop").Count - 1)
            {
                str.Append("<li><i>|</i><li>");
            }
        }
        return(str.ToString());
    }
Пример #2
0
    public string LoadMainMenu()
    {
        ModRepository modRepo = new ModRepository();
        StringBuilder str     = new StringBuilder();

        foreach (var item in modRepo.GetModByBoxCode("MainMenu"))
        {
            string active = item.Mod_ID == modid ? "active" : "";
            str.Append("<li><a class=\"" + active + "\" href=\"/" + item.Mod_Url + ".htm\">" + item.Mod_Name + "</a></li>");
        }
        return(str.ToString());
    }
Пример #3
0
    public string GetAboutMenu()
    {
        ModRepository modRepo = new ModRepository();
        StringBuilder str     = new StringBuilder();

        str.Append("<ul>");
        foreach (var item in modRepo.GetModByBoxCode("ve-cong-ty-2"))
        {
            str.Append("<li><a href=\"/" + item.Mod_Url + ".htm\">" + item.Mod_Name + "</a></li>");
        }
        str.Append("</ul>");
        return(str.ToString());
    }