private void repositoryItemPopupContainerEdit1_Click(object sender, EventArgs e) { string table1 = gridView1.GetFocusedRowCellDisplayText("Link_Table"); IQueryable load = (IQueryable)context.GetType().GetProperty(table1.TrimEnd()).GetValue(context, null); gridControl2.DataSource = load.ElementType.GetProperties(); }
void ButtonEdit_TextChanged3(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(agencySearch.Text)) { int value = Convert.ToInt32(agyLevelSearch.Text); var result = (from c in context.SvcRLevel where c.ID == value select c).Distinct(); foreach (var val in result) { gsLoad.gridSearchLoad(agencySearch, "Description", "Description", "Description", "Description", "Description"); labelControl4.Text = val.Lookup_Table.TrimEnd(); IQueryable load = (IQueryable)(context.GetType().GetProperty(val.Lookup_Table.TrimEnd()).GetValue(context, null)); agencySearch.GridControl.DataSource = load; } } }