// GET: Article/Create public ActionResult Create() { SystemFail error = new SystemFail(); List <Store> stores = StoreBLL.GetAllStores(error); if (stores != null && !error.Error) { ViewBag.Stores = stores.Select(x => new { Id = x.Id, Name = x.Name }); } return(View()); }
// GET: Store public ActionResult Index() { SystemFail error = new SystemFail(); List <Store> stores = StoreBLL.GetAllStores(error); if (stores == null && error.Error) { ViewBag.StartUpScript = string.Concat("An error has ocurred. Error", error.Message); } return(View(stores)); }