Ejemplo n.º 1
0
 private void doPost()
 {
     int typeid = int.Parse(ViewState["pid"].ToString());
     light.BLL.leftmenu bll = new light.BLL.leftmenu();
     light.Model.leftmenu model =bll.GetModel(typeid);
     model.c_description = Request["c_description"];
     model.k_description = Request["k_description"];
     model.e_description = Request["e_description"];
     bll.Update(model);
     light.Common.WebMessageBox.ShowMessageBoxRedirect("修改成功!", "menuedit.aspx?pid=" + ViewState["pid"].ToString(), Page);
 }
Ejemplo n.º 2
0
 private void doPost()
 {
     string cname = Request["cname"];
     light.BLL.leftmenu bll = new light.BLL.leftmenu();
     light.Model.leftmenu model = new light.Model.leftmenu();
     model.addtime = DateTime.Now;
     model.cnname = cname;
     model.enname = light.Common.Hz2Py.Convert(cname);
     model.isopen = 1;
     model.parentid = int.Parse(ViewState["pid"].ToString());
     bll.Add(model);
     WebMessageBox.ShowMessageBox("添加成功", this);
 }
Ejemplo n.º 3
0
 private void doPost()
 {
     string cname = Request["cname"];
     light.BLL.leftmenu bll = new light.BLL.leftmenu();
     if (!bll.Exists(cname))
     {
         model = bll.GetModel(int.Parse(ViewState["pid"].ToString()));
         model.cnname = cname;
         bll.Update(model);
         WebMessageBox.ShowMessageBox("修改成功", this);
     }
     else
     {
         WebMessageBox.ShowMessageBox("该菜单名已经存在", this);
     }
 }
Ejemplo n.º 4
0
    public string SubMenu()
    {
        StringBuilder sb = new StringBuilder();
        sb.Append("<h2>网站管理中心</h2>");
        sb.Append("<div class=\"left_box1\">");
        sb.Append("<h3>产品管理</h3>");
        sb.Append("<ul class=\"margin_b6\">");

        sb.Append("<li><a href=\"/back/product/showlist.aspx\">网站产品列表</a></li>");
        //sb.Append("<li><a href=\"/back/product/dellist.aspx\">被删除的产品</a></li>");
        sb.Append("<li><a href=\"/back/product/add.aspx\">添加网站产品</a></li>");
        sb.Append("<li><a href=\"/back/category/showlist.aspx\">产品分类管理</a></li>");
        sb.Append("</ul>");
        sb.Append("<h3>新闻管理</h3>");
        sb.Append("<ul class=\"margin_b6\">");
        sb.Append("<li><a href=\"/back/news/showlist.aspx\">网站新闻列表</a></li>");
        //sb.Append("<li><a href=\"/back/news/dellist.aspx\">被删除的新闻</a></li>");
        sb.Append("<li><a href=\"/back/news/add.aspx\">添加网站新闻</a></li>");
        sb.Append("</ul>");
        sb.Append("<h3>栏目管理</h3>");
        sb.Append("<ul class=\"margin_b6\">");

        DataTable dt = new light.BLL.leftmenu().GetList(" 1=1 ").Tables[0];
        foreach (DataRow dr in dt.Rows)
        {
            sb.Append("<li><a href=\"/back/leftmenu/menuedit.aspx?pid=" + dr["pkid"].ToString() + "\">【" + dr["cname"].ToString() + "】</a></li>");
        }
        sb.Append("</ul>");
        sb.Append("<h3>站点管理</h3>");
        sb.Append("<ul class=\"margin_b6\">");
        sb.Append("<li><a href=\"/back/main.aspx\">网站基本信息</a></li>");
        sb.Append("<li><a href=\"/back/changepass.aspx\">修改密码</a></li>");
        sb.Append("<li><a href=\"/logout.aspx\">安全退出系统</a></li>");
        sb.Append("</ul>");
        sb.Append("</div>");
        return sb.ToString();
    }
Ejemplo n.º 5
0
    public string leftnav(int type)
    {
        StringBuilder myStringBuilder = new StringBuilder();
        myStringBuilder.Append("<div class='syCss_2010461021968'>");
        myStringBuilder.Append("<table class='Board_Tab' width='100%' border='0' cellspacing='0' cellpadding='0'>");
        //DataTable dt = new light.BLL.leftmenu().GetList(" parentid=0 ").Tables[0];
        DataTable dt = new light.BLL.leftmenu().GetList(" 1=1 ").Tables[0];
        foreach (DataRow dr in dt.Rows)
        {
            myStringBuilder.Append("<tr>");
            myStringBuilder.Append("<td align='center' height='39'  background='/images/left.jpg'>");
            if (type == 1)
            {
                myStringBuilder.Append("<a href='CompanyInfo.aspx?id=" + dr["pkid"].ToString() + "' target='_self'>[" + dr["cname"].ToString() + "]</a>");
            }
            else if (type == 2)
            {
                myStringBuilder.Append("<a href='CompanyInfo.aspx?id=" + dr["pkid"].ToString() + "' target='_self'>[" + dr["ename"].ToString().Split('|')[1] + "]</a>");
            }
            else
            {
                myStringBuilder.Append("<a href='CompanyInfo.aspx?id=" + dr["pkid"].ToString() + "' target='_self'>[" + dr["ename"].ToString().Split('|')[0] + "]</a>");

            }

            myStringBuilder.Append("</td>");
            myStringBuilder.Append("</tr>");
        }
        myStringBuilder.Append("</table>");
        myStringBuilder.Append("</div>");
        return myStringBuilder.ToString();
    }
Ejemplo n.º 6
0
    private void showinfo(int id)
    {
        switch (UserState.lng)
        {
            case "cn":
                pageVal = 1;
                break;
            case "kr":
                pageVal = 2;
                break;
            case "en":
                pageVal = 3;
                break;

        }

        light.Model.leftmenu model = new light.BLL.leftmenu().GetModel(id);

        StringBuilder sb = new StringBuilder();

        string title = string.Empty;
        string list = string.Empty;

        if (pageVal == 1)
        {
            title = model.cnname;
            description = model.c_description;
        }
        else if (pageVal == 2)
        {
            title = model.enname.Split('|')[1];
            description = model.k_description;
        }
        else
        {
            title = model.enname.Split('|')[0];
            description = model.e_description;
        }

        list = base.leftnav(pageVal);

        sb.AppendLine(@" <table style=""z-index: 100"" border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%"">");
        sb.AppendLine(@"                            <tbody>");

        sb.AppendLine(@"                                <tr>");
        sb.AppendLine(@"                                    <td style=""padding-left: 45px; color: #ffffff; font-size: 14px; font-weight: bold""");

        sb.AppendLine(@"                                        height=""39"" background=""/images/title.jpg"">" + title);
        sb.AppendLine(@"                                    </td>");
        sb.AppendLine(@"                                </tr>");
        sb.AppendLine(@"                                <tr>");
        sb.AppendLine(@"                                    <td style=""padding-bottom: 2px; padding-left: 5px; padding-right: 5px; padding-top: 2px""");
        sb.AppendLine(@"                                        valign=""top"">");
        sb.AppendLine(@"                                        " + list);
        sb.AppendLine(@"                                    </td>");
        sb.AppendLine(@"                                </tr>");
        sb.AppendLine(@"                            </tbody>");
        sb.AppendLine(@"                        </table>");

        leftString = sb.ToString();
    }