public void DeleteItem(ItemOptionsClass itemToDelete) { OrderItems.Remove(itemToDelete); OrderItem oi = context.OrderItems.FirstOrDefault(it => it.Sku.Equals(itemToDelete.Sku)); if (context.OrderItems.Contains(oi)) { context.OrderItems.DeleteOnSubmit(context.OrderItems.FirstOrDefault(it => it.Sku.Equals(itemToDelete.Sku))); _hasChanges = true; } }
private void FillItemOptions() { ItemOptions.Clear(); System.Linq.IQueryable <LitTravData.Model.ItemsGridView> tmpTable; tmpTable = getItemOptionsData(); foreach (ItemsGridView itm in tmpTable) { ItemOptionsClass ioc = new ItemOptionsClass(itm.Sku, formatItem(itm)); ItemOptions.Add(ioc); } SelectedItemOption = ItemOptions.First(); }
private void FillItemOptions() { ItemOptions.Clear(); System.Linq.IQueryable<LitTravData.Model.ItemsGridView> tmpTable; tmpTable = getItemOptionsData(); foreach (ItemsGridView itm in tmpTable) { ItemOptionsClass ioc = new ItemOptionsClass(itm.Sku, formatItem(itm)); ItemOptions.Add(ioc); } SelectedItemOption = ItemOptions.First(); }
public void DeleteItem(ItemOptionsClass itemToDelete) { OrderItems.Remove(itemToDelete); OrderItem oi = context.OrderItems.FirstOrDefault(it => it.Sku.Equals( itemToDelete.Sku)); if (context.OrderItems.Contains(oi)) { context.OrderItems.DeleteOnSubmit(context.OrderItems.FirstOrDefault(it => it.Sku.Equals(itemToDelete.Sku))); _hasChanges = true; } }