ComBaseStdRTestBLL.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using Core.Mes.Client.Comm.Format;
  2. using Core.Mes.Client.Comm.Server;
  3. using Core.Mes.Client.Comm.Tool;
  4. using Core.StlMes.Client.Qcm.model;
  5. using CoreFS.CA06;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. namespace Core.StlMes.Client.Qcm.BLL
  9. {
  10. class ComBaseStdRTestBLL
  11. {
  12. private OpeBase _ob;
  13. public ComBaseStdRTestBLL(OpeBase ob)
  14. {
  15. _ob = ob;
  16. }
  17. public List<ComBaseStdRTestEntity> Query(string phyNameMin, string valiflag)
  18. {
  19. return EntityHelper.GetData<ComBaseStdRTestEntity>("com.steering.pss.qcm.DAL.ComBaseStdRTestDAL.Query",
  20. new object[] { phyNameMin, valiflag }, _ob);
  21. }
  22. public void Save(List<ComBaseStdRTestEntity> stdRTestEntitys)
  23. {
  24. List<string> parms = new List<string>();
  25. foreach (ComBaseStdRTestEntity stdRTestEntity in stdRTestEntitys)
  26. {
  27. parms.Add(JSONFormat.Format(stdRTestEntity));
  28. }
  29. ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseStdRTestDAL.Save",
  30. new object[] { parms }, _ob);
  31. }
  32. public void UpdateValidflag(List<ComBaseStdRTestEntity> stdRTestEntitys, string validflag)
  33. {
  34. List<string> parms = new List<string>();
  35. foreach (ComBaseStdRTestEntity stdRTestEntity in stdRTestEntitys)
  36. {
  37. parms.Add(JSONFormat.Format(stdRTestEntity));
  38. }
  39. ServerHelper.SetData("com.steering.pss.qcm.DAL.ComBaseStdRTestDAL.UpdateValidflag",
  40. new object[] { parms, validflag }, _ob);
  41. }
  42. //获取试验标准基础数据
  43. public DataTable GetComBaseStdS()
  44. {
  45. return ServerHelper.GetData("com.steering.pss.qcm.DAL.ComBaseStdRTestDAL.GetComBaseStdS",
  46. new object[] { }, _ob);
  47. }
  48. //获取取样码基础数据
  49. public DataTable GetComBasePhyC()
  50. {
  51. return ServerHelper.GetData("com.steering.pss.qcm.DAL.ComBaseStdRTestDAL.GetComBasePhyC",
  52. new object[] { }, _ob);
  53. }
  54. public int GetRepateCnt(string stdCodeTest, string phyCodeMin, string pk)
  55. {
  56. return int.Parse(ServerHelper.GetData("com.steering.pss.qcm.DAL.ComBaseStdRTestDAL.GetRepateCnt",
  57. new object[] { stdCodeTest, phyCodeMin, pk }, _ob).Rows[0][0].ToString());
  58. }
  59. }
  60. }