Esempio n. 1
0
        public static string getDatos(string data = "")
        {
            string            result      = String.Empty;
            EmpresaController empresaCtrl = new EmpresaController();
            //HomeController homeCtrl = new HomeController();
            List <EmpresaModel> lista = new List <EmpresaModel>();
            //if (SitePrincipal.ExisteActiva())
            //{
            var userName = HttpContext.Current.User.Identity.Name;

            userName = HttpContext.Current.User.Identity.Name;
            lista    = empresaCtrl.GetAll22(userName);

            //}
            //else
            //{
            //    //if (HttpContext.Current.User.IsInRole("SA"))
            //    //{
            //    //    lista = alarmaCtrl.GetAll();

            //    //}
            //}

            result = JsonConvert.SerializeObject(lista, Formatting.Indented);

            return(result);
        }