Exemplo n.º 1
0
        public IActionResult Index()
        {
            var item = new TimeList();

            item.Refresh();
            return(View(item));
        }
Exemplo n.º 2
0
        public RealTime Index()
        {
            var result = new RealTime();

            try
            {
                bool enableSearch = Configuration.GetValue <bool>("ApiFlag:EnableSearch");

                if (!enableSearch)
                {
                    result.Succeed  = false;
                    result.ErrorMsg = "Currently the system is set off.";
                    return(result);
                }

                var item = new TimeList();
                item.Refresh();
                result.TimeList = item;
                result.Succeed  = true;
            }
            catch (Exception ex)
            {
                result.ErrorMsg = ex.Message + " - " + ex.InnerException;
            }

            return(result);
        }