コード例 #1
0
 private void txtSearch_TextChanged(object sender, EventArgs e)
 {
     if (txtSearch.Text != "")
     {
         if (cLogin.search == 0)
         {
             dataGridView1.DataSource = db.SearchCSMaCuon(txtSearch.Text);
         }
         else if (cLogin.search == 1)
         {
             dataGridView1.DataSource = db.SearchCSMaSach(txtSearch.Text);
         }
         else
         {
             dataGridView1.DataSource = db.SearchCSViTri(txtSearch.Text);
         }
     }
     else
     {
         LoadData();
     }
 }