Browse Source

Update 20230324

master
nelson.kai 2 years ago
parent
commit
0723743672
  1. BIN
      .vs/ExportDataToFile/FileContentIndex/1fdd26f4-9f97-4ac0-9d0c-0e5ef70067a1.vsidx
  2. 0
      .vs/ExportDataToFile/FileContentIndex/read.lock
  3. BIN
      .vs/ExportDataToFile/v16/.suo
  4. BIN
      .vs/ExportDataToFile/v17/.suo
  5. 9
      ExportDataToFile.sln
  6. 171
      Form1.Designer.cs
  7. 127
      Form1.cs
  8. 24
      Form1.resx
  9. 138
      Oracle.DataAccess.Common.Configuration.Section.xsd
  10. 221
      Oracle.ManagedDataAccess.Client.Configuration.Section.xsd

BIN
.vs/ExportDataToFile/FileContentIndex/1fdd26f4-9f97-4ac0-9d0c-0e5ef70067a1.vsidx

0
.vs/ExportDataToFile/FileContentIndex/read.lock

BIN
.vs/ExportDataToFile/v16/.suo

BIN
.vs/ExportDataToFile/v17/.suo

9
ExportDataToFile.sln

@ -1,12 +1,10 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31410.357
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExportDataToFile", "ExportDataToFile.csproj", "{4DC47324-7EF1-449D-99C4-04C49E44D113}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExportDataToFile", "ExportDataToFile.csproj", "{4DC47324-7EF1-449D-99C4-04C49E44D113}"
EndProject EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "ExportProject", "..\ExportProject\ExportProject.vdproj", "{77BEA279-337F-40B2-A6D5-C57E2C30F640}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -17,9 +15,6 @@ Global
{4DC47324-7EF1-449D-99C4-04C49E44D113}.Debug|Any CPU.Build.0 = Debug|Any CPU {4DC47324-7EF1-449D-99C4-04C49E44D113}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DC47324-7EF1-449D-99C4-04C49E44D113}.Release|Any CPU.ActiveCfg = Release|Any CPU {4DC47324-7EF1-449D-99C4-04C49E44D113}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DC47324-7EF1-449D-99C4-04C49E44D113}.Release|Any CPU.Build.0 = Release|Any CPU {4DC47324-7EF1-449D-99C4-04C49E44D113}.Release|Any CPU.Build.0 = Release|Any CPU
{77BEA279-337F-40B2-A6D5-C57E2C30F640}.Debug|Any CPU.ActiveCfg = Debug
{77BEA279-337F-40B2-A6D5-C57E2C30F640}.Release|Any CPU.ActiveCfg = Release
{77BEA279-337F-40B2-A6D5-C57E2C30F640}.Release|Any CPU.Build.0 = Release
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

171
Form1.Designer.cs

