public static Trainers createTrainer() { Console.WriteLine("Please give the First Name of the trainer."); string firstName = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the Last Name of the trainer."); string lastName = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the Subject of the trainer."); string subject = Helper.noEmptyStringInputChecker(); Trainers trainer = new Trainers(firstName, lastName, subject); HelperDB.addToDb(trainer); return(trainer); }
public static Students createStudent() { Console.WriteLine("Please give the First Name of the student."); string firstName = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the Last Name of the student."); string lastName = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the birth date of the student. (DD/MM/YYYY)"); DateTime birthDate = Helper.validDateTimeInput(new DateTime(2020 - 120, 01, 01), DateTime.Now); Console.WriteLine("Please give the tuition fees of the student."); decimal tuitionFees = Helper.decimalInput(0, 9999.99m); Students student = new Students(firstName, lastName, birthDate, tuitionFees); HelperDB.addToDb(student); return(student); }
public static Assignments createAssignment(Courses course) { Console.WriteLine("Please give the Title of the assignment."); string title = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the Description of the assignment."); string description = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the SubDate of the assignment. (DD/MM/YYYY)"); DateTime subDate = Helper.validDateTimeInput(course.start_date, course.end_date, true); Console.WriteLine("Please give the oralMark of the assignment, as an integer between 1 and 100."); int oralMark = Helper.intInput(1, 100); Console.WriteLine("Please give the totalMark of the assignment, as an integer between 1 and 100."); int totalMark = Helper.intInput(1, 100); Assignments assignment = new Assignments(title, description, subDate, oralMark, totalMark); HelperDB.addToDb(assignment); return(assignment); }
public static Courses createCourse() { Console.WriteLine("Please give the Title of the course."); string title = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the Stream of the course."); string stream = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the Type of the course."); string type = Helper.noEmptyStringInputChecker(); Console.WriteLine("Please give the Start Date of the course. (DD/MM/YYYY)"); DateTime startDate = Helper.validDateTimeInput(new DateTime(1753, 01, 01), new DateTime(9999, 12, 31)); Console.WriteLine("Please give the End Date of the course. (DD/MM/YYYY)"); DateTime endDate = Helper.validDateTimeInput(startDate, new DateTime(9999, 12, 31)); Courses course = new Courses(title, stream, type, startDate, endDate); HelperDB.addToDb(course); return(course); }