コード例 #1
0
    //---------------------------------------------------------------------------
    private void BindData()
    {
        ddlCountry.DataSource    = country.ShowCountry();
        ddlCountry.DataTextField = "CountryName";
        ddlCountry.DataBind();
        ddlCountry.Items.Insert(0, "Choose One...");

        ddlState.DataSource    = state.ShowAllState();
        ddlState.DataTextField = "StateName";
        ddlState.DataBind();
        ddlState.Items.Insert(0, "Choose One...");

        chklistInrest.DataSource    = intrest.ShowAllIntrest();
        chklistInrest.DataTextField = "Interest";
        chklistInrest.DataBind();


        ddlIncome.DataSource    = income.ShowAllIncome();
        ddlIncome.DataTextField = "Income";
        ddlIncome.DataBind();
        ddlIncome.Items.Insert(0, "Choose One...");

        ddlIndustry.DataSource    = industry.ShowAllIndustry();
        ddlIndustry.DataTextField = "IndustryType";
        ddlIndustry.DataBind();
        ddlIndustry.Items.Insert(0, "Choose One...");

        ddlOccupation.DataSource    = occupation.ShowAllOccupation();
        ddlOccupation.DataTextField = "Occupation";
        ddlOccupation.DataBind();
        ddlOccupation.Items.Insert(0, "Choose One...");
    }
コード例 #2
0
 private void BindData()
 {
     GridView1.DataSource = income.ShowAllIncome();
     GridView1.DataBind();
 }