PowerTools InputMan for Windows Forms 8.0J
GetAddress(String,Boolean,ZipCodeQueryMode) メソッド
使用例 

郵便番号を示す System.String 値。3 桁または 7 桁の数字文字列を指定します。
System.Boolean 値。町域を詳細な丁目に分割する場合は true。それ以外の場合は false
検索のソースを示す ZipCodeQueryMode 列挙値の 1 つ。
指定した郵便番号から住所情報を取得します。
構文

パラメータ

zipCode
郵便番号を示す System.String 値。3 桁または 7 桁の数字文字列を指定します。
splitAreaDetails
System.Boolean 値。町域を詳細な丁目に分割する場合は true。それ以外の場合は false
queryMode
検索のソースを示す ZipCodeQueryMode 列挙値の 1 つ。

戻り値の型

指定した郵便番号を持つ住所の AddressInfo コレクション。
解説
郵便番号が 3 桁の場合は、指定した郵便番号で始まる郵便番号を持つすべての住所を返します。検索が失敗した場合は空のコレクションを返します。
使用例
//  Please use the following namespace
//  using System.Windows.Forms;
//  using GrapeCity.Win.Editors;

public void GetAddressFromZipCode()
{
    // Creates instance of GcAddress component.
    GcAddress gcAddress1 = new GcAddress();

    // Get address with specified ZipCode.            
    System.Console.WriteLine(gcAddress1.GetAddress("9800003"));
    // Output:
    // "9800003,宮城県,仙台市青葉区,小田原(4~8丁目),ミヤギケン,センダイシアオバク,オダワラ(4チョウメ-8チョウメ)"
    System.Console.WriteLine(gcAddress1.GetAddress("9800003", true));
    // Output:
    // "9800003,宮城県,仙台市青葉区,小田原4丁目,ミヤギケン,センダイシアオバク,オダワラ4チョウメ"
    // "9800003,宮城県,仙台市青葉区,小田原5丁目,ミヤギケン,センダイシアオバク,オダワラ5チョウメ"
    // "9800003,宮城県,仙台市青葉区,小田原6丁目,ミヤギケン,センダイシアオバク,オダワラ6チョウメ"
    // "9800003,宮城県,仙台市青葉区,小田原7丁目,ミヤギケン,センダイシアオバク,オダワラ7チョウメ"
    // "9800003,宮城県,仙台市青葉区,小田原8丁目,ミヤギケン,センダイシアオバク,オダワラ8チョウメ"

    // Get the address start with 3-digit ZipCode, include Company Addresses.
    System.Console.WriteLine(gcAddress1.GetAddress("981", ZipCodeQueryMode.Both));
    System.Console.WriteLine(gcAddress1.GetAddress("981", true, ZipCodeQueryMode.Both));
    // Output:
    // A list of address with ZipCode start with "981"
    // Addresses form General Address DataBase in the beginning and Addresses in the end.

    // Query Company Address with Address Kana.
    System.Console.WriteLine(gcAddress1.GetAddress("9813189", true, ZipCodeQueryMode.CompanyZipCode, true));
    // Output:
    // "9813189,宮城県,仙台市泉区,泉中央,2丁目1-1,ミヤギケン,センダイシイズミク,イズミチュウオウ,泉区役所,イズミクヤクシヨ,大口事業所,泉"
}
'  Please use the following namespace
'  using System.Windows.Forms;
'  using GrapeCity.Win.Editors;

Public Sub GetAddressFromZipCode()
    ' Creates instance of GcAddress component.
    Dim gcAddress1 As New GcAddress()

    ' Get address with specified ZipCode.            
    System.Console.WriteLine(gcAddress1.GetAddress("9800003"))
    ' Output:
    ' "9800003,宮城県,仙台市青葉区,小田原(4~8丁目),ミヤギケン,センダイシアオバク,オダワラ(4チョウメ-8チョウメ)"
    System.Console.WriteLine(gcAddress1.GetAddress("9800003", True))
    ' Output:
    ' "9800003,宮城県,仙台市青葉区,小田原4丁目,ミヤギケン,センダイシアオバク,オダワラ4チョウメ"
    ' "9800003,宮城県,仙台市青葉区,小田原5丁目,ミヤギケン,センダイシアオバク,オダワラ5チョウメ"
    ' "9800003,宮城県,仙台市青葉区,小田原6丁目,ミヤギケン,センダイシアオバク,オダワラ6チョウメ"
    ' "9800003,宮城県,仙台市青葉区,小田原7丁目,ミヤギケン,センダイシアオバク,オダワラ7チョウメ"
    ' "9800003,宮城県,仙台市青葉区,小田原8丁目,ミヤギケン,センダイシアオバク,オダワラ8チョウメ"

    ' Get the address start with 3-digit ZipCode, include Company Addresses.
    System.Console.WriteLine(gcAddress1.GetAddress("981", ZipCodeQueryMode.Both))
    System.Console.WriteLine(gcAddress1.GetAddress("981", True, ZipCodeQueryMode.Both))
    ' Output:
    ' A list of address with ZipCode start with "981"
    ' Addresses form General Address DataBase in the beginning and Addresses in the end.

    ' Query Company Address with Address Kana.
    System.Console.WriteLine(gcAddress1.GetAddress("9813189", True, ZipCodeQueryMode.CompanyZipCode, True))
    ' Output:
    ' "9813189,宮城県,仙台市泉区,泉中央,2丁目1-1,ミヤギケン,センダイシイズミク,イズミチュウオウ,泉区役所,イズミクヤクシヨ,大口事業所,泉"
End Sub
参照

GcAddress クラス
GcAddress メンバ
オーバーロード一覧

 

 


© 2004-2015 GrapeCity inc. All rights reserved.