Beispiel #1
0
        public void Them()
        {
            SuKien SK;
            int    soluong = Menu.HoiYeuCau(9999, "Nhap so luong su kien: ");

            for (int i = 0; i < soluong; i++)
            {
                Menu.TaoHeader(10, "SU KIEN " + (i + 1).ToString());
                Console.Write("  1. Cuoc hop    2. Hoi thao\n\n");
                int chon = Menu.HoiYeuCau(2, "Chon loai su kien: ");
                if (chon == 1)
                {
                    SK = new CuocHop();
                }
                else
                {
                    SK = new HoiThao();
                }
                try
                {
                    SK.Nhap();
                    DSSK.Add(SK);
                }
                catch { Program.XuatMauDo("    Them that bai!\n"); }
            }
        }