public ActionResult Edit(string id, MessageInfo item) { try { PostMessager pm = new PostMessager(); pm.UpdateItem(Guid.Parse(id), item.Schedule, item.Subject, item.Context); return RedirectToAction("Index"); } catch { return View(); } }
public ActionResult Create(MessageInfo item) { try { PostMessager pm = new PostMessager(); pm.AddNew(item.Schedule, item.Subject, item.Context); return RedirectToAction("Index"); } catch { return View(); } }
// GET: DailyMessage/Create public ActionResult Create() { MessageInfo item = new MessageInfo() { Schedule = DateTime.Now }; return View(item); }