public static string cargarVehiculo() { SeguimientoController seguimientoCtrl = new SeguimientoController(); var objs = new List <VehiculoEmpresas>(); if (SitePrincipal.ExisteActiva()) { var homeCtrl = new HomeController(); if (HttpContext.Current.User.IsInRole("SUPERVISOR")) { var user = HttpContext.Current.User.Identity.Name; objs = seguimientoCtrl.GetVehiculos(3, user); } else { var user = HttpContext.Current.User.Identity.Name; string nit1 = homeCtrl.obtenerNit(user); objs = seguimientoCtrl.GetVehiculos(2, nit1); } } else { if (HttpContext.Current.User.IsInRole("SA")) { objs = seguimientoCtrl.GetVehiculos(1, ""); } } return(JsonConvert.SerializeObject(objs, Formatting.Indented)); }