private void dgvHoaDon_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { donNhapHangBLL = new DonNhapHangBLL(); string maHD = dgvHoaDon.Rows[e.RowIndex].Cells[0].Value.ToString(); donNhapHang = donNhapHangBLL.GetDonNhapHangByID(maHD); txtMaHD.Text = donNhapHang.MaDNH; txtNgayLap.Text = donNhapHang.NgayLap.ToString(); txtConNo.Text = donNhapHang.ConLai.ToString(); txtTongTien.Text = donNhapHang.TongTien.ToString(); } }