public void UpdateListStoreLabels()
{
List<string> stores = new List<string>();
foreach (ShoppingListStore store in this._listStores)
{
stores.Add(store.StoreName);
}
//Adding an '[Empty]' string to list for displaying in Custom Filter List Control
stores.Insert(0, "Store [Empty]");
this._storeLabels = stores;
}
/// <summary> /// Add new store to list /// </summary> /// <param name="list">Instance of list in which store will be added</param> /// <param name="store">Instance of store to be added</param> public void AddNewStore(ShoppingList list, ShoppingListStore store) { list.ListStores.Add(store); list.ModifiedDate = DateTime.Now; store.CreatedDate = DateTime.Now; store.ModifiedDate = DateTime.Now; listDB.ListStores.InsertOnSubmit(store); list.UpdateListStoreLabels(); listDB.SubmitChanges(); }