예제 #1
0
        public void SetOrderList(StockOrderList stockOrderList)
        {
            this.stockOrderList = stockOrderList;

             // Initialise view
             InitializeListView();
        }
예제 #2
0
        public OrderListDlg(StockDictionary stockDictionary, StockOrderList stockOrderList)
        {
            InitializeComponent();

             this.stockDictionary = stockDictionary;
             this.stockOrderList = stockOrderList;

             // Initialise view
             InitializeListView();
        }
예제 #3
0
 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);
     }
 }
예제 #4
0
 public bool deleteStockOrder(IStockOrder StockOrder)
 {
     DataLayer.deleteStockOrderFromDB(StockOrder);
     StockOrderList.Remove(StockOrder); //remove object from collection
     return(true);
 }