コード例 #1
0
        protected void DisplayAddress(PostCodeAnywhere.AddressResults address)
        {
            txtAddressLine1.Text = address.Results[0].Line1;
            txtAddressLine2.Text = address.Results[0].Line2;
            txtAddressLine3.Text = address.Results[0].Line3;
            txtPostTown.Text     = address.Results[0].PostTown;
            txtPostCode.Text     = address.Results[0].Postcode;
            txtCounty.Text       = address.Results[0].County;
            txtLatitude.Text     = address.Results[0].GeographicData.WGS84Latitude.ToString();
            txtLongitude.Text    = address.Results[0].GeographicData.WGS84Longitude.ToString();

            txtLocationName.Text = m_organisationName + " - " + txtPostTown.Text;

            this.hdnSetPointRadius.Value = "true";

            if (cboClosestTown.SelectedValue == "")
            {
                Facade.IPostTown  facPostTown = new Facade.Point();
                Entities.PostTown postTown    = facPostTown.GetPostTownForTownName(txtPostTown.Text);

                if (postTown != null)
                {
                    RadComboBoxItem item = new RadComboBoxItem(txtPostTown.Text, postTown.TownId.ToString());
                    cboClosestTown.Items.Add(item);
                    item.Selected = true;
                }
            }
        }
コード例 #2
0
ファイル: point.ascx.cs プロジェクト: norio-soft/proteo
        protected void DisplayAddress(PostCodeAnywhere.AddressResults address)
        {
            add1 = txtAddressLine1.Text = address.Results[0].Line1;

            txtAddressLine2.Text = address.Results[0].Line2;
            txtAddressLine3.Text = address.Results[0].Line3;
            txtPostTown.Text     = address.Results[0].PostTown;
            txtPostCode.Text     = address.Results[0].Postcode;
            txtCounty.Text       = address.Results[0].County;
            hidLat.Value         = address.Results[0].GeographicData.WGS84Latitude.ToString();
            hidLon.Value         = address.Results[0].GeographicData.WGS84Longitude.ToString();

            int countryID = Int32.Parse(cboCountry.SelectedValue);

            this.hdnSetPointRadius.Value = "true";

            if (cboClosestTown.SelectedValue == "")
            {
                cboClosestTown.Text = txtPostTown.Text;
                Facade.IPostTown  facPostTown = new Facade.Point();
                Entities.PostTown postTown    = facPostTown.GetPostTownForTownName(txtPostTown.Text, countryID);
                if (postTown != null)
                {
                    cboClosestTown.SelectedValue = postTown.TownId.ToString();
                    txtDescription.Text          = string.Concat(cboNewPointOwner.Text, " - ", cboClosestTown.Text);
                }

                cboClosestTown.Focus();
            }
        }