using Newtonsoft.Json; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace MagusEvents { class Meals{ public int ID { get; set; } public int AASID { get; set; } public int Day { get; set; } public int Season { get; set; } public string Time { get; set; } public Meals GetRow(int AASID, int Day, int Season) { Database Data = new Database(); string sql = "SELECT * FROM Food WHERE AASID = '" + AASID + "' AND Day = '" + Day + "' AND Season = '" + Season + "' "; Meals Profile = Data.GetFoodProfile(sql); return Profile; } public int save_to_db(string sql) { int last_saved = 0; try { Database SQL = new Database(); bool Insert = SQL.ExecuteData(sql); last_saved = 1; } catch// (Exception error) { //Console.WriteLine(error); } return last_saved; } public bool delete(string sql) { bool Insert = false; try { Database SQL = new Database(); Insert = SQL.ExecuteData(sql); } catch //(Exception error) { //Console.WriteLine(error); } return Insert; } } }