Esempio n. 1
0
        public static void SupplierMenu(Supplier supplier)
        {
            Console.WriteLine("Choose from the foliowing:");

            Console.WriteLine("1.Add product to inventory");

            Console.WriteLine("2.View all products belong to you");

            int b = Convert.ToInt32(Console.ReadLine());

            switch (b)
            {
            case 1:

                SupplierDAO.AddProduct(supplier.IdSupplier);

                break;

            case 2:

                SupplierDAO.SelectAllProductsS(supplier.IdSupplier);

                break;
            }
        }
Esempio n. 2
0
        public static void MainMenu()
        {
            Console.WriteLine("Hello friend,");

            Console.WriteLine("Please Choose from the foliowing:");

            Console.WriteLine("1.Existing customer");

            Console.WriteLine("2.New client");

            Console.WriteLine("3.Existing supplier");

            Console.WriteLine("4.New supplier");

            int a = Convert.ToInt32(Console.ReadLine());

            switch (a)
            {
            case 1:

                Customer c = CustomerDAO.FindCustomer();

                if (c != null)
                {
                    CustomerMenu(c);
                }
                break;

            case 2:

                CustomerDAO.NewCustomer();

                MainMenu();

                break;

            case 3:

                Supplier s = SupplierDAO.FindSupplier();

                if (s != null)
                {
                    SupplierMenu(s);
                }

                break;


            case 4:

                SupplierDAO.NewSupplier();

                MainMenu();

                break;
            }
        }