public void WriteJson(JsonDatabase jsonDatabase)
        {
            Debug.WriteLine("Gravando");
            string jsonQuery = JsonConvert.SerializeObject(jsonDatabase, Formatting.Indented);

            File.WriteAllText(Globals.FilePath + Globals.FileName, jsonQuery);
        }
Beispiel #2
0
        internal static Fator GetFator(string cod)
        {
            database = new JsonDatabase();
            database = database.ReadJson();
            Fator obj = database.fatores.Where(i => i.Nome == cod).FirstOrDefault();

            return(obj);
        }
Beispiel #3
0
        internal static Noticia GetNoticia(string cod)
        {
            database = new JsonDatabase();
            database = database.ReadJson();
            Noticia obj = database.noticias.Where(i => i.Cod_noticia == cod).FirstOrDefault();

            return(obj);
        }
Beispiel #4
0
        public static Açao GetAçao(string cod)
        {
            database = new JsonDatabase();
            database = database.ReadJson();
            Açao açao = database.açoes.Where(i => i.Cod_Acao == cod).FirstOrDefault();

            return(açao);
        }
Beispiel #5
0
        public static Indice GetIndice(string cod)
        {
            database = new JsonDatabase();
            database = database.ReadJson();
            Indice indice = database.indices.Where(i => i.Cod_Indice == cod).FirstOrDefault();

            return(indice);
        }
Beispiel #6
0
        internal static Evento GetEvento(string cod)
        {
            database = new JsonDatabase();
            database = database.ReadJson();
            Evento obj = database.eventos.Where(e => e.Cod_Evento == cod).FirstOrDefault();

            return(obj);
        }
Beispiel #7
0
 public static List <Fator> GetFatores()
 {
     database = new JsonDatabase();
     database = database.ReadJson();
     return(database.fatores);
 }
Beispiel #8
0
 public static List <Indice> GetIndices()
 {
     database = new JsonDatabase();
     database = database.ReadJson();
     return(database.indices);
 }