public ActionResult Create() { var announcement = new Announcement(); InitializeViewBagForAnnouncement(); return View(announcement); }
public ActionResult Create(Announcement announcement) { if (ModelState.IsValid) { AnnouncementService.AddAnnouncement(announcement); } return View(announcement); }
public ActionResult Edit(Announcement announcement) { if (ModelState.IsValid) { AnnouncementService.UpdateAnnouncement(announcement); return RedirectToAction("Index"); } InitializeViewBagForAnnouncement(); return View(announcement); }
public void AddAnnouncement(Announcement announcement) { UnitOfWork.Announcements.Insert(announcement); UnitOfWork.Commit(); }
public void AddAnnouncement(Announcement announcement) { throw new NotImplementedException(); }
public ActionResult Create() { var announcement = new Announcement(); return View(announcement); }
public void UpdateAnnouncement(Announcement announcement) { UnitOfWork.Announcements.Update(announcement); UnitOfWork.Commit(); }