@ -57,11 +57,6 @@ namespace ExportDataToFile
this.dgvExportList = new System.Windows.Forms.DataGridView(); this.dgvExportList = new System.Windows.Forms.DataGridView();
this.label11 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label();
this.dgvColumnMapping = new System.Windows.Forms.DataGridView(); this.dgvColumnMapping = new System.Windows.Forms.DataGridView();
this.clExpColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.clClean = new System.Windows.Forms.DataGridViewButtonColumn();
this.clSourceColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clTargetColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
this.txtWhere = new System.Windows.Forms.TextBox(); this.txtWhere = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
@ -78,6 +73,19 @@ namespace ExportDataToFile
this.btnImportXML = new System.Windows.Forms.Button(); this.btnImportXML = new System.Windows.Forms.Button();
this.ofPath = new System.Windows.Forms.OpenFileDialog(); this.ofPath = new System.Windows.Forms.OpenFileDialog();
this.btnClean = new System.Windows.Forms.Button(); this.btnClean = new System.Windows.Forms.Button();
this.clExport = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.clCancel = new System.Windows.Forms.DataGridViewButtonColumn();
this.clShow = new System.Windows.Forms.DataGridViewButtonColumn();
this.clSourceTable = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clTargetTable = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clTableDel = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.clWhere = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clMappingData = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clExpColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.clClean = new System.Windows.Forms.DataGridViewButtonColumn();
this.clSourceColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clTargetColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dgvExportList)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvExportList)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dgvColumnMapping)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dgvColumnMapping)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
@ -89,7 +97,7 @@ namespace ExportDataToFile
this.txtTargetID.Name = "txtTargetID"; this.txtTargetID.Name = "txtTargetID";
this.txtTargetID.Size = new System.Drawing.Size(135, 29); this.txtTargetID.Size = new System.Drawing.Size(135, 29);
this.txtTargetID.TabIndex = 11; this.txtTargetID.TabIndex = 11;
this.txtTargetID.Text = "postgres";
this.txtTargetID.Text = "sa";
// //
// label7 // label7
// //
@ -342,9 +350,19 @@ namespace ExportDataToFile
this.dgvExportList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.dgvExportList.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.dgvExportList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvExportList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvExportList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.clExport,
this.clCancel,
this.clShow,
this.clSourceTable,
this.clTargetTable,
this.clTableDel,
this.clWhere,
this.clMappingData});
this.dgvExportList.Location = new System.Drawing.Point(18, 125); this.dgvExportList.Location = new System.Drawing.Point(18, 125);
this.dgvExportList.Name = "dgvExportList"; this.dgvExportList.Name = "dgvExportList";
this.dgvExportList.RowTemplate.Height = 25; this.dgvExportList.RowTemplate.Height = 25;
this.dgvExportList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dgvExportList.Size = new System.Drawing.Size(1204, 920); this.dgvExportList.Size = new System.Drawing.Size(1204, 920);
this.dgvExportList.TabIndex = 17; this.dgvExportList.TabIndex = 17;
this.dgvExportList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvExportList_CellClick); this.dgvExportList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvExportList_CellClick);
@ -378,48 +396,11 @@ namespace ExportDataToFile
this.dgvColumnMapping.Location = new System.Drawing.Point(1228, 183); this.dgvColumnMapping.Location = new System.Drawing.Point(1228, 183);
this.dgvColumnMapping.Name = "dgvColumnMapping"; this.dgvColumnMapping.Name = "dgvColumnMapping";
this.dgvColumnMapping.RowTemplate.Height = 25; this.dgvColumnMapping.RowTemplate.Height = 25;
this.dgvColumnMapping.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dgvColumnMapping.Size = new System.Drawing.Size(556, 342); this.dgvColumnMapping.Size = new System.Drawing.Size(556, 342);
this.dgvColumnMapping.TabIndex = 19; this.dgvColumnMapping.TabIndex = 19;
this.dgvColumnMapping.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvColumnMapping_CellContentClick); this.dgvColumnMapping.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvColumnMapping_CellContentClick);
// //
// clExpColumn
//
this.clExpColumn.HeaderText = "匯出";
this.clExpColumn.Name = "clExpColumn";
this.clExpColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.clExpColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.clExpColumn.Width = 65;
//
// clClean
//
this.clClean.HeaderText = "清除";
this.clClean.Name = "clClean";
this.clClean.Width = 50;
//
// clSourceColumn
//
this.clSourceColumn.DataPropertyName = "COLUMN_NAME";
this.clSourceColumn.HeaderText = "來源欄位";
this.clSourceColumn.Name = "clSourceColumn";
this.clSourceColumn.ReadOnly = true;
this.clSourceColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.clSourceColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.clSourceColumn.Width = 200;
//
// clType
//
this.clType.DataPropertyName = "DATA_TYPE";
this.clType.HeaderText = "型態";
this.clType.Name = "clType";
this.clType.Width = 80;
//
// clTargetColumn
//
this.clTargetColumn.HeaderText = "目標欄位";
this.clTargetColumn.Name = "clTargetColumn";
this.clTargetColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.clTargetColumn.Width = 200;
//
// txtWhere // txtWhere
// //
this.txtWhere.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.txtWhere.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -572,6 +553,100 @@ namespace ExportDataToFile
this.btnClean.UseVisualStyleBackColor = true; this.btnClean.UseVisualStyleBackColor = true;
this.btnClean.Click += new System.EventHandler(this.btnClean_Click); this.btnClean.Click += new System.EventHandler(this.btnClean_Click);
// //
// clExport
//
this.clExport.HeaderText = "匯出";
this.clExport.Name = "clExport";
this.clExport.Width = 70;
//
// clCancel
//
this.clCancel.HeaderText = "清除";
this.clCancel.Name = "clCancel";
this.clCancel.Text = "...";
this.clCancel.UseColumnTextForButtonValue = true;
this.clCancel.Width = 70;
//
// clShow
//
this.clShow.HeaderText = "顯示來源";
this.clShow.Name = "clShow";
this.clShow.Text = "...";
this.clShow.UseColumnTextForButtonValue = true;
//
// clSourceTable
//
this.clSourceTable.DataPropertyName = "TableName";
this.clSourceTable.HeaderText = "來源資料表名稱";
this.clSourceTable.Name = "clSourceTable";
this.clSourceTable.ReadOnly = true;
this.clSourceTable.Width = 200;
//
// clTargetTable
//
this.clTargetTable.HeaderText = "目標資料表名稱";
this.clTargetTable.Name = "clTargetTable";
this.clTargetTable.ReadOnly = true;
this.clTargetTable.Width = 200;
//
// clTableDel
//
this.clTableDel.HeaderText = "清除目標資料表內容";
this.clTableDel.Name = "clTableDel";
this.clTableDel.Width = 200;
//
// clWhere
//
this.clWhere.HeaderText = "過濾條件";
this.clWhere.Name = "clWhere";
this.clWhere.Visible = false;
//
// clMappingData
//
this.clMappingData.HeaderText = "欄位對應";
this.clMappingData.Name = "clMappingData";
this.clMappingData.Visible = false;
//
// clExpColumn
//
this.clExpColumn.HeaderText = "匯出";
this.clExpColumn.Name = "clExpColumn";
this.clExpColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.clExpColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.clExpColumn.Width = 65;
//
// clClean
//
this.clClean.HeaderText = "清除";
this.clClean.Name = "clClean";
this.clClean.Text = "...";
this.clClean.UseColumnTextForButtonValue = true;
this.clClean.Width = 50;
//
// clSourceColumn
//
this.clSourceColumn.DataPropertyName = "COLUMN_NAME";
this.clSourceColumn.HeaderText = "來源欄位";
this.clSourceColumn.Name = "clSourceColumn";
this.clSourceColumn.ReadOnly = true;
this.clSourceColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.clSourceColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.clSourceColumn.Width = 200;
//
// clType
//
this.clType.DataPropertyName = "DATA_TYPE";
this.clType.HeaderText = "型態";
this.clType.Name = "clType";
this.clType.Width = 80;
//
// clTargetColumn
//
this.clTargetColumn.HeaderText = "目標欄位";
this.clTargetColumn.Name = "clTargetColumn";
this.clTargetColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.clTargetColumn.Width = 200;
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 20F); this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 20F);
@ -680,6 +755,14 @@ namespace ExportDataToFile
private System.Windows.Forms.Button btnImportXML; private System.Windows.Forms.Button btnImportXML;
private System.Windows.Forms.OpenFileDialog ofPath; private System.Windows.Forms.OpenFileDialog ofPath;
private System.Windows.Forms.Button btnClean; private System.Windows.Forms.Button btnClean;
private System.Windows.Forms.DataGridViewCheckBoxColumn clExport;
private System.Windows.Forms.DataGridViewButtonColumn clCancel;
private System.Windows.Forms.DataGridViewButtonColumn clShow;
private System.Windows.Forms.DataGridViewTextBoxColumn clSourceTable;
private System.Windows.Forms.DataGridViewTextBoxColumn clTargetTable;
private System.Windows.Forms.DataGridViewCheckBoxColumn clTableDel;
private System.Windows.Forms.DataGridViewTextBoxColumn clWhere;
private System.Windows.Forms.DataGridViewTextBoxColumn clMappingData;
private System.Windows.Forms.DataGridViewCheckBoxColumn clExpColumn; private System.Windows.Forms.DataGridViewCheckBoxColumn clExpColumn;
private System.Windows.Forms.DataGridViewButtonColumn clClean; private System.Windows.Forms.DataGridViewButtonColumn clClean;
private System.Windows.Forms.DataGridViewTextBoxColumn clSourceColumn; private System.Windows.Forms.DataGridViewTextBoxColumn clSourceColumn;

