internal String Answer_Prospect(Prospect prospect)
 {
     response  = prospect.name;
     response += "\n\n" + prospect.description + "\nSome top companies where our students work are " + prospect.companies + "\nPositions our students are qualified to work are " + prospect.positions;
     return(response);
 }
Exemplo n.º 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;
            }
        }