Ejemplo n.º 1
0
        private void LayDanhSachChucNang()
        {
            ChucNangBUS itemBUS = new ChucNangBUS();
            BindingList<ChucNangDTO> danhSach = itemBUS.LayDanhSach();
            danhSach.AllowEdit = danhSach.AllowNew = danhSach.AllowRemove = true;
            gcDanhMucChucNang.DataSource = danhSach;

            PhanHeBUS phanHeBUS = new PhanHeBUS();
            BindingList<PhanHeDTO> dsPhanHe = phanHeBUS.LayDanhSach();

            RepositoryItemLookUpEdit comboPhanHe = new RepositoryItemLookUpEdit();
            comboPhanHe.DataSource = dsPhanHe;
            comboPhanHe.PopulateColumns();
            foreach (LookUpColumnInfo col in comboPhanHe.Columns)
            {
                if (col.FieldName == "Id")
                    col.Visible = false;
            }
            comboPhanHe.DisplayMember = "TenPhanHe";
            comboPhanHe.ValueMember = "Id";
            gvDanhMucChucNang.Columns["IdPhanHe"].ColumnEdit = comboPhanHe;
        }
Ejemplo n.º 2
0
 private void LayDanhSachPhanHe()
 {
     PhanHeBUS itemBUS = new PhanHeBUS();
     BindingList<PhanHeDTO> danhSach = itemBUS.LayDanhSach();
     danhSach.AllowEdit = danhSach.AllowNew = danhSach.AllowRemove = true;
     gcDanhMucPhanHe.DataSource = danhSach;
 }