示例#1
0
        private void bt_TimKiem_Click(object sender, EventArgs e)
        {
            SachService    svSach = new SachService();
            List <SachDTO> lsSach = new List <SachDTO>();

            if (cbb_ThongTinTimKiem.Text == "Tên sách")
            {
                lsSach = svSach.getFormSachNhaXuatBan(tb_NhapTT.Text);
                dgv_DuLieuSach.DataSource = lsSach;
            }
            else if (cbb_ThongTinTimKiem.Text == "Năm xuất bản")
            {
                lsSach = svSach.getFormSachNamXuatBan(tb_NhapTT.Text);
                dgv_DuLieuSach.DataSource = lsSach;
            }
            else if (cbb_ThongTinTimKiem.Text == "Tên sách")
            {
                lsSach = svSach.getFormSachTenDauSach(tb_NhapTT.Text);
                dgv_DuLieuSach.DataSource = lsSach;
            }
        }