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;
            }
        }
Esempio n. 2
0
        private void fillComboBox()
        {
            List <storeViewModel> stores = bookService.getAllStores();

            foreach (storeViewModel s in stores)
            {
                StoresDropDown.Items.Add(s);
            }
        }