@@ -38,7 +38,6 @@ | |||||
<ApplicationIcon>scales_of_Balance_16px_1117673_easyicon.net.ico</ApplicationIcon> | <ApplicationIcon>scales_of_Balance_16px_1117673_easyicon.net.ico</ApplicationIcon> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Reference Include="Devart.Data, Version=5.0.2194.0, Culture=neutral, PublicKeyToken=09af7300eec23701, processorArchitecture=MSIL" /> | |||||
<Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> | <Reference Include="log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> | ||||
<SpecificVersion>False</SpecificVersion> | <SpecificVersion>False</SpecificVersion> | ||||
<HintPath>..\dll\log4net.dll</HintPath> | <HintPath>..\dll\log4net.dll</HintPath> | ||||
@@ -287,14 +287,10 @@ namespace CNAS_DBSync | |||||
/// <param name="e"></param> | /// <param name="e"></param> | ||||
private void cbxInstrument_SelectedIndexChanged(object sender, EventArgs e) | private void cbxInstrument_SelectedIndexChanged(object sender, EventArgs e) | ||||
{ | { | ||||
if (cbxInstrument.Text == null) return; | if (cbxInstrument.Text == null) return; | ||||
InstrumentData instrumentData = InstrumentDataFact.CreateInstrumentDataSource(currentSyncItem.SyncInstrumentDSInfo, new object[] { "", "", "" }); | InstrumentData instrumentData = InstrumentDataFact.CreateInstrumentDataSource(currentSyncItem.SyncInstrumentDSInfo, new object[] { "", "", "" }); | ||||
//dictInstruTables = instrumentData.GetInstrumentData(); | |||||
//dictInstruTables = | |||||
DataTable dtTableType = null; | DataTable dtTableType = null; | ||||
string strTableName_Instru = cbxInstrument.Text.ToString(); | string strTableName_Instru = cbxInstrument.Text.ToString(); | ||||
@@ -604,6 +600,17 @@ namespace CNAS_DBSync | |||||
return 1; | return 1; | ||||
} | } | ||||
public AccessFormatConfig AccessFormat { get; set; } | |||||
public ExcelFormatConfig ExcelFormat { get; set; } | |||||
public FoxProFormatConfig FoxProFormat { get; set; } | |||||
public SqliteFormatConfig SqliteFormat { get; set; } | |||||
public SqlServerFormatConfig SqlServerFormat { get; set; } | |||||
public OracleFormatConfig OracleFormat { get; set; } | |||||
public MySqlFormatConfig MySqlFormat { get; set; } | |||||
public NormalFileFormatConfig NormalFileFormat { get; set; } | |||||
public PostgreSqlFormatConfig PostgreSqlFormat { get; set; } | |||||
public KingbaseFormatConfig KingbaseFormat { get; set; } | |||||
public DmFormatConfig DmFormat { get; set; } | |||||
/// <summary> | /// <summary> | ||||
/// 手动输入表名时,获取该表的表信息 | /// 手动输入表名时,获取该表的表信息 | ||||
/// </summary> | /// </summary> | ||||
@@ -612,9 +619,42 @@ namespace CNAS_DBSync | |||||
{ | { | ||||
if (currentSyncItem.SyncInstrumentDSInfo == null) return -1; | if (currentSyncItem.SyncInstrumentDSInfo == null) return -1; | ||||
if (currentSyncItem.SyncTargetDBInfo == null) return -2; | if (currentSyncItem.SyncTargetDBInfo == null) return -2; | ||||
SqlServerFormatConfig SqlServerFormat = FileOperation.GetFormatConfigData<SqlServerFormatConfig>("SqlServerFormatConfig.xml"); | |||||
string sql = ""; | |||||
ExcelFormat = FileOperation.GetFormatConfigData<ExcelFormatConfig>("ExcelFormatConfig.xml"); | |||||
AccessFormat = FileOperation.GetFormatConfigData<AccessFormatConfig>("AccessFormatConfig.xml"); | |||||
FoxProFormat = FileOperation.GetFormatConfigData<FoxProFormatConfig>("FoxProFormatConfig.xml"); | |||||
SqliteFormat = FileOperation.GetFormatConfigData<SqliteFormatConfig>("SqliteFormatConfig.xml"); | |||||
SqlServerFormat = FileOperation.GetFormatConfigData<SqlServerFormatConfig>("SqlServerFormatConfig.xml"); | |||||
OracleFormat = FileOperation.GetFormatConfigData<OracleFormatConfig>("OracleFormatConfig.xml"); | |||||
NormalFileFormat = FileOperation.GetFormatConfigData<NormalFileFormatConfig>("NormalFileFormatConfig.xml"); | |||||
KingbaseFormat = FileOperation.GetFormatConfigData<KingbaseFormatConfig>("KingbaseFormatConfig.xml"); | |||||
switch (currentSyncItem.SyncInstrumentDSInfo.InstrumentDataSourceType) | |||||
{ | |||||
case DataSourceType.MySQL: | |||||
MySqlFormat = FileOperation.GetFormatConfigData<MySqlFormatConfig>("MySqlFormatConfig.xml"); | |||||
sql = MySqlFormat.AutoSql.MySqlViewSql; | |||||
break; | |||||
case DataSourceType.Dm: | |||||
DmFormat = FileOperation.GetFormatConfigData<DmFormatConfig>("DmFormatConfig.xml"); | |||||
sql = DmFormat.AutoSql.DmViewSql; | |||||
break; | |||||
case DataSourceType.Oracle: | |||||
OracleFormat = FileOperation.GetFormatConfigData<OracleFormatConfig>("OracleFormatConfig.xml"); | |||||
sql = OracleFormat.AutoSql.OracleViewSql; | |||||
break; | |||||
case DataSourceType.PostgreSQL: | |||||
PostgreSqlFormat = FileOperation.GetFormatConfigData<PostgreSqlFormatConfig>("PostgreSqlFormatConfig.xml"); | |||||
sql = PostgreSqlFormat.AutoSql.PostgreSqlViewSql; | |||||
break; | |||||
case DataSourceType.SQL: | |||||
SqlServerFormat = FileOperation.GetFormatConfigData<SqlServerFormatConfig>("SqlServerFormatConfig.xml"); | |||||
sql = SqlServerFormat.AutoSql.SqlServerViewSql; | |||||
break; | |||||
default: | |||||
break; | |||||
} | |||||
string sql = SqlServerFormat.AutoSql.SqlServerViewSql; | |||||
cbxInstrument.Text = ExtractTableNames(sql); | cbxInstrument.Text = ExtractTableNames(sql); | ||||
if (cbxInstrument.Text == "") return -6; | if (cbxInstrument.Text == "") return -6; | ||||
@@ -40,7 +40,7 @@ | |||||
</Reference> | </Reference> | ||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||||
<SpecificVersion>False</SpecificVersion> | <SpecificVersion>False</SpecificVersion> | ||||
<HintPath>..\..\..\CNASClient\CNAS_DBSync\dll\Newtonsoft.Json.dll</HintPath> | |||||
<HintPath>..\dll\Newtonsoft.Json.dll</HintPath> | |||||
</Reference> | </Reference> | ||||
<Reference Include="System" /> | <Reference Include="System" /> | ||||
<Reference Include="System.Configuration" /> | <Reference Include="System.Configuration" /> | ||||
@@ -89,8 +89,9 @@ | |||||
<Reference Include="MySql.Data"> | <Reference Include="MySql.Data"> | ||||
<HintPath>..\..\..\CNASClient\CNAS_DBSync\dll\MySql.Data.dll</HintPath> | <HintPath>..\..\..\CNASClient\CNAS_DBSync\dll\MySql.Data.dll</HintPath> | ||||
</Reference> | </Reference> | ||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | |||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> | |||||
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | |||||
<SpecificVersion>False</SpecificVersion> | |||||
<HintPath>..\dll\Newtonsoft.Json.dll</HintPath> | |||||
</Reference> | </Reference> | ||||
<Reference Include="Npgsql, Version=8.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL"> | <Reference Include="Npgsql, Version=8.0.3.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL"> | ||||
<HintPath>..\packages\Npgsql.8.0.3\lib\netstandard2.0\Npgsql.dll</HintPath> | <HintPath>..\packages\Npgsql.8.0.3\lib\netstandard2.0\Npgsql.dll</HintPath> | ||||
@@ -1,4 +1,4 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<configuration> | <configuration> | ||||
<configSections> | <configSections> | ||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> | ||||
@@ -50,9 +50,7 @@ | |||||
</filter> | </filter> | ||||
</appender> | </appender> | ||||
</log4net> | </log4net> | ||||
<startup> | |||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> | |||||
</startup> | |||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup> | |||||
<runtime> | <runtime> | ||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||||
<dependentAssembly> | <dependentAssembly> | ||||
@@ -76,11 +74,5 @@ | |||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> | <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> | ||||
</dependentAssembly> | </dependentAssembly> | ||||
</assemblyBinding> | </assemblyBinding> | ||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | |||||
<dependentAssembly> | |||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | |||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" /> | |||||
</dependentAssembly> | |||||
</assemblyBinding> | |||||
</runtime> | </runtime> | ||||
</configuration> | |||||
</configuration> |
@@ -2,5 +2,6 @@ | |||||
"ccc": "2025-02-17 10:40:25", | "ccc": "2025-02-17 10:40:25", | ||||
"ddd": "2025-02-17 11:32:02", | "ddd": "2025-02-17 11:32:02", | ||||
"eee": "2025-02-17 15:04:41", | "eee": "2025-02-17 15:04:41", | ||||
"fff": "2025-02-17 14:31:03" | |||||
"fff": "2025-02-17 14:31:03", | |||||
"aaa": "2025-02-19 16:32:24" | |||||
} | } |