private void detach_module_article(module_article entity)
		{
			this.SendPropertyChanging();
			entity.normal_class = null;
		}
 partial void Deletemodule_article(module_article instance);
		private void attach_module_article(module_article entity)
		{
			this.SendPropertyChanging();
			entity.normal_channel = this;
		}
 partial void Updatemodule_article(module_article instance);
 partial void Insertmodule_article(module_article instance);
 /// <summary>
 /// 修改文章
 /// </summary>
 /// <param name="article"></param>
 /// <returns></returns>
 public int UpdateArticle(module_article a)
 {
     string sql = string.Format(@"update module_article set ClassId={0},Title='{1}',TColor='{2}',Summary='{3}',Editor='{4}',Author='{5}',Tags='{6}',Img='{7}',IsImg={8},SourceFrom='{9}',Content='{10}' where Id={11}", a.ClassId, a.Title, a.TColor, a.Summary, a.Editor, a.Author, a.Tags, a.Img, a.IsImg, a.SourceFrom, a.Content, a.Id);
     return SqlHelper.ExecuteNonQuery(CommandType.Text, sql);
 }
 /// <summary>
 /// 添加文章
 /// </summary>
 /// <param name="article"></param>
 /// <returns></returns>
 public int InsertArticle(module_article article)
 {
     db.module_article.InsertOnSubmit(article);
     db.SubmitChanges();
     return article.Id;
 }
 /// <summary>
 /// 解析单条内容标签
 /// </summary>
 /// <param name="_pagestr"></param>
 /// <param name="_contentid"></param>
 /// <returns></returns>
 private void executeTag_Content(ref string _pagestr, module_article article)
 {
     _pagestr = _pagestr.Replace("{$_title}", article.Title);
     _pagestr = _pagestr.Replace("{$_id}", article.Id.ToString());
     _pagestr = _pagestr.Replace("{$_adddate}", article.AddDate.ToString("yyyy-MM-dd"));
     _pagestr = _pagestr.Replace("{$_viewnum}", article.ViewNum.ToString());
     _pagestr = _pagestr.Replace("{$_author}", article.Author);
     _pagestr = _pagestr.Replace("{$_summary}", article.Summary);
     _pagestr = _pagestr.Replace("{$Content}", article.Content);
     _pagestr = _pagestr.Replace("{$ChannelId}", article.ChannelId.ToString());
 }