internal void SchemaChanged(JoinSourceType type) { if (type == JoinSourceType.Target) { return; } _view.ClearJoins(); FdoConnection conn = GetConnection(type); if (conn != null) { using (FdoFeatureService service = conn.CreateFeatureService()) { switch (type) { case JoinSourceType.Left: _view.LeftClasses = service.GetClassNames(_view.SelectedLeftSchema); ClassChanged(type); break; case JoinSourceType.Right: _view.RightClasses = service.GetClassNames(_view.SelectedRightSchema); ClassChanged(type); break; } } } }
internal void ConnectionChanged(JoinSourceType type) { if (type != JoinSourceType.Target) { _view.ClearJoins(); } FdoConnection conn = GetConnection(type); if (conn != null) { using (FdoFeatureService service = conn.CreateFeatureService()) { switch (type) { case JoinSourceType.Left: _view.LeftSchemas = service.GetSchemaNames(); SchemaChanged(type); break; case JoinSourceType.Right: _view.RightSchemas = service.GetSchemaNames(); SchemaChanged(type); break; case JoinSourceType.Target: _view.TargetSchemas = service.GetSchemaNames(); SchemaChanged(type); break; } } } }
internal void ClassChanged(JoinSourceType type) { if (type == JoinSourceType.Target) { return; } _view.ClearJoins(); FdoConnection conn = GetConnection(type); if (conn != null) { using (FdoFeatureService service = conn.CreateFeatureService()) { switch (type) { case JoinSourceType.Left: { string schema = _view.SelectedLeftSchema; string className = _view.SelectedLeftClass; ClassDefinition cd = service.GetClassByName(schema, className); if (cd != null) { List <string> properties = new List <string>(); foreach (PropertyDefinition pd in cd.Properties) { properties.Add(pd.Name); } _view.LeftProperties = properties; } } break; case JoinSourceType.Right: { string schema = _view.SelectedRightSchema; string className = _view.SelectedRightClass; ClassDefinition cd = service.GetClassByName(schema, className); if (cd != null) { List <string> properties = new List <string>(); foreach (PropertyDefinition pd in cd.Properties) { properties.Add(pd.Name); } _view.RightProperties = properties; } } break; } } } SetTargetGeometries(); }
private static string GetOptionName(JoinSourceType type) { switch (type) { case JoinSourceType.Dbf: return("Table"); case JoinSourceType.Xls: return("Worksheet"); case JoinSourceType.Csv: return("Separator"); } return("Table"); }
internal FdoConnection GetConnection(JoinSourceType type) { switch (type) { case JoinSourceType.Left: return(_connMgr.GetConnection(_view.SelectedLeftConnection)); case JoinSourceType.Right: return(_connMgr.GetConnection(_view.SelectedRightConnection)); case JoinSourceType.Target: return(_connMgr.GetConnection(_view.SelectedTargetConnection)); default: return(null); } }
internal void ClassChanged(JoinSourceType type) { if(type == JoinSourceType.Target) return; _view.ClearJoins(); FdoConnection conn = GetConnection(type); if(conn != null) { using(FdoFeatureService service = conn.CreateFeatureService()) { switch (type) { case JoinSourceType.Left: { string schema = _view.SelectedLeftSchema; string className = _view.SelectedLeftClass; ClassDefinition cd = service.GetClassByName(schema, className); if (cd != null) { List<string> properties = new List<string>(); foreach(PropertyDefinition pd in cd.Properties) { properties.Add(pd.Name); } _view.LeftProperties = properties; } } break; case JoinSourceType.Right: { string schema = _view.SelectedRightSchema; string className = _view.SelectedRightClass; ClassDefinition cd = service.GetClassByName(schema, className); if (cd != null) { List<string> properties = new List<string>(); foreach (PropertyDefinition pd in cd.Properties) { properties.Add(pd.Name); } _view.RightProperties = properties; } } break; } } } SetTargetGeometries(); }
internal void SchemaChanged(JoinSourceType type) { if (type == JoinSourceType.Target) return; _view.ClearJoins(); FdoConnection conn = GetConnection(type); if (conn != null) { using (FdoFeatureService service = conn.CreateFeatureService()) { switch (type) { case JoinSourceType.Left: _view.LeftClasses = service.GetClassNames(_view.SelectedLeftSchema); ClassChanged(type); break; case JoinSourceType.Right: _view.RightClasses = service.GetClassNames(_view.SelectedRightSchema); ClassChanged(type); break; } } } }
internal void ConnectionChanged(JoinSourceType type) { if(type != JoinSourceType.Target) _view.ClearJoins(); FdoConnection conn = GetConnection(type); if (conn != null) { using (FdoFeatureService service = conn.CreateFeatureService()) { switch (type) { case JoinSourceType.Left: _view.LeftSchemas = service.GetSchemaNames(); SchemaChanged(type); break; case JoinSourceType.Right: _view.RightSchemas = service.GetSchemaNames(); SchemaChanged(type); break; case JoinSourceType.Target: _view.TargetSchemas = service.GetSchemaNames(); SchemaChanged(type); break; } } } }
internal FdoConnection GetConnection(JoinSourceType type) { switch (type) { case JoinSourceType.Left: return _connMgr.GetConnection(_view.SelectedLeftConnection); case JoinSourceType.Right: return _connMgr.GetConnection(_view.SelectedRightConnection); case JoinSourceType.Target: return _connMgr.GetConnection(_view.SelectedTargetConnection); default: return null; } }