public QuoteGroup AddItemToGroup(QuoteItem i, string id, string title, bool insert_begin = true) { QuoteGroup group = null; group = AllGroups.SingleOrDefault(s => s.UniqueId == id); if (group == null) { group = new QuoteGroup(id, title); _allGroups.Add(group); i.Group = group; } else { i.Group = group; } if (insert_begin) { group.Items.Insert(0, i); } else { group.Items.Add(i); } return(group); }
public QuoteGroup AddGroup(string id, string title) { QuoteGroup group = AllGroups.SingleOrDefault(s => s.UniqueId == id); if (group == null) { group = new QuoteGroup(id, title); _allGroups.Add(group); } return(group); }
public QuoteGroup ReturnRecentGroup() { QuoteGroup group = AllGroups.SingleOrDefault(s => s.UniqueId == "-2"); return(group); }
public QuoteGroup ReturnFavoriteGroup() { QuoteGroup group = AllGroups.SingleOrDefault(s => s.UniqueId == "-1"); return(group); }
//internal Groups_Class DeleteGroup(int id) //{ // Group = AllGroups.SingleOrDefault(x => x.Id == id); //} internal void DeleteGroup(int id) { Group = AllGroups.SingleOrDefault(x => x.Id == id); AllGroups.Remove(Group); }
public void EditGroup(Groups_Class EGroup, int id) { Group = AllGroups.SingleOrDefault(x => x.Id == id); Group.GroupName = EGroup.GroupName; }
public Groups_Class GetGroup(int id) { Group = AllGroups.SingleOrDefault(x => x.Id == id); return(Group); }