public void Init(int NumberReader) { reader = ReaderInfo.GetReader(NumberReader); label1.Text = "Адрес фактического проживания или временной регистрации в России №" + reader.NumberReader + ".\n " + reader.FamilyName + " " + reader.Name + " " + reader.FatherName; Dictionary <int, string> CountryTable = ReaderInfo.GetCountriesList(); BindingSource bs = new BindingSource(CountryTable, null); cbCountry.DataSource = bs; cbCountry.ValueMember = "Key"; cbCountry.DisplayMember = "Value"; cbCountry.SelectedValue = reader.RegistrationCountry; tbRegion.Text = reader.LiveRegion; tbProvince.Text = reader.LiveProvince; tbDistrict.Text = reader.LiveDistrict; tbCity.Text = reader.LiveCity; tbStreet.Text = reader.LiveStreet; tbHouse.Text = reader.LiveHouse; tbFlat.Text = reader.LiveFlat; if (reader.MobileTelephone.Length == 14) { tbMobilePhoneCode.Text = reader.MobileTelephone.Substring(3, 3); tbMobilePhone.Text = reader.MobileTelephone.Substring(7, 7); } tbEmail.Text = reader.Email; readerRightsView1.Init(NumberReader); DisableAll(); }
public HttpResponseMessage CountriesList() { Dictionary <int, string> Countries; try { Countries = ReaderInfo.GetCountriesList(); } catch (Exception ex) { return(ALISErrorFactory.CreateError(ex.Message, Request)); } return(ALISResponseFactory.CreateResponse(Countries, Request)); }