public void LoadList() { TransactionsList transactionsList = new TransactionsList(this); UsersList usersList = new UsersList(); ProductCatalog productCatalog = new ProductCatalog(); SeasonProductCatalog seasonalProductCatalog = new SeasonProductCatalog(); UserList = usersList.GetList(); ProductList = productCatalog.GetList(); SeasonalProductList = seasonalProductCatalog.GetList(); BTransactionList = transactionsList.GetBuyList(); CTransactionList = transactionsList.GetCashList(); }
//Gets Product a unique ID public int NewSeasonalProductID() { ProductCatalog productList = new ProductCatalog(); int highestID = 0; foreach (Product product in productList.GetList()) { if (product.ProductID > highestID) { highestID = product.ProductID; } } return(highestID + 1); }