Esempio n. 1
0
        public static void Menu2(CustomerVN v, CustomerNN n)
        {
            int c;

            do
            {
                Console.WriteLine("1. CUSTOMER VIETNAMESE");
                Console.WriteLine("2. CUSTOMER NATIONALITY");
                Console.WriteLine("0 .exit");
                do
                {
                    Console.WriteLine("Choose funtion (0/1/2) : ");
                    c = Convert.ToInt32(Console.ReadLine());
                    if (c < 0 || c > 2)
                    {
                        Console.WriteLine("Error ! Please choose again !");
                    }
                } while (c < 0 || c > 2);

                switch (c)
                {
                case 1:
                    v.inputCVN();
                    break;

                case 2:
                    n.inputCNN();
                    break;

                case 0:
                    return;
                }
            }while (c != 0);
        }
Esempio n. 2
0
        public static void Main(string[] args)
        {
            CustomerVN v = new CustomerVN();
            CustomerNN n = new CustomerNN();
            int        choice;

            do
            {
                Menu();
                do
                {
                    Console.WriteLine("Choose funtion (0/1/2/3/4/5) : ");
                    choice = Convert.ToInt32(Console.ReadLine());
                    if (choice < 0 || choice > 5)
                    {
                        Console.WriteLine("Error ! Please choose again !");
                    }
                } while (choice < 0 || choice > 5);

                switch (choice)
                {
                case 1:
                    Menu2(v, n);
                    break;

                case 2:
                    v.showListVN();
                    n.showListNN();
                    break;

                case 3:
                    v.showListBillCVN();
                    n.showListBillCNN();
                    break;

                case 4:
                    n.showListMM();
                    break;

                case 5:
                    v.showListVN();
                    n.showListNN();
                    break;

                case 0:
                    return;
                }
            } while (choice != 0);
        }