Exemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            FileHandler   FH = new FileHandler();
            HandleProduct HP = new HandleProduct(FH);
            ShoppingCart  SC = new ShoppingCart(HP);

            Application.Run(new View(FH, HP, SC));
        }
Exemplo n.º 2
0
        public View(FileHandler fh, HandleProduct hp, ShoppingCart sc)
        {
            FH = fh;
            HP = hp;
            SC = sc;

            InitializeComponent();
            FH.ReadFromFile();

            myPLbindingSource.DataSource = HP.GetProductList();
            dgvInventory.DataSource      = myPLbindingSource;
            dgvCheckout.DataSource       = myPLbindingSource;

            dgvShoppingCart.DataSource = SC.GetShoppingList();
        }
Exemplo n.º 3
0
        string fileName = "InventoryFile.txt";  // Namn på fil dit datan sparas.

        public void setHPconnection(HandleProduct hp)
        {
            HP = hp;
        }
Exemplo n.º 4
0
        List <Product> shoppingList = new List <Product>();   /* Shoppinglistan, med de produkter som lagts i varukorgen. */

        public ShoppingCart(HandleProduct hp)
        {
            HP = hp;
        }