private bool DoEdit(int _id) { bool result = true; BLL.ArticleBll bll = new BLL.ArticleBll(); Entity.Article model = bll.GetEntity(_id); model.ChannelID = this.channel_id; model.Title = txtTitle.Text.Trim(); model.LinkURL = txtLinkUrl.Text.Trim(); model.ImageURL = txtImgUrl.Text.Trim(); //model.Author = txtAuthor.Text.Trim(); //model.From = txtForm.Text.Trim(); //model.Summary = Utils.DropHTML(txtZhaiyao.Text, 250); model.SortID = int.Parse(txtSortId.Text.Trim()); model.ClickCount = int.Parse(txtClick.Text.Trim()); model.Content = txtContent.Value; model.IsRecommend = 0; if (cblItem.Items[0].Selected == true) { model.IsRecommend = 1; } if (!bll.Update(model)) { result = false; } return result; }
private bool DoEdit(int _id) { bool result = true; BLL.ArticleBll bll = new BLL.ArticleBll(); Entity.Article model = bll.GetEntity(_id); model.ChannelID = this.channel_id; model.Title = txtTitle.Text.Trim(); model.LinkURL = txtLinkUrl.Text.Trim(); //model.ImageURL = txtImgUrl.Text.Trim(); model.SortID = int.Parse(txtSortId.Text.Trim()); model.ClickCount = int.Parse(txtClick.Text.Trim()); model.Content = txtContent.Value; model.CategoryID = int.Parse(ddlCategoryId.SelectedValue); model.IsRecommend = 0; model.IsHot = 0; if (cblItem.Items[0].Selected == true) { model.IsRecommend = 1; } if (cblItem.Items[1].Selected == true) { model.IsHot = 1; } if (!bll.Update(model)) { result = false; } return result; }