|
@@ -16,7 +16,7 @@ namespace MySystem
|
|
|
bool op = true;
|
|
bool op = true;
|
|
|
OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["Pxc1SqlConnStr"].ToString();
|
|
OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["Pxc1SqlConnStr"].ToString();
|
|
|
string result = "success";
|
|
string result = "success";
|
|
|
- int startId = TendisDbconn.Instance.Get<int>("Start" + table + "Id");
|
|
|
|
|
|
|
+ int startId = 0; //TendisDbconn.Instance.Get<int>("Start" + table + "Id");
|
|
|
// int total = 0;
|
|
// int total = 0;
|
|
|
while (op)
|
|
while (op)
|
|
|
{
|
|
{
|
|
@@ -37,14 +37,22 @@ namespace MySystem
|
|
|
{
|
|
{
|
|
|
if (!string.IsNullOrEmpty(dr[dc.ColumnName].ToString()))
|
|
if (!string.IsNullOrEmpty(dr[dc.ColumnName].ToString()))
|
|
|
{
|
|
{
|
|
|
- fields += dc.ColumnName + ",";
|
|
|
|
|
if (dc.DataType == typeof(int) || dc.DataType == typeof(decimal) || dc.DataType == typeof(ulong))
|
|
if (dc.DataType == typeof(int) || dc.DataType == typeof(decimal) || dc.DataType == typeof(ulong))
|
|
|
{
|
|
{
|
|
|
fields += dc.ColumnName + "=" + dr[dc.ColumnName].ToString() + ",";
|
|
fields += dc.ColumnName + "=" + dr[dc.ColumnName].ToString() + ",";
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- fields += dc.ColumnName + "='" + dr[dc.ColumnName].ToString() + "',";
|
|
|
|
|
|
|
+ string val = "";
|
|
|
|
|
+ if (dc.DataType == typeof(DateTime))
|
|
|
|
|
+ {
|
|
|
|
|
+ val = DateTime.Parse(dr[dc.ColumnName].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ val = dr[dc.ColumnName].ToString();
|
|
|
|
|
+ }
|
|
|
|
|
+ fields += dc.ColumnName + "='" + val + "',";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|