Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    Model.ed_node model = nBll.GetModel(int.Parse(Request.QueryString["id"].ToString()));
                    DataTable     dt    = nBll.GetList("parentId=" + model.ID + " and types=3 order by orders desc").Tables[0];
                    if (dt.Rows.Count == 0)
                    {
                        dt = nBll.GetList("parentId=" + model.parentId.Value + " and types=3 order by orders desc").Tables[0];
                    }
                    rptNode.DataSource = dt;
                    rptNode.DataBind();

                    DataTable dt2 = pBll.GetList("nodeId=" + Request.QueryString["id"].ToString() + "or nodeId in (select Id from ed_node where parentId=" + Request.QueryString["id"].ToString() + ") order by addTime desc").Tables[0];
                    for (int i = 0; i < dt2.Rows.Count; i++)
                    {
                        if (string.IsNullOrEmpty(dt2.Rows[i]["picBig"].ToString()))
                        {
                            dt2.Rows[i]["picBig"] = "/images/klm.png";
                        }
                    }

                    rptProductList.DataSource = dt2;
                    rptProductList.DataBind();

                    //导航
                    List <Model.ed_node> list = nBll.GetModelList("id=" + model.parentId);
                    if (list.Count > 0)
                    {
                        if (list[0].parentId.Value != 0)
                        {
                            List <Model.ed_node> list2 = nBll.GetModelList("id=" + list[0].parentId);
                            if (list2.Count > 0)
                            {
                                litNav.Text = list2[0].title + " > " + list[0].title + ">" + model.title;
                            }
                        }
                        else
                        {
                            litNav.Text = list[0].title + ">" + model.title;
                        }
                    }
                    else
                    {
                        litNav.Text = model.title;
                    }
                }
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                rptNodelist.DataSource = nBll.GetList("parentId=0 and isShow=1 order by orders desc");
                rptNodelist.DataBind();

                BLL.web_site   wsBll = new BLL.web_site();
                Model.web_site model = wsBll.GetModelList("")[0];
                title          = model.title;
                keywords       = "\"" + model.keywords + "\"";
                des            = "\"" + model.description + "\"";
                litBottom.Text = model.bottom;
                logo           = "<img alt=\"" + model.webName + "\" src=\"" + model.logo + "\" style=\"float: left;\" />";
            }
        }
Beispiel #3
0
        private void bindParentMenu()
        {
            ddrParent.Items.Clear();
            BLL.ed_node deptBll = new BLL.ed_node();
            DataTable   dt      = deptBll.GetList("parentId=0 order by orders asc").Tables[0];

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                ddrParent.Items.Add(new ListItem(dt.Rows[i]["title"].ToString(), dt.Rows[i]["Id"].ToString()));
                DataTable dt2 = deptBll.GetList("parentId=" + dt.Rows[i]["id"].ToString() + "   order by orders desc").Tables[0];
                for (int j = 0; j < dt2.Rows.Count; j++)
                {
                    ddrParent.Items.Add(new ListItem("┣" + dt2.Rows[j]["title"].ToString(), dt2.Rows[j]["Id"].ToString()));
                }
            }
            ddrParent.Items.Insert(0, new ListItem("根栏目", "0"));
        }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    model = pBll.GetModel(int.Parse(Request.QueryString["id"].ToString()));

                    Model.ed_node modelNode = nBll.GetModel(model.nodeId.Value);
                    DataTable     dt        = nBll.GetList("parentId=" + modelNode.ID + " and types=3 order by orders desc").Tables[0];
                    if (dt.Rows.Count == 0)
                    {
                        dt = nBll.GetList("parentId=" + modelNode.parentId.Value + " and types=3 order by orders desc").Tables[0];
                    }
                    rptNode.DataSource = dt;
                    rptNode.DataBind();
                }
            }
        }