Ejemplo n.º 1
0
        private void dgvDanhSachKhachHang_RowEnter(object sender, DataGridViewCellEventArgs e)
        {
            txtMaKhachHang.Text  = dgvDanhSachKhachHang.Rows[e.RowIndex].Cells[0].FormattedValue.ToString();
            txtTenKhachHang.Text = dgvDanhSachKhachHang.Rows[e.RowIndex].Cells[1].FormattedValue.ToString();
            txtSoDienThoai.Text  = dgvDanhSachKhachHang.Rows[e.RowIndex].Cells[3].FormattedValue.ToString();
            txtDiaChi.Text       = dgvDanhSachKhachHang.Rows[e.RowIndex].Cells[2].FormattedValue.ToString();
            txtCongNo.Text       = dgvDanhSachKhachHang.Rows[e.RowIndex].Cells[4].FormattedValue.ToString();

            chitietkhachhang             = hoadonController.SearchMaKhachHang(int.Parse(txtMaKhachHang.Text));
            dgvDanhSachHoaDon.DataSource = chitietkhachhang;
        }