// GET: JenisTanah/Edit/5 public ActionResult Edit(int id) { if ((bool)Session["Login"]) { MetaniContext context = new MetaniContext(); return(View(context.FindJenisTanah(id))); } return(RedirectToAction("Login", "Admin")); }
// GET: JenisTanah/Details/5 public ActionResult Details(int id) { if ((bool)Session["Login"]) { try { MetaniContext context = new MetaniContext(); return(View(context.FindJenisTanah(id))); } catch { return(RedirectToAction("Index")); } } return(RedirectToAction("Login", "Admin")); }