コード例 #1
0
 public void AddCourse(Course course)
 {
     CoursesList.Add(course);
 }
        async Task LoadDropDownData()
        {
            List <string> liYeaNo = new List <string>();

            liYeaNo.Add("Yes");
            liYeaNo.Add("No");

            DomicileUksList          = liYeaNo;
            FreedomFightersList      = liYeaNo;
            DefencePersonalList      = liYeaNo;
            PhysicallyChallengesList = liYeaNo;
            PunishedByCourtList      = liYeaNo;
            DabarredCollegeList      = liYeaNo;
            EWS = liYeaNo;

            ExamCenterList.Add("Almora");
            ExamCenterList.Add("Bageshwar");
            ExamCenterList.Add("Haldwani");
            ExamCenterList.Add("Kashipur");
            ExamCenterList.Add("Nainital");
            ExamCenterList.Add("Pithoragarh");
            ExamCenterList.Add("Ram Nagar");
            ExamCenterList.Add("Rudrapur");
            ExamCenterList.Add("Ranikhet");
            ExamCenterList.Add("Khatima");
            ExamCenterList.Add("Dwarahat");
            ExamCenterList.Add("Lohaghat");
            ExamCenterList.Add("Kichha");
            ExamCenterList.Add("Berinag");

            GroupList.Add("Arts");
            GroupList.Add("Commerce");
            GroupList.Add("Science");

            MaritalStatusList.Add("Single");
            MaritalStatusList.Add("Married");

            NationalityList.Add("Indian");
            NationalityList.Add("Others");

            CategoryList.Add("Unreserved General");
            CategoryList.Add("Schedule Cast (SC)");
            CategoryList.Add("Schedule Tribe (ST)");
            CategoryList.Add("Other Backward Class (OBC) - Creamy");
            CategoryList.Add("Other Backward Class (OBC) - Non Creamy");

            PhysicallyChallengesTypeList.Add("Physically Challenged");
            PhysicallyChallengesTypeList.Add("Visually Challenged");
            PhysicallyChallengesTypeList.Add("None");

            GendersList.Add("Male");
            GendersList.Add("Female");
            GendersList.Add("Transgender");

            StreamList.Add("Humanities/Arts");
            StreamList.Add("Commerce");
            StreamList.Add("Science");

            CoursesList.Add("Bachelor of Education");
            CoursesList.Add("Master of Education");

            PassingYearList.Add("Appearing");
            PassingYearList.Add("2020");
            PassingYearList.Add("2019");
            PassingYearList.Add("2018");
            PassingYearList.Add("2017");
            PassingYearList.Add("2016");
            PassingYearList.Add("2015");
            PassingYearList.Add("2014");
            PassingYearList.Add("2013");
            PassingYearList.Add("2012");
            PassingYearList.Add("2011");
            PassingYearList.Add("2010");

            M_EdGraducationRequired.Add("B.Ed. Theory");
            M_EdGraducationRequired.Add("B.T. Theory");
            M_EdGraducationRequired.Add("L.T. Theory");
            M_EdGraducationRequired.Add("B.EI.Ed. Theory");
            M_EdGraducationRequired.Add("D.EI.Ed. Theory");
            M_EdGraducationRequired.Add("B.A B.Ed. Theory");
            M_EdGraducationRequired.Add("B.Sc. B.Ed. Theory");

            var response = await _httpClient.GetAsync("https://api.covidindiatracker.com/state_data.json");

            if (response.IsSuccessStatusCode)
            {
                var result =
                    Newtonsoft.Json.JsonConvert.DeserializeObject <IEnumerable <StateData> >(
                        await response.Content.ReadAsStringAsync());
                foreach (var state in result)
                {
                    StateList.Add(state.state);
                }
            }
        }