コード例 #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);
 }