Example #1
0
        public ActionResult Create(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Index", "Home"));
            }
            if (id == 1)
            {
                db.PR_AddQuality(Request.Form["itemName"]);
            }
            else if (id == 2)
            {
                db.PR_AddPrice(Request.Form["itemName"]);
            }
            else if (id == 3)
            {
                db.PR_AddDifficulty(Request.Form["itemName"]);
            }
            else if (id == 4)
            {
                db.PR_AddHikeType(Request.Form["itemName"]);
            }
            else
            {
                return(RedirectToAction("Index", "Home"));
            }


            return(RedirectToAction("Index", "Catalog", new { id = id }));
        }