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

            File.WriteAllText(Globals.FilePath + Globals.FileName, jsonQuery);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #7
0
 public static List <Fator> GetFatores()
 {
     database = new JsonDatabase();
     database = database.ReadJson();
     return(database.fatores);
 }
예제 #8
0
 public static List <Indice> GetIndices()
 {
     database = new JsonDatabase();
     database = database.ReadJson();
     return(database.indices);
 }