Beispiel #1
0
        public ActionResult UpdateAnnouncements(TBLAnnouncements p)
        {
            var anno = db.TBLAnnouncements.Find(p.ID);

            anno.Category = p.Category;
            anno.Content  = p.Content;
            anno.Date     = p.Date;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult AddNewAnnouncements(TBLAnnouncements p)
 {
     db.TBLAnnouncements.Add(p);
     db.SaveChanges();
     return(RedirectToAction("Index"));
 }