示例#1
0
 private bool DoEdit(int _id)
 {
     try
     {
         Rain.BLL.article_category   articleCategory = new Rain.BLL.article_category();
         Rain.Model.article_category model           = articleCategory.GetModel(_id);
         int num = int.Parse(this.ddlParentId.SelectedValue);
         model.channel_id = this.channel_id;
         model.call_index = this.txtCallIndex.Text.Trim();
         model.title      = this.txtTitle.Text.Trim();
         if (num != model.id)
         {
             model.parent_id = num;
         }
         model.sort_id         = int.Parse(this.txtSortId.Text.Trim());
         model.seo_title       = this.txtSeoTitle.Text;
         model.seo_keywords    = this.txtSeoKeywords.Text;
         model.seo_description = this.txtSeoDescription.Text;
         model.link_url        = this.txtLinkUrl.Text.Trim();
         model.img_url         = this.txtImgUrl.Text.Trim();
         model.content         = this.txtContent.Value;
         if (articleCategory.Update(model))
         {
             this.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改" + this.channel_name + "频道栏目分类:" + model.title);
             return(true);
         }
     }
     catch
     {
         return(false);
     }
     return(false);
 }
示例#2
0
 protected override void ShowPage()
 {
     this.page        = DTRequest.GetQueryInt("page", 1);
     this.category_id = DTRequest.GetQueryInt("category_id");
     Rain.BLL.article_category articleCategory = new Rain.BLL.article_category();
     this.model.title = "所有类别";
     if (this.category_id <= 0 || !articleCategory.Exists(this.category_id))
     {
         return;
     }
     this.model = articleCategory.GetModel(this.category_id);
 }