public void fillData(DataGridViewRow row) { try { textBoxMaPhieu.Text = row.Cells[0].Value.ToString(); textBoxNgayTao.Text = row.Cells[1].Value.ToString(); textBoxNguoiLapPhieu.Text = row.Cells[4].Value.ToString(); textBoxNhanVienGH.Text = row.Cells[2].Value.ToString(); HoTro ht = new HoTro(); ht.TaiDuLieu(comboBoxNhaCungCap, "Provider", "ProviderId", "ProviderName"); string providerName = row.Cells[3].Value.ToString(); ProviderManager pl = new ProviderManager(); foreach (Provider p in pl.GetAll()) { if (p.ProviderName.Equals(providerName)) { comboBoxNhaCungCap.SelectedValue = p.ID; break; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }