Exemple #1
0
        public static Course GetCourseDetails()
        {
            Course tempObj = new Course();

            tempObj.Stream    = CourseStream();
            tempObj.Type      = CourseType();
            tempObj.Title     = "CB12 " + tempObj.Stream + " " + tempObj.Type;
            tempObj.StartDate = Convert.ToDateTime(MyAppUtils.AskDetails("When is the start date?"));
            tempObj.EndDate   = Convert.ToDateTime(MyAppUtils.AskDetails("When is the end date?"));

            return(tempObj);
        }
Exemple #2
0
        public static Student GetStudentDetails()
        {
            Student tempObj = new Student();

            tempObj.FirstName = MyAppUtils.AskDetails("What is student's name?");
            if (tempObj.FirstName == "")
            {
                return(tempObj = DefaultEntry());
            }
            tempObj.LastName    = MyAppUtils.AskDetails("What is student's surname?");
            tempObj.DateOfBirth = Convert.ToDateTime(MyAppUtils.AskDetails("What is the date of birth?"));
            tempObj.TuitionFees = Convert.ToDouble(MyAppUtils.AskDetails("How much does the student pay?"));
            return(tempObj);
        }
        public static Assignment GetAssignmentDetails()
        {
            Assignment tempObj = new Assignment();

            tempObj.Title = MyAppUtils.AskDetails("What is the title of the assignment?");
            if (tempObj.Title == "")
            {
                return(tempObj = DefaultEntry());
            }
            tempObj.Description = MyAppUtils.AskDetails("What is description of the assignment?");
            tempObj.SubDateTime = Convert.ToDateTime(MyAppUtils.AskDetails("When should the assignment be subbmitted?"));
            tempObj.OralMark    = Convert.ToSingle(MyAppUtils.AskDetails("How much is the oral mark?"));
            tempObj.TotalMark   = Convert.ToSingle(MyAppUtils.AskDetails("How much is the total mark?"));
            return(tempObj);
        }
Exemple #4
0
        public static Trainer GetTrainerDetails()
        {
            Trainer tempObj = new Trainer();

            tempObj.FirstName = MyAppUtils.AskDetails("What is the teacher's name?");
            if (tempObj.FirstName == "")
            {
                return(tempObj = DefaultEntry());
            }
            tempObj.LastName = MyAppUtils.AskDetails("What is the teacher's surname?");
            tempObj.Subject  = MyAppUtils.AskDetails("What subject does he teach?", new List <string>()
            {
                "C#", "Java", "JavaScript", "Python"
            });

            return(tempObj);
        }