Exemplo n.º 1
0
        // 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());
        }
Exemplo n.º 2
0
        // 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));
        }