コード例 #1
0
    private void populateYear()
    {
        YearService.serYear year    = new YearService.serYear();
        DataSet             dataset = year.Year_GetAll();

        ddldob_yearBuyer.Items.Clear();

        foreach (DataRow dr in dataset.Tables[0].Rows)
        {
            string   s        = dr["dob_year"].ToString();
            ListItem listItem = new ListItem();
            listItem.Text  = s;
            listItem.Value = dr["dob_year"].ToString();
            ddldob_yearBuyer.Items.Add(listItem);
        }
    }
コード例 #2
0
    private void populateYear()
    {
        YearService.serYear year = new YearService.serYear();
        DataSet dataset = year.Year_GetAll();

        ddldob_yearBuyer.Items.Clear();

        foreach (DataRow dr in dataset.Tables[0].Rows)
        {
            string s = dr["dob_year"].ToString();
            ListItem listItem = new ListItem();
            listItem.Text = s;
            listItem.Value = dr["dob_year"].ToString();
            ddldob_yearBuyer.Items.Add(listItem);
        }
    
    }