public ActionResult Create(ARTICLEREPLY articleReply) { if (ModelState.IsValid) { articleReply.BUD_DTM = DateTime.Now; db.ARTICLEREPLY.Add(articleReply); db.SaveChanges(); return RedirectToAction("Index", new { id = articleReply.ARTICLE_ID }); } else return View(); }
public ActionResult Edit(ARTICLEREPLY instance) { if (ModelState.IsValid) { instance.BUD_DTM = DateTime.Now; TryUpdateModel(this.GetSingle(instance.ID), new string[] { "BODY", "BUD_DTM", "AUTHOR" }); db.SaveChanges(); return RedirectToAction("Index", new { id = instance.ARTICLE_ID }); } else return View(); }