public EntryBase GetEntry(SqlEntry sqle) { EntryBase entry = null; entry = EntryFactory.GetEntry(sqle); return(entry); }
public void RemoveEntry(EntryBase entry) { Entries.Remove(entry); //remove from DataBase //Procedures.RemoveEntry(entry.SqlItem.Id); }
public CategoryBasic(SqlCategory cat) { SqlItem = cat; SqlSingleText st = Procedures.SingleTexts[cat.SqlSingleText]; //SqlColorable c = Procedures.Colorables[cat.SqlColorable]; SqlIconable i = Procedures.Iconables[cat.SqlIconable]; //SqlSingleText SqlSingleTextObject = st; Text = st.Text; //IIconable SqlIconableObject = i; ImageSource = i.ImageSource; Entries = new List <EntryBase>(); foreach (SqlEntryStorage s in Procedures.EntryStorages.Values) { if (s.CategoryId != SqlItem.Id) { continue; } SqlEntry sqle = Procedures.Entries[s.EntryId]; EntryBase entry = GetEntry(sqle); Entries.Add(entry); } }
public void AddEntry(EntryBase entry) { Entries.Add(entry); //save to DataBase SqlEntryStorage ses = new SqlEntryStorage() { CategoryId = SqlItem.Id, EntryId = entry.SqlItem.Id }; Procedures.Insert(ses); }