private void HienThiDanhSach()
 {
     try
     {
         tblmathangBL ctr     = new tblmathangBL();
         string       sidhang = "";
         try { sidhang = cbTKHangSX.SelectedValue.ToString().Trim(); }
         catch { }
         string sidloai = "";
         try { sidloai = cbTKLoaiMH.SelectedValue.ToString().Trim(); }
         catch { }
         DataTable dt       = new DataTable();
         int       isoluong = 0;
         try
         {
             isoluong = Convert.ToInt32(txtSoLuong.Text.Trim());
         }
         catch { }
         dt = ctr.filterallforthongke(txtKeyword.Text.Trim(), sidhang, sidloai, isoluong);
         c1FlexGrid1.DataSource = dt;
         try { c1FlexGrid1.Cols[c1FlexGrid1.Cols["tenhang"].Index].Editor = cbHangSX; }
         catch { }
         try { c1FlexGrid1.Cols[c1FlexGrid1.Cols["tenloai"].Index].Editor = cbLoaiMH; }
         catch { }
         try { c1FlexGrid1.Cols[c1FlexGrid1.Cols["donvi"].Index].Editor = cbDonVi; }
         catch { }
         try { c1FlexGrid1.Cols["gianhap"].Format = "N0"; }
         catch { }
         try { c1FlexGrid1.Cols["giabanbuon"].Format = "N0"; }
         catch { }
         try { c1FlexGrid1.Cols["giabanle"].Format = "N0"; }
         catch { }
         try { c1FlexGrid1.Cols["giadl1"].Format = "N0"; }
         catch { }
         try { c1FlexGrid1.Cols["giadl2"].Format = "N0"; }
         catch { }
         try { c1FlexGrid1.Cols["giadl3"].Format = "N0"; }
         catch { }
         try { c1FlexGrid1.Cols["giadl4"].Format = "N0"; }
         catch { }
         try { c1FlexGrid1.Cols["giadl5"].Format = "N0"; }
         catch { }
         FormatGrid();
         lbCount.Text = "Tìm thấy: " + dt.Rows.Count.ToString() + " mặt hàng";
         //txtKeyword.Focus();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Lỗi mở dữ liệu.\nChi tiết lỗi : " + ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
         lbCount.Text = "Tìm thấy:...";
     }
 }