示例#1
0
        public Minors GetMinorsInformation()
        {
            // get Minors information
            string jsonMinors = GetRestData(AppConstant.MinorsPage);

            Minors minor = JToken.Parse(jsonMinors).ToObject <Minors>();

            return(minor);
        }
        private void Populate()
        {
            degree = _dataService.GetDegreeInformation();
            minor  = _dataService.GetMinorsInformation();


            foreach (Undergraduate undergrad in degree.Undergraduate)
            {
                if (undergrad.DegreeName == "wmc")
                {
                    lblWMC.Text    = undergrad.Title;
                    txtBoxWMC.Text = undergrad.Description;

                    foreach (var concentration in undergrad.Concentrations)
                    {
                        listBoxWMC.Items.Add(concentration);
                    }
                    continue;
                }

                if (undergrad.DegreeName == "hcc")
                {
                    lblHCC.Text    = undergrad.Title;
                    txtBoxHCC.Text = undergrad.Description;

                    foreach (var concentration in undergrad.Concentrations)
                    {
                        listBoxHCC.Items.Add(concentration);
                    }
                    continue;
                }

                if (undergrad.DegreeName == "cit")
                {
                    lblCIT.Text    = undergrad.Title;
                    txtBoxCIT.Text = undergrad.Description;

                    foreach (var concentration in undergrad.Concentrations)
                    {
                        listBoxCIT.Items.Add(concentration);
                    }
                    continue;
                }
            } // end of Undergraduate data

            foreach (Graduate gradDegree in degree.Graduate)
            {
                if (gradDegree.DegreeName == "ist")
                {
                    lblIST.Text    = gradDegree.Title;
                    txtBoxIST.Text = gradDegree.Description;

                    foreach (var concentration in gradDegree.Concentrations)
                    {
                        listBoxIST.Items.Add(concentration);
                    }
                }

                if (gradDegree.DegreeName == "hci")
                {
                    lblHCI.Text    = gradDegree.Title;
                    txtBoxHCI.Text = gradDegree.Description;

                    foreach (var concentration in gradDegree.Concentrations)
                    {
                        listBoxHCI.Items.Add(concentration);
                    }
                }

                if (gradDegree.DegreeName == "nsa")
                {
                    lblNSA.Text    = gradDegree.Title;
                    txtBoxNSA.Text = gradDegree.Description;

                    foreach (var concentration in gradDegree.Concentrations)
                    {
                        listBoxNSA.Items.Add(concentration);
                    }
                }

                if (gradDegree.DegreeName == "graduate advanced certificates")
                {
                    lblGAC.Text = gradDegree.DegreeName;

                    foreach (var availableCertificates in gradDegree.AvailableCertificates)
                    {
                        listBoxGAC.Items.Add(availableCertificates);
                    }
                }
            } // end of Graduate data

            foreach (UGMinors undergraduateMinor in minor.UGMinors)
            {
                if (undergraduateMinor.Name == "DBDDI-MN")
                {
                    lblDBDDI.Text        = undergraduateMinor.Title;
                    txtBoxDBDDI.Text     = undergraduateMinor.Description;
                    txtBoxNoteDBDDI.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxDBDDI.Items.Add(course);
                    }
                }

                if (undergraduateMinor.Name == "GIS-MN")
                {
                    lblGIS.Text        = undergraduateMinor.Title;
                    txtBoxGIS.Text     = undergraduateMinor.Description;
                    txtBoxNoteGIS.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxGIS.Items.Add(course);
                    }
                }

                if (undergraduateMinor.Name == "MEDINFO-MN")
                {
                    lblMEDINFO.Text        = undergraduateMinor.Title;
                    txtBoxMEDINFO.Text     = undergraduateMinor.Description;
                    txtBoxNoteMEDINFO.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxMEDINFO.Items.Add(course);
                    }
                }

                if (undergraduateMinor.Name == "MDDEV-MN")
                {
                    lblMDDEV.Text        = undergraduateMinor.Title;
                    txtBoxMDDEV.Text     = undergraduateMinor.Description;
                    txtBoxNoteMDDEV.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxMDDEV.Items.Add(course);
                    }
                }

                if (undergraduateMinor.Name == "MDEV-MN")
                {
                    lblMDEV.Text        = undergraduateMinor.Title;
                    txtBoxMDEV.Text     = undergraduateMinor.Description;
                    txtBoxNoteMDEV.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxMDEV.Items.Add(course);
                    }
                }

                if (undergraduateMinor.Name == "NETSYS-MN")
                {
                    lblNETSYS.Text        = undergraduateMinor.Title;
                    txtBoxNETSYS.Text     = undergraduateMinor.Description;
                    txtBoxNoteNETSYS.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxNETSYS.Items.Add(course);
                    }
                }

                if (undergraduateMinor.Name == "WEBDD-MN")
                {
                    lblWEBDD.Text        = undergraduateMinor.Title;
                    txtBoxWEBDD.Text     = undergraduateMinor.Description;
                    txtBoxNoteWEBDD.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxWEBDD.Items.Add(course);
                    }
                }

                if (undergraduateMinor.Name == "WEBD-MN")
                {
                    lblWEBD.Text        = undergraduateMinor.Title;
                    txtBoxWEBD.Text     = undergraduateMinor.Description;
                    txtBoxNoteWEBD.Text = "NOTE : " + undergraduateMinor.Note;

                    foreach (var course in undergraduateMinor.Courses)
                    {
                        listBoxWEBD.Items.Add(course);
                    }
                }
            }
        }