コード例 #1
0
        public PlaceOrderForm(Book_Overview frm1, store store)
        {
            InitializeComponent();

            ActiveControl = payTermsDropDown;

            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);

            placeOrderService = new pubsService(bookRepo, storeRepo, salesRepo, bookOrderRepo);

            //creates new order number
            orderNum = RandomString(8);

            _store        = store;
            _bookOverview = frm1;
            _bookList     = new BookList(this, _sales);
            _bookQtyEdit  = new BookQuantityForm(this, _sales);

            transaction = new List <sales>();
        }
        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;
            }
        }
コード例 #3
0
        public BookQuantityForm(PlaceOrderForm bklist, sales sale)
        {
            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);

            _bklist = bklist;
            _sale   = sale;
        }
コード例 #4
0
        public BookList(PlaceOrderForm pof, sales sale)
        {
            InitializeComponent();

            ActiveControl = bookQuantityUpDown;

            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);

            auService = new pubsService(bookRepo, storeRepo, salesRepo, bookOrderRepo);

            _pof  = pof;
            _sale = sale;
        }
コード例 #5
0
        public Book_Overview()
        {
            InitializeComponent();
            ActiveControl = StoresDropDown;

            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, _storeName);

            try
            {
                fillComboBox();
            }
            catch
            {
                return;
            }
        }