Exemplo n.º 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();
        }
    }
Exemplo n.º 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);
    }
Exemplo n.º 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>";
        }
    }
Exemplo n.º 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;
     }
 }
Exemplo n.º 5
0
 public void ListBind()
 {
     if (ul.JiaoSe(ul.LoginID).Equals("系统管理员"))
     {
         where = "";
         PageBind2();
     }
     else
     {
         Tunnel.BLL.Tunnel_bum tb  = new Tunnel.BLL.Tunnel_bum();
         Tunnel_bum            tbb = new Tunnel_bum();
         tmm = tm.GetModel(Convert.ToInt64(ul.LoginID.ToString()));
         if (tmm != null)
         {
             if (!string.IsNullOrEmpty(tmm.m_bum.ToString()))
             {
                 tbb = tb.GetModel(Convert.ToInt64(tmm.m_bum.ToString()));
                 if (tbb != null)
                 {
                     List <Tunnel.Model.Tunnel_SelType> tsList = new List <Tunnel_SelType>();
                     Tunnel.BLL.SelType tst = new Tunnel.BLL.SelType();
                     tsList = tst.GetModelList("");
                     // bumname='" + tbb.b_name + "'
                     if (tsList.Count > 0)
                     {
                         for (int i = 0; i < tsList.Count; i++)
                         {
                             bhtype += tsList[i].TypeID.ToString() + "|";
                         }
                         if (bhtype.Length > 0)
                         {
                             bhtype = bhtype.Substring(0, bhtype.Length - 1);
                         }
                     }
                     where = "";
                     for (int i = 0; i < bhtype.Split('|').Length; i++)
                     {
                         if (where.Length > 0)
                         {
                             if (i == bhtype.Split('|').Length - 1)
                             {
                                 where += "  or typeid=" + bhtype.Split('|')[i] + ")";
                             }
                             else
                             {
                                 where += "  or typeid=" + bhtype.Split('|')[i] + "";
                             }
                         }
                         else
                         {
                             where += "   (typeid=" + bhtype.Split('|')[i] + "";
                         }
                     }
                     PageBind2();
                 }
                 else
                 {
                     MTCPager1.RecordCount = 0;
                 }
             }
         }
     }
 }
Exemplo n.º 6
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>";
        }
    }