예제 #1
0
 public ActionResult Create(NewsFeed mess)
 {
     if (mess.Message != "" || mess.Message != null)
     {
         NewsFeed.CreateNews(mess);
         return RedirectToAction("Index");
     }
     else {
         return View();
     }
 }
예제 #2
0
 public static void CreateNews(NewsFeed mess)
 {
     Database.ModifyData("INSERT INTO tbl_news (News,EntryDate) VALUES (@news,@date)",Database.AddParameter("@news",mess.Message), Database.AddParameter("@date",DateTime.Now));
 }