127
Form1.cs

@ -46,7 +46,6 @@ namespace ExportDataToFile
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
ResetDataGridView();
} }
@ -601,9 +600,8 @@ namespace ExportDataToFile
txtTargetPWD.Text = ""; txtTargetPWD.Text = "";
cbTargetTable.SelectedIndex = -1; cbTargetTable.SelectedIndex = -1;
cbTargetTable.Enabled = false; cbTargetTable.Enabled = false;
dgvExportList.DataSource = null;
dgvColumnMapping.DataSource = null;
ResetDataGridView(); //重建DataGridView欄位
CleanRows(dgvExportList);
CleanRows(dgvColumnMapping);
sqlMSSourceConn = null; sqlMSSourceConn = null;
sqlMSTargetConn = null; sqlMSTargetConn = null;
@ -949,7 +947,6 @@ namespace ExportDataToFile
return "[" + strSourceCol + "] AS " + strTargetCol; return "[" + strSourceCol + "] AS " + strTargetCol;
case "DATETIME": case "DATETIME":
return "Convert(varchar,[" + strSourceCol + "],21) AS " + strTargetCol; return "Convert(varchar,[" + strSourceCol + "],21) AS " + strTargetCol;
//return "[" + strSourceCol + "] AS " + strTargetCol;
default: default:
return "[" + strSourceCol + "] AS " + strTargetCol; return "[" + strSourceCol + "] AS " + strTargetCol;
} }
@ -964,13 +961,13 @@ namespace ExportDataToFile
switch (strType.ToUpper()) switch (strType.ToUpper())
{ {
case "STRING": case "STRING":
return "'" + strData.ToString().Trim() + "'";
return "'" + strData.ToString().Replace("'","''") + "'";
case "INT32": case "INT32":
return strData.ToString().Trim(); return strData.ToString().Trim();
case "DECIMAL": case "DECIMAL":
return strData.ToString().Trim(); return strData.ToString().Trim();
default: default:
return "'" + strData.ToString().Trim() + "'";
return "'" + strData.ToString().Replace("'", "''").Trim() + "'";
} }
} }
@ -1652,13 +1649,13 @@ namespace ExportDataToFile
switch (strType.ToUpper()) switch (strType.ToUpper())
{ {
case "STRING": case "STRING":
return "'" + strData.ToString().Trim() + "'";
return "'" + strData.ToString().Replace("'", "''") + "'";
case "INT32": case "INT32":
return strData.ToString().Trim(); return strData.ToString().Trim();
case "DECIMAL": case "DECIMAL":
return strData.ToString().Trim(); return strData.ToString().Trim();
default: default:
return "'" + strData.ToString().Trim() + "'";
return "'" + strData.ToString().Replace("'", "''") + "'";
} }
} }
#endregion //End of MySQL #endregion //End of MySQL
@ -1999,11 +1996,11 @@ namespace ExportDataToFile
switch (strType.ToUpper()) switch (strType.ToUpper())
{ {
case "SYSTEM.STRING": case "SYSTEM.STRING":
return "'" + strData.ToString().Trim() + "'";
return "'" + strData.ToString().Replace("'","''") + "'";
case "SYSTEM.DECIMAL": case "SYSTEM.DECIMAL":
return strData.ToString().Trim(); return strData.ToString().Trim();
default: default:
return "'" + strData.ToString().Trim() + "'";
return "'" + strData.ToString().Replace("'", "''") + "'";
} }
} }
@ -2368,7 +2365,7 @@ namespace ExportDataToFile
senderGrid.Rows[intRowIndex].Cells["clTableDel"].Value = false; senderGrid.Rows[intRowIndex].Cells["clTableDel"].Value = false;
senderGrid.Rows[intRowIndex].Cells["clWhere"].Value = ""; senderGrid.Rows[intRowIndex].Cells["clWhere"].Value = "";
senderGrid.Rows[intRowIndex].Cells["clMappingData"].Value = ""; senderGrid.Rows[intRowIndex].Cells["clMappingData"].Value = "";
CleanMappingRow(senderGrid, intRowIndex);
//CleanRows(senderGrid, intRowIndex);
txtWhere.Text = ""; txtWhere.Text = "";
Application.DoEvents(); Application.DoEvents();
} }
@ -2411,11 +2408,16 @@ namespace ExportDataToFile
} }
} }
private void CleanMappingRow(DataGridView senderGrid,int intRowIndex)
private void CleanRows(DataGridView senderGrid)
{ {
DataTable CleanTable = (DataTable)dgvColumnMapping.DataSource;
CleanTable.Rows.Clear();
dgvColumnMapping.DataSource = CleanTable;
if (senderGrid.DataSource != null)
{
DataTable CleanTable = (DataTable)senderGrid.DataSource;
CleanTable.Rows.Clear();
senderGrid.DataSource = CleanTable;
CleanTable.Dispose();
}
} }
private void EnableExport() private void EnableExport()
@ -2581,99 +2583,6 @@ namespace ExportDataToFile
} }
} }
private void ResetDataGridView()
{
#region dgvExportList
dgvExportList.Columns.Clear();
//匯出
DataGridViewCheckBoxColumn clExport = new DataGridViewCheckBoxColumn();
clExport.HeaderText = "匯出";
clExport.Name = "clExport";
clExport.Width = 50;
//清除
DataGridViewButtonColumn clCancel = new DataGridViewButtonColumn();
clCancel.HeaderText = "清除";
clCancel.Name = "clCancel";
clCancel.Width = 50;
//顯示來源
DataGridViewButtonColumn clShow = new DataGridViewButtonColumn();
clShow.HeaderText = "顯示來源";
clShow.Name = "clShow";
//來源資料表名稱
DataGridViewTextBoxColumn clSourceTable = new DataGridViewTextBoxColumn();
clSourceTable.HeaderText = "來源資料表名稱";
clSourceTable.Name = "clSourceTable";
clSourceTable.DataPropertyName = "TableName";
clSourceTable.Width = 200;
//目標資料表名稱
DataGridViewTextBoxColumn clTargetTable = new DataGridViewTextBoxColumn();
clTargetTable.HeaderText = "目標資料表名稱";
clTargetTable.Name = "clTargetTable";
clTargetTable.Width = 200;
//清除目標資料表內容
DataGridViewCheckBoxColumn clTableDel = new DataGridViewCheckBoxColumn();
clTableDel.HeaderText = "清除目標資料表內容";
clTableDel.Name = "clTableDel";
clTableDel.Width = 200;
//過濾條件
DataGridViewTextBoxColumn clWhere = new DataGridViewTextBoxColumn();
clWhere.HeaderText = "過濾條件";
clWhere.Name = "clWhere";
clWhere.Visible = false;
//欄位對應
DataGridViewTextBoxColumn clMappingData = new DataGridViewTextBoxColumn();
clMappingData.HeaderText = "欄位對應";
clMappingData.Name = "clMappingData";
clMappingData.Visible = false;
dgvExportList.Columns.Add(clExport);
dgvExportList.Columns.Add(clCancel);
dgvExportList.Columns.Add(clShow);
dgvExportList.Columns.Add(clSourceTable);
dgvExportList.Columns.Add(clTargetTable);
dgvExportList.Columns.Add(clTableDel);
dgvExportList.Columns.Add(clWhere);
dgvExportList.Columns.Add(clMappingData);
#endregion
#region dgvColumnMapping
//匯出
dgvColumnMapping.Columns.Clear();
DataGridViewCheckBoxColumn clExpColumn = new DataGridViewCheckBoxColumn();
clExpColumn.HeaderText = "匯出";
clExpColumn.Name = "clExpColumn";
clExpColumn.Width = 50;
//清除
DataGridViewButtonColumn clClean = new DataGridViewButtonColumn();
clClean.HeaderText = "清除";
clClean.Name = "clClean";
clClean.Width = 50;
//來源欄位
DataGridViewTextBoxColumn clSourceColumn = new DataGridViewTextBoxColumn();
clSourceColumn.HeaderText = "來源欄位";
clSourceColumn.Name = "clSourceColumn";
clSourceColumn.DataPropertyName = "COLUMN_NAME";
clSourceColumn.Width = 100;
//型態
DataGridViewTextBoxColumn clType = new DataGridViewTextBoxColumn();
clType.HeaderText = "型態";
clType.Name = "clType";
clType.DataPropertyName = "DATA_TYPE";
clType.Width = 100;
//目標欄位
DataGridViewComboBoxColumn clTargetColumn = new DataGridViewComboBoxColumn();
clTargetColumn.HeaderText = "目標欄位";
clTargetColumn.Name = "clTargetColumn";
clTargetColumn.Width = 100;
dgvColumnMapping.Columns.Add(clExpColumn);
dgvColumnMapping.Columns.Add(clClean);
dgvColumnMapping.Columns.Add(clSourceColumn);
dgvColumnMapping.Columns.Add(clType);
dgvColumnMapping.Columns.Add(clTargetColumn);
#endregion
}
#endregion #endregion
} }
} }

