Ejemplo n.º 1
0
        public IActionResult Index()
        {
            UtilityModel util = new UtilityModel(_ctx);
            var          json = getProductJson();

            try
            {
                util.loadProductTables(json);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            return(View());
        }
        public async Task <IActionResult> Index()
        {
            UtilityModel util = new UtilityModel(_ctx);
            string       msg  = "";
            var          json = await getProductJsonFromWebAsync();

            try
            {
                msg = (util.loadProductTables(json)) ? "tables loaded" : "problem loading tables";
            }
            catch (Exception ex)
            {
                msg = ex.Message;
            }
            ViewBag.LoadedMsg = msg;
            return(View());
        }