示例#1
0
        public ActionResult Edit(int idJenisTanah, string namaJenisTanah)
        {
            if ((bool)Session["Login"])
            {
                try
                {
                    MetaniContext context = new MetaniContext();
                    context.EditJenisTanah(idJenisTanah, namaJenisTanah);

                    return(RedirectToAction("Index"));
                }
                catch
                {
                    return(RedirectToAction("Create"));
                }
            }

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