24
Form1.resx

@ -117,6 +117,30 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="clExport.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clCancel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clShow.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clSourceTable.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clTargetTable.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clTableDel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clWhere.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clMappingData.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clExpColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="clExpColumn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>

138
Oracle.DataAccess.Common.Configuration.Section.xsd

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:simpleType name="parameterDirection">
<xs:restriction base="xs:string">
<xs:enumeration value="Output"/>
<xs:enumeration value="InputOutput"/>
<xs:enumeration value="ReturnValue"/>
<xs:enumeration value="Implicit"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="customBoolean">
<xs:restriction base="xs:string">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ONSParameters">
<xs:restriction base="xs:string">
<xs:enumeration value="nodeList"/>
<!--<xs:enumeration value="walletFile"/>
<xs:enumeration value="walletPassword"/>-->
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ONSModeValues">
<xs:restriction base="xs:string">
<xs:enumeration value="local"/>
<xs:enumeration value="remote"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="datatype">
<xs:restriction base="xs:string">
<xs:enumeration value="System.Binary"/>
<xs:enumeration value="System.Boolean"/>
<xs:enumeration value="System.Byte"/>
<xs:enumeration value="System.Byte[]"/>
<xs:enumeration value="System.Char"/>
<xs:enumeration value="System.DateTime"/>
<xs:enumeration value="System.DateTimeOffset"/>
<xs:enumeration value="System.Decimal"/>
<xs:enumeration value="System.Double"/>
<xs:enumeration value="System.Guid"/>
<xs:enumeration value="System.Int16"/>
<xs:enumeration value="System.Int32"/>
<xs:enumeration value="System.Int64"/>
<xs:enumeration value="System.SByte"/>
<xs:enumeration value="System.Single"/>
<xs:enumeration value="System.String"/>
<xs:enumeration value="System.TimeSpan"/>
<xs:enumeration value="System.UInt16"/>
<xs:enumeration value="System.UInt32"/>
<xs:enumeration value="System.UInt64"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="providerType">
<xs:restriction base="xs:string">
<xs:enumeration value="BFile"/>
<xs:enumeration value="BinaryFloat"/>
<xs:enumeration value="BinaryDouble"/>
<xs:enumeration value="Blob"/>
<xs:enumeration value="Byte"/>
<xs:enumeration value="Char"/>
<xs:enumeration value="Clob"/>
<xs:enumeration value="Date"/>
<xs:enumeration value="Decimal"/>
<xs:enumeration value="Double"/>
<xs:enumeration value="Int16"/>
<xs:enumeration value="Int32"/>
<xs:enumeration value="Int64"/>
<xs:enumeration value="IntervalDS"/>
<xs:enumeration value="IntervalYM"/>
<xs:enumeration value="Long"/>
<xs:enumeration value="LongRaw"/>
<xs:enumeration value="NChar"/>
<xs:enumeration value="NClob"/>
<xs:enumeration value="NVarchar2"/>
<xs:enumeration value="Object"/>
<xs:enumeration value="Raw"/>
<xs:enumeration value="Single"/>
<xs:enumeration value="TimeStamp"/>
<xs:enumeration value="TimeStampLTZ"/>
<xs:enumeration value="TimeStampTZ"/>
<xs:enumeration value="Varchar2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="nativeDataType">
<xs:restriction base="xs:string">
<xs:enumeration value="BFile"/>
<xs:enumeration value="Binary_Float"/>
<xs:enumeration value="Binary_Double"/>
<xs:enumeration value="Blob"/>
<xs:enumeration value="Char"/>
<xs:enumeration value="Clob"/>
<xs:enumeration value="Date"/>
<xs:enumeration value="Number"/>
<xs:enumeration value="Interval Day To Second"/>
<xs:enumeration value="Interval Year To Month"/>
<xs:enumeration value="Long"/>
<xs:enumeration value="Long Raw"/>
<xs:enumeration value="NChar"/>
<xs:enumeration value="NClob"/>
<xs:enumeration value="NVarchar2"/>
<xs:enumeration value="Raw"/>
<xs:enumeration value="Rowid"/>
<xs:enumeration value="Timestamp"/>
<xs:enumeration value="Timestamp With Local Time Zone"/>
<xs:enumeration value="Timestamp With Time Zone"/>
<xs:enumeration value="URowid"/>
<xs:enumeration value="UserDefinedType"/>
<xs:enumeration value="Varchar2"/>
<xs:enumeration value="XmlType"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="providerDBType">
<xs:restriction base="xs:string">
<xs:enumeration value="AnsiString"/>
<xs:enumeration value="AnsiStringFixedLength"/>
<xs:enumeration value="Binary"/>
<xs:enumeration value="Byte"/>
<xs:enumeration value="Date"/>
<xs:enumeration value="DateTime"/>
<xs:enumeration value="DateTimeOffset"/>
<xs:enumeration value="Decimal"/>
<xs:enumeration value="Double"/>
<xs:enumeration value="Int16"/>
<xs:enumeration value="Int32"/>
<xs:enumeration value="Int64"/>
<xs:enumeration value="Object"/>
<xs:enumeration value="Single"/>
<xs:enumeration value="String"/>
<xs:enumeration value="StringFixedLength"/>
<xs:enumeration value="Time"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

