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