public Book_Overview() { InitializeComponent(); string apiRoot = configFile.getSetting("apiRoot"); BookRepoREST bookRepo = new BookRepoREST(apiRoot); StoreRepoREST storeRepo = new StoreRepoREST(apiRoot); SalesRepoREST salesRepo = new SalesRepoREST(apiRoot); BookOrderRepoREST bookOrderRepo = new BookOrderRepoREST(apiRoot); bookService = new pubsService(bookRepo, storeRepo, salesRepo, bookOrderRepo); _placeOrder = new PlaceOrderForm(this, _sales, _storeName); try { List <storeViewModel> stores = bookService.getAllStores(); foreach (storeViewModel s in stores) { StoresDropDown.Items.Add(s); } } catch { return; } }
private void fillComboBox() { List <storeViewModel> stores = bookService.getAllStores(); foreach (storeViewModel s in stores) { StoresDropDown.Items.Add(s); } }