221
Oracle.ManagedDataAccess.Client.Configuration.Section.xsd

@ -0,0 +1,221 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="Oracle.DataAccess.Common.Configuration.Section.xsd"/>
<xs:element name="oracle.manageddataaccess.client" >
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="version" type="odpmversiontype" minOccurs="0" />
</xs:choice>
</xs:complexType>
</xs:element>
<xs:complexType name="odpmversiontype">
<xs:complexContent>
<xs:extension base="odpmparameters">
<xs:attribute name="number" type="xs:string" use="required" />
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="odpmparameters">
<xs:all>
<xs:element minOccurs="0" name="settings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="setting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="udtMappings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="udtMapping">
<xs:complexType>
<xs:attribute name="typeName" type="xs:string" use="required" />
<xs:attribute name="factoryName" type="xs:string" use="required" />
<xs:attribute name="dataSource" type="xs:string" use="required" />
<xs:attribute name="schemaName" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="LDAPsettings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="LDAPsetting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="distributedTransaction">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="setting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="dataSources">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="dataSource">
<xs:complexType>
<xs:attribute name="alias" type="xs:string" use="required" />
<xs:attribute name="descriptor" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="connectionPools">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="connectionPool">
<xs:complexType>
<xs:attribute name="connectionString" type="xs:string" use="required" />
<xs:attribute name="poolName" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="edmMappings">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="edmMapping">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="add">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="precision" type="xs:int" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="dataType" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="edmNumberMapping">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="add">
<xs:complexType>
<xs:attribute name="NETType" type="xs:string" use="required" />
<xs:attribute name="MinPrecision" type="xs:int" use="required" />
<xs:attribute name="MaxPrecision" type="xs:int" use="required" />
<xs:attribute name="DBType" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="implicitRefCursor">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="storedProcedure">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="1" name="refCursor">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="bindInfo">
<xs:complexType>
<xs:attribute name="mode" type="parameterDirection" use="required" />
</xs:complexType>
</xs:element>
<xs:element maxOccurs="unbounded" minOccurs="0" name="metadata">
<xs:complexType>
<xs:attribute name="columnOrdinal" type="xs:int" use="required" />
<xs:attribute name="columnName" type="xs:string" use="required" />
<xs:attribute name="baseColumnName" type="xs:string" use="optional" />
<xs:attribute name="baseSchemaName" type="xs:string" use="optional" />
<xs:attribute name="baseTableName" type="xs:string" use="optional" />
<xs:attribute name="providerType" type="providerType" use="optional" />
<xs:attribute name="columnSize" type="xs:int" use="optional" />
<xs:attribute name="numericPrecision" type="xs:int" use="optional" />
<xs:attribute name="numericScale" type="xs:int" use="optional" />
<xs:attribute name="isUnique" type="customBoolean" use="optional" />
<xs:attribute name="isKey" type="customBoolean" use="optional" />
<xs:attribute name="isRowID" type="customBoolean" use="optional" />
<xs:attribute name="dataType" type="datatype" use="optional" />
<xs:attribute name="allowDBNull" type="customBoolean" use="optional" />
<xs:attribute name="isAliased" type="customBoolean" use="optional" />
<xs:attribute name="isByteSemantic" type="customBoolean" use="optional" />
<xs:attribute name="isExpression" type="customBoolean" use="optional" />
<xs:attribute name="isHidden" type="customBoolean" use="optional" />
<xs:attribute name="isReadOnly" type="customBoolean" use="optional" />
<xs:attribute name="isLong" type="customBoolean" use="optional" />
<xs:attribute name="udtTypeName" type="xs:string" use="optional" />
<xs:attribute name="nativeDataType" type="nativeDataType" use="optional" />
<xs:attribute name="providerDBType" type="providerDBType" use="optional" />
<xs:attribute name="objectName" type="xs:string" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="optional" />
<xs:attribute name="position" type="xs:int" use="optional" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="schema" type="xs:string" use="optional" />
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="onsConfig">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="settings">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="2" minOccurs="0" name="setting">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="ons">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="3" minOccurs="1" name="add">
<xs:complexType>
<xs:attribute name="name" type="ONSParameters" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="database" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="configFile" type="xs:string" use="optional" />
<xs:attribute name="mode" type="ONSModeValues" use="required" />
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:schema>
Loading…
Cancel
Save