internal String Answer_AdmissionDocuments(AdmissionDocuments admissionDocuments)
 {
     response  = admissionDocuments.name;
     response += "\n\n" + "The following documents are required while applying for our course" + "\n" + admissionDocuments.documents;
     return(response);
 }
예제 #2
0
        private void Suggestions_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (Suggestions.SelectedIndex == -1)
            {
                return;
            }



            try
            {
                Answer.Text = "";
                Type     t   = getClass(Suggestions.SelectedItem.GetType());
                Response res = new Response();
                if (t.ToString().ToLower().Contains("Module".ToLower()))
                {
                    var module = new Module();
                    module      = (Module)Suggestions.SelectedItem;
                    Answer.Text = res.Answer_Module(module);
                }
                else if (t.ToString().ToLower().Contains("CourseOverview".ToLower()))
                {
                    var courseOverview = new CourseOverview();
                    courseOverview = (CourseOverview)Suggestions.SelectedItem;
                    Answer.Text    = res.Answer_CourseOverview(courseOverview);
                }
                else if (t.ToString().ToLower().Contains("Professor".ToLower()))
                {
                    var professor = new Professor();
                    professor   = (Professor)Suggestions.SelectedItem;
                    Answer.Text = res.Answer_Professor(professor);
                }
                else if (t.ToString().ToLower().Contains("Prospect".ToLower()))
                {
                    var prospect = new Prospect();
                    prospect    = (Prospect)Suggestions.SelectedItem;
                    Answer.Text = res.Answer_Prospect(prospect);
                }
                else if (t.ToString().ToLower().Contains("AdmissionDocuments".ToLower()))
                {
                    var admissionDocuments = new AdmissionDocuments();
                    admissionDocuments = (AdmissionDocuments)Suggestions.SelectedItem;
                    Answer.Text        = res.Answer_AdmissionDocuments(admissionDocuments);
                }
                else if (t.ToString().ToLower().Contains("StudentReviews".ToLower()))
                {
                    var studentReviews = new StudentReviews();
                    studentReviews = (StudentReviews)Suggestions.SelectedItem;
                    Answer.Text    = res.Answer_StudentReviews(studentReviews);
                }
                else if (t.ToString().ToLower().Contains("Contact".ToLower()))
                {
                    var contact = new Contact();
                    contact     = (Contact)Suggestions.SelectedItem;
                    Answer.Text = res.Answer_Contact(contact);
                }
                else if (t.ToString().ToLower().Contains("AdmissionRequirement".ToLower()))
                {
                    var admissionRequirement = new AdmissionRequirement();
                    admissionRequirement = (AdmissionRequirement)Suggestions.SelectedItem;
                    Answer.Text          = res.Answer_AdmissionRequirement(admissionRequirement);
                }
            }
            catch (Exception)
            {
                return;
            }
        }