// GET: Categories public ActionResult Index(String Error = "") { var action = new CheckController().CheckStatus("Categories"); if (action != null) { return(action); } ViewBag.Error = Error; return(View(db.Get_All())); }
public ActionResult Create() { var action = new CheckController().CheckStatus("Products"); if (action != null) { return(action); } ViewBag.Category_ID = new SelectList(MC.Get_All().Where(i => i.Name.CompareTo("Unknown") != 0).ToList(), "ID", "Name"); ViewBag.Producer_ID = new SelectList(MP.Get_All().Where(i => i.Name.CompareTo("Unknown") != 0).ToList(), "ID", "Name"); return(View()); }