Example #1
0
    private void AddInfoHtml(XYECOM.Model.XYClassInfo info, string parentID, string str, String ename)
    {
        StringBuilder strhtml = new StringBuilder();

        strhtml.AppendLine("<li id=\"lithis" + info.ClassId + "\">");
        strhtml.AppendLine(str);
        strhtml.AppendLine(info.HasSub ? "<a href=\"javascript:LabelClassDisplay('li_" + info.ClassId + "','lithis" + info.ClassId + "');\">" + Img2 + "</a>" : Img2);
        strhtml.AppendLine(info.HasSub ? "<input id=\"input_" + parentID + "_" + info.ClassId + "\" type=\"checkbox\" value=\"" + info.ClassId + "\" />" + imgParent + " " + info.ClassName + "    " + img3 +
                                                         "[&nbsp;<a href=\"TitleList.aspx?upid=" + info.ClassId + "\" >↑</a>&nbsp;]" +
                                                    "[&nbsp;<a href=\"TitleList.aspx?downid=" + info.ClassId + "\" >↓</a>&nbsp;]" +
                                                        "[&nbsp;<a href=\"AddTitle.aspx?Type=0&ntid=" + info.ClassId + "\">添加</a>&nbsp;]" +
                                                        " [&nbsp;<a href=\"AddTitle.aspx?Type=1&ntid=" + info.ClassId + "\">编辑</a>&nbsp;]" +
                                                        " [&nbsp;<a href=\"BatchManage.aspx?PT_ParentID=" + info.ClassId + "\" >移动</a>&nbsp;]"
                            : "<input id=\"input_" + parentID + "_" + info.ClassId + "\" type=\"checkbox\" value=\"" + info.ClassId + "\" />" + imgchird + " " + info.ClassName + "    " + img3 +
                                                "[&nbsp;<a href=\"TitleList.aspx?upid=" + info.ClassId + "\" >↑</a>&nbsp;]" +
                                                "[&nbsp;<a href=\"TitleList.aspx?downid=" + info.ClassId + "\" >↓</a>&nbsp;]" +
                                                " [&nbsp;<a href=\"AddTitle.aspx?Type=0&ntid=" + info.ClassId + "\" >添加</a>&nbsp;]" +
                                                " [&nbsp;<a href=\"AddTitle.aspx?Type=1&ntid=" + info.ClassId + "\" >编辑</a>&nbsp;]" +
                                                " [&nbsp;<a href=\"BatchManage.aspx?PT_ParentID=" + info.ClassId + "\" >移动</a>&nbsp;]" +
                                                " [&nbsp;<a onclick=\"javascript:return confirm('确定删除?')\" href=\"TitleList.aspx?delID=" + info.ClassId + "\" >删除</a>&nbsp;]");

        XYECOM.Business.NewsTitles newstitle = new NewsTitles();
        XYECOM.Model.NewsTitlesInfo newinfo = new XYECOM.Model.NewsTitlesInfo();
        newinfo = newstitle.GetItem(Convert.ToInt32(info.ClassId));
        if (!newinfo.HTMLPage.Equals(""))
        {
            strhtml.AppendLine("<a href=\"" + XYECOM.Configuration.WebInfo.Instance.WebDomain + newinfo.HTMLPage+ "\" target=\"_black\">查看静态页面</a>");
        }

        strhtml.AppendLine("</li>");
        this.pnlSuperClass.Controls.Add(new LiteralControl(strhtml.ToString()));
    }
Example #2
0
    /// <summary>
    /// 得到新闻栏目名称
    /// </summary>
    /// <param name="ntid"></param>
    /// <returns></returns>
    protected string GetTitlsName(object ntid)
    {
        string temp = "";
        XYECOM.Business.NewsTitles nt = new XYECOM.Business.NewsTitles();
        if (ntid != null && ntid.ToString() != "")
        {
            string _tyids = XYECOM.Core.Utils.RemoveComma(ntid.ToString());

            string[] arr = _tyids.Split(',');
            for (int i = 0; i < arr.Length; i++)
            {
                XYECOM.Model.NewsTitlesInfo info = nt.GetItem(XYECOM.Core.MyConvert.GetInt32(arr[i]));

                if (info == null) continue;

                temp += i > 0 ? "," : "";
                temp += info.Name;
            }
        }
        return temp;
    }
Example #3
0
    private void Del(String id)
    {
        int i = 0;
        int j = 0;

        XYECOM.Business.NewsTitles BLL = new NewsTitles();
        XYECOM.Business.XYClass clsBLL = new XYECOM.Business.XYClass();

        string name ="";
        string domain = "";

        XYECOM.Model.NewsTitlesInfo tInfo = BLL.GetItem(XYECOM.Core.MyConvert.GetInt32(id));

        if(tInfo != null)
        {
            name = tInfo.TempletFolderAddress;
            domain = tInfo.DomainName;
        }

        j = clsBLL.InfoNum("n_news","NT_ID",id);

        if(j <= 0)
        {
            i = BLL.Delete(id);
        }
        else
        {
            Alert("该栏目下含有信息!", "TitleList.aspx");
        }

        if( i > 0)
        {
            isfirstid = id;
            Response.Redirect("TitleList.aspx");
        }
    }