Example #1
0
    private void ListBind()
    {
        if (!string.IsNullOrEmpty(Request.QueryString["typeId"]))
        {
            typeId = Convert.ToInt32(Request.QueryString["typeId"]);
        }
        if (typeId > 0)
        {
            PageBind2();
            Tunnel.BLL.SelType ts = new Tunnel.BLL.SelType();
            str = ts.GetModel(typeId).TypeName;
        }
        else
        {
            switch (typeId)
            {
            case 0:
                str    = "新闻列表";
                typeId = 0;
                TypeId = 0;
                break;

            case -1:
                str    = "公告列表";
                typeId = 1;
                TypeId = -1;
                break;
            }
            PageBind1();
        }
    }
Example #2
0
    public string strShow(string str)
    {
        if (string.IsNullOrEmpty(str))
        {
            return("");
        }
        int typeId = Convert.ToInt32(str);

        Tunnel.BLL.SelType ts = new Tunnel.BLL.SelType();
        str = ts.GetModel(typeId).TypeName;

        return(str);
    }
Example #3
0
    /// <summary>
    /// 文章列表 文章浏览 公告栏 新闻栏
    /// </summary>
    /// <param name="num"></param>
    public void WriteSiteMap(int num)
    {
        Master.FindControl("Panel1").Visible = false;
        System.Web.UI.HtmlControls.HtmlGenericControl div = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("Panel2");
        string str = div.InnerHtml;

        div.Visible = true;
        Style sty = new Style();

        div.Style.Add(HtmlTextWriterStyle.Display, "''");
        Tunnel.Model.Tunnel_SelType model = new Tunnel_SelType();
        Tunnel.BLL.SelType          stBll;
        string temp = "";

        if (typeId < 1)
        {
            switch (typeId)
            {
            case -1:
                temp          = "公司公告";
                model.BumName = "";
                break;

            case 0:
                temp          = "公司新闻";
                model.BumName = "";
                break;
            }
            div.InnerHtml = "<font class='titlfontson'><span><a title='首页' href='/Index.aspx'>首页</a></span>"
                            + "<span> &gt; </span>"
                            + "<span>" + temp + "</span>"
                            + "</font>";
        }
        else
        {
            stBll = new Tunnel.BLL.SelType();
            model = stBll.GetModel(typeId);
            if (model != null)
            {
                temp = model.TypeName;
            }
            div.InnerHtml = "<font class='titlfontson'><span><a title='首页' href='/Index.aspx'>首页</a></span>"
                            + "<span> &gt; </span>"
                            + "<span><a title='" + model.BumName + "' href='/" + model.Url + "'>" + model.BumName + "</a></span>"
                            + "<span> &gt; </span>"
                            + "<span>" + temp + "</span>"
                            + "</font>";
        }
    }
Example #4
0
 private void ListBind()
 {
     if (!string.IsNullOrEmpty(Request.QueryString["typeId"]))
     {
         typeId = Convert.ToInt32(Request.QueryString["typeId"]);
     }
     if (sectype == 0)
     {
         PageBind1();
     }
     else
     {
         PageBind2();
         Tunnel.BLL.SelType ts = new Tunnel.BLL.SelType();
         str = ts.GetModel(typeId).TypeName;
     }
 }
Example #5
0
    /// <summary>
    /// 文章列表 文章浏览 公告栏 新闻栏
    /// </summary>
    /// <param name="num"></param>
    public void WriteSiteMap(int num)
    {
        Master.FindControl("Panel1").Visible = false;
        System.Web.UI.HtmlControls.HtmlGenericControl div = (System.Web.UI.HtmlControls.HtmlGenericControl)Master.FindControl("Panel2");
        string str = div.InnerHtml;

        div.Visible = true;
        Style sty = new Style();

        div.Style.Add(HtmlTextWriterStyle.Display, "''");
        Tunnel.Model.Tunnel_SelType model = new Tunnel_SelType();
        Tunnel.BLL.SelType          stBll;
        Tunnel.BLL.Tunnel_bum       tbBll = new Tunnel.BLL.Tunnel_bum();
        string temp = "";

        if (typeId < 1)
        {
            switch (typeId)
            {
            case -1:
                temp          = "公告栏";
                model.BumName = "";
                break;

            case 0:
                temp          = "公司新闻";
                model.BumName = "";
                break;
            }
        }
        else
        {
            stBll = new Tunnel.BLL.SelType();
            model = stBll.GetModel(typeId);
            if (model != null)
            {
                temp = model.TypeName;
            }
        }
        if (bum_id != 0)
        {
            div.InnerHtml = "<font class='titlfontson'><span><a title='首页' href='/Index.aspx'>首页</a></span>"
                            + "<span> &gt; </span>"
                            + "<span><a title='" + model.BumName + "-" + tbBll.GetModel(bum_id).b_name + "' href='/" + model.Url + "?bum_id=" + bum_id + "'>" + model.BumName + "-" + tbBll.GetModel(bum_id).b_name + "</a></span>"
                            + "<span> &gt; </span>"
                            + "<span><a title='" + temp + "' href='/N_Index/DataTypeListXJB.aspx?typeid=" + model.TypeID + "&lanmuId=0&bum_id=" + bum_id + "'>" + temp + "</a></span>"
                            + "<span> &gt; </span>"
                            + "<span>详细信息</span>"
                            + "</font>";
        }
        else
        {
            div.InnerHtml = "<font class='titlfontson'><span><a title='首页' href='/Index.aspx'>首页</a></span>"
                            + "<span> &gt; </span>"
                            + "<span><a title='" + model.BumName + "' href='/" + model.Url + "'>" + model.BumName + "</a></span>"
                            + "<span> &gt; </span>"
                            + "<span><a title='" + temp + "' href='/N_Index/DataTypeList.aspx?typeid=" + model.TypeID + "&lanmuId=0'>" + temp + "</a></span>"
                            + "<span> &gt; </span>"
                            + "<span>详细信息</span>"
                            + "</font>";
        }
    }