OrderStdSic.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using CoreFS.CA06;
  6. using System.Collections;
  7. using System.Windows.Forms;
  8. namespace Core.StlMes.Client.PlnSaleOrd.BaseMethod
  9. {
  10. class OrderStdSic
  11. {
  12. private OpeBase opeBase = null;
  13. /// <summary>
  14. /// 质量设计
  15. /// </summary>
  16. private string desginKey;
  17. /// <summary>
  18. /// 标准下限
  19. /// </summary>
  20. private double stdMin;
  21. /// <summary>
  22. /// 标准上限
  23. /// </summary>
  24. private double stdMax;
  25. /// <summary>
  26. /// 外径
  27. /// </summary>
  28. private double outdiameter;
  29. /// <summary>
  30. /// 壁厚
  31. /// </summary>
  32. private double wallthick;
  33. /// <summary>s
  34. /// 控制壁厚
  35. /// </summary>
  36. private double aimWallthick;
  37. public OrderStdSic(OpeBase openBase)
  38. {
  39. desginKey = "";
  40. stdMin = 0;
  41. stdMax = 0;
  42. opeBase = openBase;
  43. }
  44. /// <summary>
  45. /// 获取公差上下限
  46. /// </summary>
  47. public void getStdTolerance()
  48. {
  49. ArrayList result = null;
  50. CoreClientParam ccp = new CoreClientParam();
  51. ccp.ServerName = "com.steering.pss.plnsaleord.order.baseMethod.CoreOrderStdSic";
  52. ccp.MethodName = "getStdTolerance";
  53. ccp.ServerParams = new object[] { desginKey, outdiameter, wallthick };
  54. ccp = opeBase.ExecuteSortResultByQueryToDataTable(ccp, CoreInvokeType.Internal);
  55. if (ccp == null || ccp.ReturnObject == null)
  56. {
  57. MessageBox.Show("服务端处理失败!");
  58. return;
  59. }
  60. result = (ArrayList)ccp.ReturnObject;
  61. stdMax = (double)result[0];
  62. stdMin = (double)result[1];
  63. aimWallthick = ((wallthick + stdMin) + (wallthick + stdMax)) / 2;
  64. }
  65. /// <summary>
  66. /// 质量设计
  67. /// </summary>
  68. public string DesginKey
  69. {
  70. get { return desginKey; }
  71. set { desginKey = value; }
  72. }
  73. /// <summary>
  74. /// 标准下限
  75. /// </summary>
  76. public double StdMin
  77. {
  78. get { return stdMin; }
  79. set { stdMin = value; }
  80. }
  81. /// <summary>
  82. /// 标准上限
  83. /// </summary>
  84. public double StdMax
  85. {
  86. get { return stdMax; }
  87. set { stdMax = value; }
  88. }
  89. /// <summary>
  90. /// 外径
  91. /// </summary>
  92. public double Outdiameter
  93. {
  94. get { return outdiameter; }
  95. set { outdiameter = value; }
  96. }
  97. /// <summary>
  98. /// 壁厚
  99. /// </summary>
  100. public double Wallthick
  101. {
  102. get { return wallthick; }
  103. set { wallthick = value; }
  104. }
  105. /// <summary>
  106. /// 控制壁厚
  107. /// </summary>
  108. public double AimWallthick
  109. {
  110. get { return aimWallthick; }
  111. set { aimWallthick = value; }
  112. }
  113. }
  114. }