Example #1
0
 public ActionResult AddNew(News news)
 {
     news.publictime = DateTime.Now;
     NewsService.GetInstance().Save(news);
     return RedirectToAction("news");
 }
Example #2
0
 public void Save(News news)
 {
     if (news.id > 0)
         _newsDao.Update(news);else
     _newsDao.Insert(news);
 }
Example #3
0
 partial void DeleteNews(News instance);
Example #4
0
 partial void UpdateNews(News instance);
Example #5
0
 partial void InsertNews(News instance);
Example #6
0
		private void detach_News(News entity)
		{
			this.SendPropertyChanging();
			entity.Category = null;
		}
Example #7
0
		private void attach_News(News entity)
		{
			this.SendPropertyChanging();
			entity.Category = this;
		}