public void RemoveItemFromCheckout(Object Item) { try { CustomOrder CompareOrder = new CustomOrder(false); if (Item.GetType() == CompareOrder.GetType()) { currentTransaction.RemoveOrder(Item as CustomOrder); } else { currentTransaction.RemoveProduct(((KeyValuePair <Product, int>)Item)); } } catch { } }
public void AddItemToCheckout(Object Item) { try { CustomOrder CompareOrder = new CustomOrder(false); if (Item.GetType() == CompareOrder.GetType()) { currentTransaction.AddOrder(Item as CustomOrder); } else { currentTransaction.AddProduct(Item as Product); } } catch { } }