public static string obtenerConsultorios() { try { var spr = new StoredProcedureRepository(); var consultorios = spr.ObtenerDetallesConsultorios().Select(c => new { c.IdConsultorio, c.NombreConsultorio, c.Planta, c.TipoConsultorio, c.UsuarioRegistro, FechaRegistro = c.FechaRegistro.ToString("dd/MM/yyyy"), Activo = c.Activo ? "Si" : "No" }); return(new JavaScriptSerializer().Serialize(consultorios)); } catch (Exception ex) { Log.Error("[ System ] " + " [ Page ] " + "[ " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name.ToString() + " ] [ " + System.Reflection.MethodBase.GetCurrentMethod().Name.ToString() + " ] [ Fin ]", ex); throw; } }