private void GetMaritalStatusList()
 {
     MaritalStatusList.Add(new MaritalStatusPickerModel
     {
         MaritalStatusDisplay   = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.Single) : Common.GetEnumDescription(MartialStatusArabicEnum.Single),
         MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.Single)
     });
     MaritalStatusList.Add(new MaritalStatusPickerModel
     {
         MaritalStatusDisplay   = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.Married) : Common.GetEnumDescription(MartialStatusArabicEnum.Married),
         MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.Married)
     });
     MaritalStatusList.Add(new MaritalStatusPickerModel
     {
         MaritalStatusDisplay   = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.Divorced) : Common.GetEnumDescription(MartialStatusArabicEnum.Divorced),
         MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.Divorced)
     });
 }
Esempio n. 2
0
        public CompleteProfilePageViewModel(INavigationService navigationService)
        {
            NavigationService = navigationService;

            MessagingCenter.Subscribe <string, Position>(this, "LocationAddress", (sender, pickedposition) =>
            {
                Street = AddressfromGPS = sender.ToString();
                AddressPositionfromGPS = pickedposition;
            });
            IsLocationFetch = false;
            IsLoaderBusy    = false;

            //UserPic = "logo.png";
            IsLoaderBusy       = false;
            HasCurrentLocation = false;
            Street             = AppResource.cyp_StreetPlaceholder;
            DOB = AppResource.cyp_DOBPlaceholder;
            TermConditionCheck = "resource://Khadamat_CustomerApp.SvgImages.blank_check_box.svg";

            //GetCurrentlocation();
            MaritalStatusList.Add(new MaritalStatusPickerModel
            {
                MaritalStatusDisplay   = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.Single) : Common.GetEnumDescription(MartialStatusArabicEnum.Single),
                MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.Single)
            });
            //MaritalStatusList.Add(new MaritalStatusPickerModel
            //{
            //    MaritalStatusDisplay = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.InARelationship) : Common.GetEnumDescription(MartialStatusArabicEnum.InARelationship),
            //    MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.InARelationship)
            //});
            //MaritalStatusList.Add(new MaritalStatusPickerModel
            //{
            //    MaritalStatusDisplay = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.Engaged) : Common.GetEnumDescription(MartialStatusArabicEnum.Engaged),
            //    MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.Engaged)
            //});
            MaritalStatusList.Add(new MaritalStatusPickerModel
            {
                MaritalStatusDisplay   = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.Married) : Common.GetEnumDescription(MartialStatusArabicEnum.Married),
                MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.Married)
            });
            //MaritalStatusList.Add(new MaritalStatusPickerModel
            //{
            //    MaritalStatusDisplay = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.ItsComplicated) : Common.GetEnumDescription(MartialStatusArabicEnum.ItsComplicated),
            //    MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.ItsComplicated)
            //});
            //MaritalStatusList.Add(new MaritalStatusPickerModel
            //{
            //    MaritalStatusDisplay = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.InAnOpenRelationship) : Common.GetEnumDescription(MartialStatusArabicEnum.InAnOpenRelationship),
            //    MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.InAnOpenRelationship)
            //});
            MaritalStatusList.Add(new MaritalStatusPickerModel
            {
                MaritalStatusDisplay   = Common.GetLanguage() != "ar-AE" ? Common.GetEnumDescription(MartialStatusEnum.Divorced) : Common.GetEnumDescription(MartialStatusArabicEnum.Divorced),
                MaritalStatusEnumValue = Convert.ToInt32(MartialStatusEnum.Divorced)
            });
            if (BaseViewModel.countryDataModels != null && BaseViewModel.countryDataModels.Count > 0 && BaseViewModel.provienceDataModels != null && BaseViewModel.provienceDataModels.Count > 0)
            {
                if (Application.Current.Properties.ContainsKey("AppLocale") && !string.IsNullOrEmpty(Application.Current.Properties["AppLocale"].ToString()))
                {
                    var languageculture = Application.Current.Properties["AppLocale"].ToString();
                    Country = languageculture.Equals("en-US") ? BaseViewModel.countryDataModels.FirstOrDefault().country_name : BaseViewModel.countryDataModels.FirstOrDefault().arabic_country_name;
                }
                else
                {
                    Country = BaseViewModel.countryDataModels.FirstOrDefault().country_name;
                }

                foreach (var item in BaseViewModel.provienceDataModels)
                {
                    if (Application.Current.Properties.ContainsKey("AppLocale") && !string.IsNullOrEmpty(Application.Current.Properties["AppLocale"].ToString()))
                    {
                        var languageculture = Application.Current.Properties["AppLocale"].ToString();
                        item.display_province_name = languageculture.Equals("en-US") ? item.province_name : item.arabic_province_name;
                    }
                    else
                    {
                        item.display_province_name = item.province_name;
                    }
                    ProvinceList.Add(item);
                }


                ProviencePickerSelectedindex = ProvinceList.IndexOf(ProvinceList.Where(x => x.province_name.ToLower().Contains("sana") || x.arabic_province_name.Contains("sana")).ToList().FirstOrDefault());
            }
            //GetCountriesApi();

            MessagingCenter.Subscribe <ImagesModel>(this, "ProfilePicture", (sender) =>
            {
                GallData = sender;
                UserPic  = GallData.Image;
            });


            MessagingCenter.Send("CompleteProfilePage", "CompleteProfilePage");
        }
        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);
                }
            }
        }