コード例 #1
0
 //Xử lý tìn kiếm (theo MaHĐB, MaNV, HoTenKH)
 private void txtTimKiem_TextChanged(object sender, EventArgs e)
 {
     if (txtTimKiem.Text.Trim() == "")
     {
         dgvHoaDonBan.DataSource = dbHoaDonBan.getHoaDonBan().Tables[0];
         DataBind_ChiTietHoaDonBan();
         return;
     }
     dgvHoaDonBan.DataSource = dbHoaDonBan.getHoaDonBanTheoChuoiTimKiem(txtTimKiem.Text.ToUpper().Trim()).Tables[0];
     DataBind_ChiTietHoaDonBan();
 }
コード例 #2
0
 //Xử lý tìn kiếm
 private void txtTimKiem_TextChanged(object sender, EventArgs e)
 {
     if (txtTimKiem.Text.Trim() == "")
     {
         dgvHoaDonBan.DataSource         = dbHoaDonBan.getHoaDonBan();
         dgvHoaDonBan.Columns[4].Visible = false;
         dgvHoaDonBan.Columns[5].Visible = false;
         LoadData_ChiTietHoaDonBan();
         return;
     }
     dgvHoaDonBan.DataSource         = dbHoaDonBan.getHoaDonBanTheoChuoiTimKiem(txtTimKiem.Text.ToUpper().Trim());
     dgvHoaDonBan.Columns[4].Visible = false;
     dgvHoaDonBan.Columns[5].Visible = false;
     LoadData_ChiTietHoaDonBan();
 }