示例#1
0
        private void GetModel()
        {
            int id = ChangeHope.WebPage.PageRequest.GetQueryInt("id");
            if(id>0)
            {
                this.ltlLink.Text += " | <a href='article_edit.aspx?id=" + id+ "'>编辑</a>";
                ShowShop.BLL.SystemInfo.Article bll = new ShowShop.BLL.SystemInfo.Article();
                Model.SystemInfo.Article model = bll.GetModel(id);
                if (model != null)
                {
                    this.ltlTitle.Text = "标题:" + model.Title;
                    this.ltlContent.Text = model.Content;
                    this.lblMark.Text = "";
                    this.lblMark.Text += "<font color='Green'>";
                    this.lblMark.Text += "<br/><b>作者</b>:" + model.Author;
                    this.lblMark.Text += "<br/><b>发布人</b>:" + model.Users;
                    this.lblMark.Text += "<br/><b>更新人</b>:" + model.Editor;
                    this.lblMark.Text += "<br/><b>发布时间</b>:" + model.CreateTime;

                    this.lblMark.Text += "<br/><b>更新时间</b>:" + model.UpdateTime;
                    this.lblMark.Text += "<br/><b>关键字</b>:" + model.KeyWord;
                    this.lblMark.Text += "<br/><b>来源</b>:" + model.CopyFrom;

                    this.lblMark.Text += "</font><hr size='1'color='#EEEEEE'/>";
                }
                model = null;
                bll = null;
            }
        }
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="id"></param>
 private void Del(string id)
 {
     ShowShop.BLL.SystemInfo.ArticleChannel bll = new ShowShop.BLL.SystemInfo.ArticleChannel();
     if (bll.HasChild(Convert.ToInt32(id))) //判断旗下是否有子频道
     {
         Response.Write("haschild");
         return;
     }
     ShowShop.BLL.SystemInfo.Article abll = new ShowShop.BLL.SystemInfo.Article();
     if (abll.ExistByCid(Convert.ToInt32(id))) //判断该频道下是否有文章
     {
         Response.Write("hasarticel");
         return;
     }
     bll.Delete(id);
     Response.Write("ok");
 }
示例#3
0
 private void GetList()
 {
     ShowShop.BLL.SystemInfo.Article bll = new ShowShop.BLL.SystemInfo.Article();
     this.ltlview.Text = bll.GetListForTable();
     bll = null;
 }
示例#4
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="id"></param>
 private void Del(int id)
 {
     ShowShop.BLL.SystemInfo.Article bll = new ShowShop.BLL.SystemInfo.Article();
     bll.Delete(id);
     Response.Write("ok");
 }