コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         litId.Text = Request.QueryString["id"].ToString();
         Model.ed_node model = nBll.GetModel(int.Parse(litId.Text));
         litName.Text = model.title;
     }
 }
コード例 #2
0
        private void ShowInfo(int siId)
        {
            hm.Model.ed_page model = bll.GetModel(siId);
            this.lblId.Text     = model.ID.ToString();
            this.txtRemark.Text = model.remark;

            Model.ed_node modelNode = nBll.GetModel(model.nodeId.Value);
            litId.Text   = modelNode.ID.ToString();
            litName.Text = modelNode.title;
        }
コード例 #3
0
        private void ShowInfo(int newsId)
        {
            hm.BLL.news   bll   = new hm.BLL.news();
            hm.Model.news model = bll.GetModel(newsId);
            this.lblNewsId.Text = model.newsId.ToString();

            this.txtnewsTitle.Text = model.newsTitle;
            this.txtContent.Text   = model.newsContent;

            Model.ed_node modelNode = nBll.GetModel(model.catId.Value);
            litId.Text   = modelNode.ID.ToString();
            litName.Text = modelNode.title;
        }
コード例 #4
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;
                    }
                }
            }
        }
コード例 #5
0
ファイル: Master.Master.cs プロジェクト: tcld2269/HM_ED
        public static string getNodeUrl(string nodeId)
        {
            BLL.ed_node nBll   = new BLL.ed_node();
            string      result = "";

            Model.ed_node model = nBll.GetModel(int.Parse(nodeId));
            if (model.url == "0")
            {
                result = "javascript:void(0)";
            }
            else
            {
                if (!string.IsNullOrEmpty(model.url))
                {
                    result = model.url;
                }
                else
                {
                    if (model.types.ToString() == StatusHelper.Node_Type_Page)
                    {
                        result = "/node.aspx?id=" + model.ID;
                    }
                    else if (model.types.ToString() == StatusHelper.Node_Type_News)
                    {
                        result = "/newsList.aspx?id=" + model.ID;
                    }
                    else if (model.types.ToString() == StatusHelper.Node_Type_Product)
                    {
                        result = "/productList.aspx?id=" + model.ID;
                    }
                    else if (model.types.ToString() == StatusHelper.Node_Type_Media)
                    {
                        result = "/mediaList.aspx?id=" + model.ID;
                    }
                    else
                    {
                        result = "/error.aspx";
                    }
                }
            }

            return(result);
        }
コード例 #6
0
        private void ShowInfo(int siId)
        {
            hm.BLL.ed_product   bll   = new hm.BLL.ed_product();
            hm.Model.ed_product model = bll.GetModel(siId);
            this.lblId.Text     = model.ID.ToString();
            txtTitle.Text       = model.title;
            this.txtRemark.Text = model.remark;
            imagePic.ImageUrl   = model.picSmall;
            litPicSmall.Text    = model.picSmall;
            litPicBig.Text      = model.picBig;
            if (model.isRecommend.Value == 1)
            {
                cbRecommend.Checked = true;
            }

            Model.ed_node modelNode = nBll.GetModel(model.nodeId.Value);
            litId.Text   = modelNode.ID.ToString();
            litName.Text = modelNode.title;
        }
コード例 #7
0
ファイル: productShow.aspx.cs プロジェクト: tcld2269/HM_ED
        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();
                }
            }
        }
コード例 #8
0
ファイル: Add.aspx.cs プロジェクト: tcld2269/HM_ED
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["id"] != null)
                {
                    litId.Text = Request.QueryString["id"].ToString();

                    if (bll.GetList("nodeId=" + litId.Text).Tables[0].Rows.Count > 0)
                    {
                        MessageBox.ShowAndRedirect(this, "已添加过该栏目的单页!", "../media/list.aspx?id=" + litId.Text);
                        return;
                    }

                    Model.ed_node model = nBll.GetModel(int.Parse(litId.Text));
                    litName.Text = model.title;
                }
                else
                {
                    MessageBox.ShowAndRedirect(this, "参数丢失!", "../media/list.aspx?id=" + litId.Text);
                    return;
                }
            }
        }