Exemplo n.º 1
0
        void loadData()
        {
            DanhSachPhieuThuePhong.Rows[index].Cells[0].Value = index + 1;
            DataGridViewComboBoxCell cbMaKhachHang = DanhSachPhieuThuePhong.Rows[index].Cells[1] as DataGridViewComboBoxCell;

            cbMaKhachHang.DataSource    = khachHangBLL.loadKhachHang();
            cbMaKhachHang.DisplayMember = "TenKhachHang";
            cbMaKhachHang.ValueMember   = "MaKhachHang";
            cbMaKhachHang.ValueType     = typeof(string);

            cbMaPhong.DataSource    = phongBLL.loadPhongChuaThue();
            cbMaPhong.DisplayMember = "TenPhong";
            cbMaPhong.ValueMember   = "MaPhong";

            index++;
        }