コード例 #1
0
        // GET: Lokasi/Edit/5
        public ActionResult Edit(int id)
        {
            if ((bool)Session["Login"])
            {
                MetaniContext context = new MetaniContext();
                return(View(context.FindLokasiTani(id)));
            }

            return(RedirectToAction("Login", "Admin"));
        }
コード例 #2
0
        // GET: Lokasi/Details/5
        public ActionResult Details(int id)
        {
            if ((bool)Session["Login"])
            {
                try
                {
                    MetaniContext context = new MetaniContext();
                    return(View(context.FindLokasiTani(id)));
                }
                catch
                {
                    return(RedirectToAction("Index"));
                }
            }

            return(RedirectToAction("Login", "Admin"));
        }