private void AppfieldPropertiesBindingSource_AddingNew(object sender, AddingNewEventArgs e) { DataSourceFieldProperties x = new DataSourceFieldProperties(); x.DatasourceName = dsname; e.NewObject = x; }
private bool FindDSRecord(string name) { appfieldPropertiesBindingSource.MoveFirst(); bool found = false; while (!found) { DataSourceFieldProperties w = (DataSourceFieldProperties)appfieldPropertiesBindingSource.Current; if (w.DatasourceName == name || (appfieldPropertiesBindingSource.Position == appfieldPropertiesBindingSource.Count - 1)) { found = true; } else { appfieldPropertiesBindingSource.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); } }