示例#1
0
        // 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"));
        }
示例#2
0
        // 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"));
        }