private bool FindEntityRecord(string name) { enititiesBindingSource.MoveFirst(); bool found = false; while (!found) { DataSourceEntityProperties w = (DataSourceEntityProperties)enititiesBindingSource.Current; if (w.entity == name || (enititiesBindingSource.Position == enititiesBindingSource.Count - 1)) { found = true; } else { enititiesBindingSource.MoveNext(); } } return(found); // workFlowsBindingSource.DataSource = DMEEditor.ConfigEditor.WorkFlows[DMEEditor.ConfigEditor.WorkFlows.FindIndex(x => x.DataWorkFlowName == e.CurrentEntity)]; }
private void FillEntities() { DataSourceFieldProperties w = (DataSourceFieldProperties)appfieldPropertiesBindingSource.Current; if (!w.enitities.Any(s => s.entity == EntityName)) { IDataSource ds = DMEEditor.GetDataSource(dsname); EntityStructure = ds.GetEntityStructure(EntityName, true); DataSourceEntityProperties y = new DataSourceEntityProperties(); y.entity = EntityStructure.EntityName; foreach (EntityField item in EntityStructure.Fields) { AppField x = new AppField(); x.datasourcename = dsname; x.entityname = EntityName; x.fieldname = item.fieldname; y.properties.Add(x); } this.enititiesBindingSource.Add(y); } }