public ActionResult Edit(int id, Models.InforMation info) { try { Models.InfoDBHandle idb = new Models.InfoDBHandle(); idb.UpdateInformation(info); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(Models.InforMation info) { try { if (ModelState.IsValid) { Models.InfoDBHandle idb = new Models.InfoDBHandle(); idb.AddInformation(info); return(RedirectToAction("Index")); } ViewBag.Message = " Details Added Successfully"; return(View()); } catch { return(View()); } }