예제 #1
0
        private void ClbChuDe_SelectedIndexChanged(object sender, EventArgs e)
        {
            string a = "";

            if (clbChuDe.CheckedItems.Count > 0)
            {
                for (int i = 0; i < clbChuDe.CheckedItems.Count; i++)
                {
                    a = (clbChuDe as ListBox).GetItemText((clbChuDe as ListBox).SelectedItem);
                }
                dgvSanPham.DataSource = db.Sachtheochude(a);
            }
            else
            {
                dgvSanPham.DataSource = db.InfoSach();
            }
        }