コード例 #1
0
        private void ManageBooks_Load(object sender, EventArgs e)
        {
            DataTable dt1 = new DataTable();
            DataTable dt2 = new DataTable();
            DataTable dt3 = new DataTable();

            lc.booksPageLoad(out dt1, out dt2, out dt3);



            Namecb.DataSource    = dt1;
            Namecb.ValueMember   = dt1.Columns[0].ToString();
            Namecb.DisplayMember = dt1.Columns[1].ToString();

            categorycb.DataSource    = dt2;
            categorycb.ValueMember   = dt2.Columns[0].ToString();
            categorycb.DisplayMember = dt2.Columns[1].ToString();

            authorcb.DataSource    = dt3;
            authorcb.ValueMember   = dt3.Columns[0].ToString();
            authorcb.DisplayMember = dt3.Columns[1].ToString();

            Namecb.Text     = "All";
            categorycb.Text = "All";
            authorcb.Text   = "All";
        }