Beispiel #1
0
        static public void AddStudent(FormGroup YEAR12)
        {
            Console.Clear();

            string   Name;
            DateTime DoB;
            string   Gender;

            Console.WriteLine("{0,3} {1,10}", YEAR12.GetFormName(), "ADD STUDENT");

            Console.WriteLine("Enter Student's Name");
            Name = Console.ReadLine();

            Console.WriteLine("Enter Student's DoB");
            string DateInString = Console.ReadLine();

            while (DateTime.TryParse(DateInString, out DoB) == false)
            {
                Console.WriteLine("Enter Student's DoB");
                DateInString = Console.ReadLine();
            }

            Console.WriteLine("Enter Student's Gender");
            Gender = Console.ReadLine();

            YEAR12.AddStudent(Name, DoB, Gender);

            Console.WriteLine("COMPLETE");
            Clear();
        }
Beispiel #2
0
        static public void PrintRegister(FormGroup YEAR12)
        {
            Console.Clear();

            DateTime Date;

            Console.WriteLine("{0,3} {1,10}", YEAR12.GetFormName(), "PRINT REGISTER");
            Console.WriteLine("ENTER DATE");
            string DateInString = Console.ReadLine();

            if (DateTime.TryParse(DateInString, out Date))
            {
                YEAR12.PrintRegister(Date);
                Clear();
            }
            else
            {
                Console.WriteLine("Invalid Date");
            }
        }