public static AssignmentPerCourse CreateAssignmentPerCourse(List <Course> courses)
        {
            Console.Clear();

            AssignmentPerCourse assign = new AssignmentPerCourse();

            assign.course = CreateCourse();
            ListDatabase.AllCourses.Add(assign.course);
            int x;

            Console.Write("Enter number of assignments: ");
            while (!Int32.TryParse(Console.ReadLine(), out x) || x < 0)
            {
                Console.Write("Enter a positive number: ");
            }
            for (int i = 0; i < x; i++)
            {
                assign.AssignmentsPerCourse.Add(CreateAssignment());
            }
            foreach (var item in assign.AssignmentsPerCourse)
            {
                ListDatabase.AllAssignments.Add(item);
            }
            return(assign);
        }
        public static void SeedStudentsAssignments()
        {
            StudentAssignments spapc1 = new StudentAssignments();

            spapc1.Student.FirstName   = "Kostas";
            spapc1.Student.LastName    = "Grodis";
            spapc1.Student.DateOfBirth = new DateTime(1990, 04, 15);
            spapc1.Student.TuitionFees = 2500;
            CommonTools.AddToAList(Students, spapc1.Student);

            AssignmentPerCourse aspc1 = new AssignmentPerCourse();

            aspc1.course.Title      = "CB15";
            aspc1.course.Stream     = "Full time";
            aspc1.course.Type       = "C#";
            aspc1.course.Start_Date = new DateTime(2022, 06, 01);
            aspc1.course.End_Date   = new DateTime(2022, 09, 01);
            CommonTools.AddToAList(CourseList, aspc1.course);

            StudentPerCourse stpc1 = new StudentPerCourse();

            stpc1.course = aspc1.course;
            stpc1.StudentsPerCourse.Add(spapc1.Student);
            CommonTools.AddToAList(StudentsPerCourse, stpc1);

            Assignment a1 = new Assignment();

            a1.Title       = "Area of Triangle";
            a1.Description = "Calculate the area of a triangle";
            a1.SubDateTime = new DateTime(2019, 06, 20);
            a1.OralMark    = 50;
            a1.TotalMark   = 50;

            Assignment a2 = new Assignment();

            a2.Title       = "Area of Square";
            a2.Description = "Calculate the area of a square";
            a2.SubDateTime = new DateTime(2019, 06, 19);
            a2.OralMark    = 50;
            a2.TotalMark   = 50;

            CommonTools.AddToAList(Assignments, a1);
            CommonTools.AddToAList(Assignments, a2);
            CommonTools.AddToAList(aspc1.AssignmentsPerCourse, a1);
            CommonTools.AddToAList(aspc1.AssignmentsPerCourse, a2);
            CommonTools.AddToAList(AssignmentsPerCourse, aspc1);


            CommonTools.AddToAList(spapc1.AssignmentPerCourseList, aspc1);

            AssignmentPerCourse aspc2 = new AssignmentPerCourse();

            aspc2.course.Title      = "CB15";
            aspc2.course.Stream     = "Part time";
            aspc2.course.Type       = "C#";
            aspc2.course.Start_Date = new DateTime(2022, 06, 01);
            aspc2.course.End_Date   = new DateTime(2022, 12, 01);
            CommonTools.AddToAList(CourseList, aspc2.course);

            StudentPerCourse studpc = new StudentPerCourse();

            studpc.course = aspc2.course;
            studpc.StudentsPerCourse.Add(spapc1.Student);
            CommonTools.AddToAList(StudentsPerCourse, studpc);

            Assignment a3 = new Assignment();

            a3.Title       = "Sum three strings";
            a3.Description = "Write function to sum three strings";
            a3.SubDateTime = new DateTime(2019, 06, 21);
            a3.OralMark    = 50;
            a3.TotalMark   = 50;

            Assignment a4 = new Assignment();

            a4.Title       = "Website";
            a4.Description = "Create a static web page";
            a4.SubDateTime = new DateTime(2019, 06, 17);
            a4.OralMark    = 50;
            a4.TotalMark   = 50;

            CommonTools.AddToAList(Assignments, a3);
            CommonTools.AddToAList(Assignments, a4);
            CommonTools.AddToAList(aspc2.AssignmentsPerCourse, a3);
            CommonTools.AddToAList(aspc2.AssignmentsPerCourse, a4);
            CommonTools.AddToAList(AssignmentsPerCourse, aspc2);

            CommonTools.AddToAList(spapc1.AssignmentPerCourseList, aspc2);
            CommonTools.AddToAList(StudentAssignments, spapc1);


            StudentAssignments spapc2 = new StudentAssignments();

            spapc2.Student.FirstName   = "Mary";
            spapc2.Student.LastName    = "Ioannou";
            spapc2.Student.DateOfBirth = new DateTime(1993, 11, 30);
            spapc2.Student.TuitionFees = 2500;
            CommonTools.AddToAList(Students, spapc2.Student);

            spapc2.AssignmentPerCourseList.Add(AssignmentsPerCourse[0]);
            spapc2.AssignmentPerCourseList.Add(AssignmentsPerCourse[1]);

            StudentPerCourse stpc2 = new StudentPerCourse();

            stpc2.course = spapc2.AssignmentPerCourseList[0].course;
            stpc2.StudentsPerCourse.Add(spapc2.Student);
            StudentPerCourse stpc3 = new StudentPerCourse();

            stpc3.course = spapc2.AssignmentPerCourseList[1].course;
            stpc3.StudentsPerCourse.Add(spapc2.Student);

            CommonTools.AddToAList(StudentsPerCourse, stpc2);
            CommonTools.AddToAList(StudentsPerCourse, stpc3);



            CommonTools.AddToAList(StudentAssignments, spapc2);
        }
        public static void SeedAssignmentsPerCourse()
        {
            AssignmentPerCourse a1 = new AssignmentPerCourse();
            AssignmentPerCourse a2 = new AssignmentPerCourse();

            a1.course.Title      = "CB9";
            a1.course.Stream     = "Full time";
            a1.course.Type       = "Python";
            a1.course.Start_Date = Convert.ToDateTime("1/3/2020");
            a1.course.End_Date   = Convert.ToDateTime("1/6/2020");
            CommonTools.AddToAList(CourseList, a1.course);
            Assignment as1 = new Assignment()
            {
                Title       = "Leap Years",
                Description = "You should determine, whether a given year is a leap year or not.",
                SubDateTime = new DateTime(2019, 6, 21),
                OralMark    = 50,
                TotalMark   = 50
            };

            Assignment as2 = new Assignment()
            {
                Title       = "Cut String",
                Description = "Write a function that cuts a string to the length the user desires.",
                SubDateTime = new DateTime(2019, 7, 20),
                OralMark    = 50,
                TotalMark   = 50
            };

            CommonTools.AddToAList(a1.AssignmentsPerCourse, as1);
            CommonTools.AddToAList(a1.AssignmentsPerCourse, as2);
            CommonTools.AddToAList(Assignments, as1);
            CommonTools.AddToAList(Assignments, as2);


            a2.course.Title      = "CB9";
            a2.course.Stream     = "Part time";
            a2.course.Type       = "Python";
            a2.course.Start_Date = Convert.ToDateTime("1/3/2020");
            a2.course.End_Date   = Convert.ToDateTime("1/9/2020");
            CommonTools.AddToAList(CourseList, a2.course);
            Assignment as3 = new Assignment()
            {
                Title       = "Valid Phone Number",
                Description = "Write a function that accepts a string, and returns true if it is in the form of a phone number. ",
                SubDateTime = new DateTime(2019, 7, 10),
                OralMark    = 50,
                TotalMark   = 50
            };

            Assignment as4 = new Assignment()
            {
                Title       = "Find the capital ",
                Description = "Write function that finds capital letters in a string.",
                SubDateTime = new DateTime(2019, 7, 20),
                OralMark    = 50,
                TotalMark   = 50
            };

            CommonTools.AddToAList(a2.AssignmentsPerCourse, as3);
            CommonTools.AddToAList(a2.AssignmentsPerCourse, as4);
            CommonTools.AddToAList(Assignments, as3);
            CommonTools.AddToAList(Assignments, as4);

            CommonTools.AddToAList(AssignmentsPerCourse, a1);
            CommonTools.AddToAList(AssignmentsPerCourse, a2);
        }