コード例 #1
0
ファイル: AdminController.cs プロジェクト: dalinhuang/loosoft
 public ActionResult AddNew(News news)
 {
     news.publictime = DateTime.Now;
     NewsService.GetInstance().Save(news);
     return RedirectToAction("news");
 }
コード例 #2
0
ファイル: NewsService.cs プロジェクト: dalinhuang/loosoft
 public void Save(News news)
 {
     if (news.id > 0)
         _newsDao.Update(news);else
     _newsDao.Insert(news);
 }
コード例 #3
0
 partial void DeleteNews(News instance);
コード例 #4
0
 partial void UpdateNews(News instance);
コード例 #5
0
 partial void InsertNews(News instance);
コード例 #6
0
		private void detach_News(News entity)
		{
			this.SendPropertyChanging();
			entity.Category = null;
		}
コード例 #7
0
		private void attach_News(News entity)
		{
			this.SendPropertyChanging();
			entity.Category = this;
		}