|
|
@@ -11,30 +11,30 @@ namespace UAS_LabelMachine
|
|
|
public class DataHelper
|
|
|
{
|
|
|
|
|
|
- //深爱地址
|
|
|
- private readonly string ConnectionStrings = "Data Source=172.16.0.22/orcl;User ID=SZSI_TEST;PassWord=select!#%*(";
|
|
|
- //深爱ERP地址
|
|
|
- public static readonly string ERPAddesss = "http://172.16.0.20:8099/ERP/";
|
|
|
- //深爱FTP
|
|
|
- public static readonly string FTPAddress = "ftp://172.16.0.20|vsftpd|shenaftp";
|
|
|
+ ////深爱地址
|
|
|
+ //private readonly string ConnectionStrings = "Data Source=172.16.0.22/orcl;User ID=SZSI_TEST;PassWord=select!#%*(";
|
|
|
|
|
|
- public static readonly string InnerFTPAddress = "ftp://172.16.0.20|vsftpd|shenaftp";
|
|
|
- //Oracle端口
|
|
|
- public static readonly string OraclePort = "1521";
|
|
|
- //需要显示的账套
|
|
|
- public static readonly string Masters = "HC_TEST"; //海创外网地址
|
|
|
+ //private readonly string IPConnectionStrings = "Data Source=172.16.0.22/orcl;User ID=SZSI_TEST;PassWord=select!#%*(";
|
|
|
+ ////深爱ERP地址
|
|
|
+ //public static readonly string ERPAddesss = "http://172.16.0.20:8099/ERP/";
|
|
|
+ ////深爱FTP
|
|
|
+ //public static readonly string FTPAddress = "ftp://172.16.0.20|vsftpd|shenaftp";
|
|
|
|
|
|
- //private readonly string ConnectionStrings = "Data Source=cmityj.gicp.net/orcl;User ID=HC_TEST;PassWord=select!#%*(";
|
|
|
- ////海创ERP地址
|
|
|
- //public static readonly string ERPAddesss = "http://cmityj.gicp.net:8099/ERP/";
|
|
|
- ////海创FTP
|
|
|
- //public static readonly string FTPAddress = "ftp://cmityj.gicp.net|HCFTP|Admin1@#";
|
|
|
-
|
|
|
- //public static readonly string InnerFTPAddress = "ftp://192.168.1.8|HCFTP|Admin1@#";
|
|
|
+ //public static readonly string InnerFTPAddress = "ftp://172.16.0.20|vsftpd|shenaftp";
|
|
|
////Oracle端口
|
|
|
//public static readonly string OraclePort = "1521";
|
|
|
- ////需要显示的账套
|
|
|
- //public static readonly string Masters = "HC_TEST";
|
|
|
+
|
|
|
+ private readonly string ConnectionStrings = "Data Source=cmityj.gicp.net/orcl;User ID=HC_TEST;PassWord=select!#%*(";
|
|
|
+
|
|
|
+ private readonly string IPConnectionStrings = "Data Source=183.237.197.78/orcl;User ID=HC_TEST;PassWord=select!#%*(";
|
|
|
+ //海创ERP地址
|
|
|
+ public static readonly string ERPAddesss = "http://cmityj.gicp.net:8099/ERP/";
|
|
|
+ //海创FTP
|
|
|
+ public static readonly string FTPAddress = "ftp://cmityj.gicp.net|HCFTP|Admin1@#";
|
|
|
+
|
|
|
+ public static readonly string InnerFTPAddress = "ftp://192.168.1.8|HCFTP|Admin1@#";
|
|
|
+ //Oracle端口
|
|
|
+ public static readonly string OraclePort = "1521";
|
|
|
|
|
|
////凯而高地址
|
|
|
//private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=KRG_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=112.25.154.186)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
@@ -45,20 +45,6 @@ namespace UAS_LabelMachine
|
|
|
//public static readonly string InnerFTPAddress = "ftp://112.25.154.186:21|HCFTP|Admin1@#";
|
|
|
////Oracle端口
|
|
|
//public static readonly string OraclePort = "1521";
|
|
|
- ////需要显示的账套
|
|
|
- //public static readonly string Masters = "GOLDEN";
|
|
|
-
|
|
|
- ////凯而高
|
|
|
- //private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=KRG_TEST;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.100.12)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
- ////凯而高ERP地址
|
|
|
- //public static readonly string ERPAddesss = "http://192.168.100.11:8099/ERP/";
|
|
|
- ////凯而高FTP
|
|
|
- //public static readonly string InnerFTPAddress = "ftp://192.168.100.11:21|KEGFTP|Admin1@#";
|
|
|
- //public static readonly string FTPAddress = "ftp://192.168.100.11:21|KEGFTP|Admin1@#";
|
|
|
- ////Oracle端口
|
|
|
- //public static readonly string OraclePort = "1521";
|
|
|
- ////需要显示的账套
|
|
|
- //public static readonly string Masters = "GOLDEN";
|
|
|
|
|
|
////高登地址
|
|
|
//private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=183.238.39.179)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
@@ -69,8 +55,6 @@ namespace UAS_LabelMachine
|
|
|
//public static readonly string FTPAddress = "ftp://183.238.39.179:21|GOLDENMES|Admin1@#";
|
|
|
////Oracle端口
|
|
|
//public static readonly string OraclePort = "1521";
|
|
|
- ////需要显示的账套
|
|
|
- //public static readonly string Masters = "GOLDEN";
|
|
|
|
|
|
////怡海能达外网地址
|
|
|
//private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sz.hi-mantech.com)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
@@ -80,8 +64,6 @@ namespace UAS_LabelMachine
|
|
|
//public static readonly string FTPAddress = "ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8";
|
|
|
////Oracle端口
|
|
|
//public static readonly string OraclePort = "1521";
|
|
|
- ////需要显示的账套
|
|
|
- //public static readonly string Masters = "YHND_SZ,YHND_HK,DATACENTER";
|
|
|
|
|
|
////华商龙外网地址
|
|
|
//private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=YITOA_DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.18.115.198)(PORT=1523)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
|
|
|
@@ -91,19 +73,7 @@ namespace UAS_LabelMachine
|
|
|
//public static readonly string FTPAddress = "ftp://218.18.115.198:21|Print|Administrator1@#";
|
|
|
////Oracle端口
|
|
|
//public static readonly string OraclePort = "1523";
|
|
|
- ////需要显示的账套
|
|
|
- //public static readonly string Masters = "XSQ,N_YITOA_YWC,ZXN,N_YITOA_LHCT,N_YITOA_CT,N_CHL,N_YITOA_HK,N_HUASL_SHTL,N_WILICHK,N_WILIC,N_E_SHINE_SH,N_SHBJ,N_BJKG,N_HUASL,N_HUASL_QD,N_HUASL_XM,N_HUASL_SZ";
|
|
|
|
|
|
- ////UAS测试地址
|
|
|
- //private readonly string ConnectionStrings = "Data Source=192.168.253.6/orcl;User ID=UAS_TEST;PassWord=select!#%*(";
|
|
|
- ////UAS测试地址
|
|
|
- //public static readonly string ERPAddesss = "http://192.168.253.6/uas_test/";
|
|
|
- ////UAS测试FTP
|
|
|
- //public static readonly string FTPAddress = "ftp://192.168.253.9/PrintFile|mesconfig|Administrator1@#";
|
|
|
- ////Oracle端口
|
|
|
- //public static readonly string OraclePort = "1521";
|
|
|
- ////需要显示的账套
|
|
|
- //public static readonly string Masters = "UAS_TEST";
|
|
|
public static string DBConnectionString;
|
|
|
static OracleConnection connection = null;
|
|
|
static OracleCommand command = null;
|
|
|
@@ -130,7 +100,10 @@ namespace UAS_LabelMachine
|
|
|
}
|
|
|
connection.Open();
|
|
|
}
|
|
|
- catch (Exception e) { LogManager.DoLog(e.Message); }
|
|
|
+ catch (Exception e) {
|
|
|
+ connection = new OracleConnection(IPConnectionStrings);
|
|
|
+ connection.Open();
|
|
|
+ LogManager.DoLog(e.Message); }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -851,7 +824,7 @@ namespace UAS_LabelMachine
|
|
|
{
|
|
|
object result = null;
|
|
|
command = new OracleCommand(SQL, connection);
|
|
|
- Console.WriteLine(SQL);
|
|
|
+ //Console.WriteLine(SQL);
|
|
|
//用来拼接参数的
|
|
|
if (names.Length > 0)
|
|
|
{
|