public void WriteJson(JsonDatabase jsonDatabase) { Debug.WriteLine("Gravando"); string jsonQuery = JsonConvert.SerializeObject(jsonDatabase, Formatting.Indented); File.WriteAllText(Globals.FilePath + Globals.FileName, jsonQuery); }
internal static Fator GetFator(string cod) { database = new JsonDatabase(); database = database.ReadJson(); Fator obj = database.fatores.Where(i => i.Nome == cod).FirstOrDefault(); return(obj); }
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); }
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); }
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); }
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); }
public static List <Fator> GetFatores() { database = new JsonDatabase(); database = database.ReadJson(); return(database.fatores); }
public static List <Indice> GetIndices() { database = new JsonDatabase(); database = database.ReadJson(); return(database.indices); }