private void frm_ChiTietPhieuNhap_Load(object sender, EventArgs e)
 {
     ncc = bus_ncc.BangNCC();
     LoadHang();
     BuocVaoComboBox_NCC();
     
 }
Esempio n. 2
0
        private void Search(String timkiem)
        {
            DataTable ncc          = bus_ncc.BangNCC();
            DataView  dataView_ncc = new DataView(ncc);

            try
            {
                int mancc = Int32.Parse(timkiem);
                dataView_ncc.RowFilter   = String.Format("Mancc = {0}", mancc);
                dgvNhaCungCap.DataSource = dataView_ncc;
                BuocDLVaoCacDieuKhien_NCC();
            }
            catch (FormatException ex)
            {
                dataView_ncc.RowFilter   = String.Format("tenncc like '%{0}%'", timkiem);
                dgvNhaCungCap.DataSource = dataView_ncc;
                BuocDLVaoCacDieuKhien_NCC();
            }
        }