public void SetOrderList(StockOrderList stockOrderList) { this.stockOrderList = stockOrderList; // Initialise view InitializeListView(); }
public OrderListDlg(StockDictionary stockDictionary, StockOrderList stockOrderList) { InitializeComponent(); this.stockDictionary = stockDictionary; this.stockOrderList = stockOrderList; // Initialise view InitializeListView(); }
public Boolean addnewStockOrder(int stockOrderID, int UserID, string date) { try { IStockOrder aStockOrder = StockOrderFactory.GetStockOrder(stockOrderID, UserID, date); // Using a Factory to create the user entity object. ie seperating object creation from business logic StockOrderList.Add(aStockOrder); // Add a reference to the newly created object to the Models UserList DataLayer.addNewStockOrderToDB(aStockOrder); //Gets the DataLayer to add the new user to the DB. return(true); } catch (System.Exception excep) { return(false); } }
public bool deleteStockOrder(IStockOrder StockOrder) { DataLayer.deleteStockOrderFromDB(StockOrder); StockOrderList.Remove(StockOrder); //remove object from collection return(true); }