private async void NewCountryForm_Load(object sender, EventArgs e)
        {
            int i;

            errorProviderCountryName.SetError(CoutryNameTb, "");
            errorProviderCountryCod.SetError(CountryCodTb, "");
            CountryCodTb.Text = string.Empty;
            CoutryNameTb.Text = string.Empty;

            editCountry = AddConferance.editedCountry;

            countrys = _getCountry.GetConferencesCountry();

            //GetResponse();
            if (editCountry != null)
            {
                CountryCodTb.Text = editCountry.CountryCode;
                CoutryNameTb.Text = editCountry.DictionaryCountryName;
            }
            if (editCountry == null)
            {
                CountryCodTb.Text = string.Empty;
                CoutryNameTb.Text = string.Empty;
            }
        }
 private void NewDistrictForm_Load(object sender, EventArgs e)
 {
     countries = conferenceCountryRepository.GetConferencesCountry();
     CountryComboBox.DataSource    = countries;
     CountryComboBox.DisplayMember = "DictionaryCountryName";
     CountryComboBox.ValueMember   = "DictionaryCountryId";
     if (DistrictId == null)
     {
         DistrictId = conferenceDistrictRepository.GetNextId();
         DistrictNameTextBox.Text      = "";
         DistrictCodeTextBox.Text      = "";
         SaveButton.Click             += new EventHandler(AddDistrict);
         CountryComboBox.SelectedIndex = 0;
     }
     else
     {
         AddConferenceDistrictModel district = conferenceDistrictRepository.GetDistrict((int)DistrictId);
         DistrictNameTextBox.Text      = district.DictionaryDistrictName;
         DistrictCodeTextBox.Text      = district.DistrictCode;
         SaveButton.Click             += new EventHandler(EditDistrict);
         CountryComboBox.SelectedValue = district.DictionaryCountryId;
     }
 }
Exemplo n.º 3
0
        public IActionResult GetCountry()
        {
            List <AddConferenceCountryModel> demoModels = _getCountry.GetConferencesCountry();

            return(Ok(demoModels));
        }