// GET: Catalog/Delete/5?item=2 public ActionResult Delete(int?id, decimal?item) { if (id == null || item == null) { return(RedirectToAction("Index", "Home")); } if (id == 1) { db.PR_InactiveQuality((int)item); } else if (id == 2) { db.PR_InactivePrice((int)item); } else if (id == 3) { db.PR_InactiveDifficulty((int)item); } else if (id == 4) { db.PR_InactiveHikeType((int)item); } else if (id == 6) { db.PR_InactiveAdmin((decimal)item); return(RedirectToAction("User", "Home", new { id = id - 5 })); } else if (id == 5) { db.PR_InactiveHiker((decimal)item); return(RedirectToAction("User", "Home", new { id = 3 })); } else if (id == 7) { db.PR_InactiveAdminICT((decimal)item); return(RedirectToAction("User", "Home", new { id = id - 5 })); } else { return(RedirectToAction("Index", "Home")); } return(RedirectToAction("Index", "Catalog", new { id = id })); }