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.

CnasDataOperationFact.cs 1.1KB

5 年之前
12345678910111213141516171819202122232425262728293031323334353637383940
  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 strDataType = ConfigurationManager.AppSettings["TargetDBType"].ToString();
  20. //private static string strDataType = "DB2";
  21. public static ICnasDataOperation CnasDataOperation()
  22. {
  23. ICnasDataOperation operation;
  24. switch (strDataType.ToUpper())
  25. {
  26. case "MYSQL":
  27. operation = new MySQLCNASDataOperation();
  28. break;
  29. case "DB2":
  30. default:
  31. operation = new DB2CNASDataOperation();
  32. break;
  33. }
  34. return operation;
  35. }
  36. }
  37. }