DbLgEjgz.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using CoreFS.CA06;
  6. using System.Data;
  7. using System.Collections;
  8. using Core.Mes.Client.Common;
  9. namespace Core.LgMes.Client.lgDbMgt
  10. {
  11. /// <summary>
  12. /// 2.5级数据库调用
  13. /// </summary>
  14. class DbLgEjgz : IDbCommand
  15. {
  16. public DataSet ExecuteReader(DbClientParam param)
  17. {
  18. DataSet ds = new DataSet();
  19. try
  20. {
  21. CoreFS.CA06.FrmBase fr = new FrmBase();
  22. fr.ob = param.ob;
  23. DataTable dt = new DataTable();
  24. CoreClientParam Ccp_Query = CoreClientParamMgt.ReturnCoreClientParamForQuery(param.sqlStr, dt);
  25. fr.ExecuteQueryToDataTable(Ccp_Query, CoreInvokeType.Internal);
  26. ds.Tables.Add(dt);
  27. }
  28. catch
  29. {
  30. }
  31. return ds;
  32. }
  33. public string ExecuteNonQuery(DbClientParam param)
  34. {
  35. string strErr = "";
  36. try
  37. {
  38. CoreFS.CA06.FrmBase fr = new FrmBase();
  39. fr.ob = param.ob;
  40. CoreClientParam ccp_Exe = CoreClientParamMgt.ReturnCoreClientParamForExecuteNoQuery(param.sqlStr);
  41. try
  42. {
  43. fr.ExecuteNonQuery(ccp_Exe, CoreInvokeType.Internal);
  44. }
  45. catch
  46. {
  47. }
  48. strErr = ccp_Exe.ReturnInfo.ToString();
  49. return ccp_Exe.ReturnInfo.ToString();
  50. }
  51. catch
  52. {
  53. }
  54. return strErr;
  55. }
  56. }
  57. }