示例#1
0
文件: Form1.cs 项目: YannickB23/Books
        private void cmbCountry_SelectedIndexChanged(object sender, EventArgs e)
        {
            BookRepo repo  = new BookRepo();
            string   value = cmbCountry.SelectedValue.ToString();
            var      list  = repo.GetAuthorsFromSelectedCountry(Convert.ToInt32(value));

            lstAuthor.ValueMember = "Author";
            lstAuthor.DataSource  = list;
        }