// // GET: /EventLogAdmin/Create public ActionResult Create() { DateTime dDate = DateTime.Now; EventLog eventlog = new EventLog(); eventlog.EventTime = dDate; return View(eventlog); }
public ActionResult Create(EventLog eventlog) { if (ModelState.IsValid) { db.EventLogs.Add(eventlog); db.SaveChanges(); return RedirectToAction("Index"); } return View(eventlog); }
public ActionResult Edit(EventLog eventlog) { if (ModelState.IsValid) { db.Entry(eventlog).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(eventlog); }