CNAS取数仪器端升级
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.4KB

  1. using CnasSynchronousCommon;
  2. using CnasSynchronusDAL;
  3. using CnasSynchronusIDAL;
  4. using CnasSynchrousModel;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Configuration;
  8. using System.Data;
  9. using System.Linq;
  10. using System.Text;
  11. namespace CnasSynchronusClient
  12. {
  13. /// <summary>
  14. /// CNAS数据库数据操作
  15. /// </summary>
  16. public class CnasDataOperationFact
  17. {
  18. //从Config中获取目标数据库的的类型
  19. private static string strStartWebApi = GlobalCommonOperation.strStartWebApi;
  20. private static string strDataType = GlobalCommonOperation.strTargetDbType;
  21. //private static string strDataType = "DB2";
  22. public static ICnasDataOperation CnasDataOperation()
  23. {
  24. ICnasDataOperation operation;
  25. switch (strDataType.ToUpper())
  26. {
  27. case "MYSQL":
  28. if (strStartWebApi == "1")
  29. operation = new MySQLCNASDataOperationByWeb();
  30. else
  31. operation = new MySQLCNASDataOperation();
  32. break;
  33. case "ORACLE":
  34. operation = new OracleCnasDataOperation();
  35. break;
  36. case "DB2":
  37. default:
  38. operation = new DB2CNASDataOperation();
  39. break;
  40. }
  41. return operation;
  42. }
  43. }
  44. }