ToleranceNk.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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.Plan.Order
  9. {
  10. class ToleranceNk : FrmBase
  11. {
  12. /// <summary>
  13. /// 外径
  14. /// </summary>
  15. private double outdiameter;
  16. /// <summary>
  17. /// 外径(mm)
  18. /// </summary>
  19. public double Outdiameter
  20. {
  21. get { return outdiameter; }
  22. set { outdiameter = value; }
  23. }
  24. /// <summary>
  25. /// 壁厚
  26. /// </summary>
  27. private double wallthick;
  28. /// <summary>
  29. /// 壁厚(mm)
  30. /// </summary>
  31. public double Wallthick
  32. {
  33. get { return wallthick; }
  34. set { wallthick = value; }
  35. }
  36. /// <summary>
  37. /// 长度上限
  38. /// </summary>
  39. private double lengthmax;
  40. /// <summary>
  41. /// 长度上限(m)
  42. /// </summary>
  43. public double Lengthmax
  44. {
  45. get { return lengthmax; }
  46. set { lengthmax = value; }
  47. }
  48. /// <summary>
  49. /// 长度下限
  50. /// </summary>
  51. private double lengthmin;
  52. /// <summary>
  53. /// 长度下限(m)
  54. /// </summary>
  55. public double Lengthmin
  56. {
  57. get { return lengthmin; }
  58. set { lengthmin = value; }
  59. }
  60. /// <summary>
  61. /// 公差标准索引
  62. /// </summary>
  63. private string sic;
  64. /// <summary>
  65. /// 公差标准索引
  66. /// </summary>
  67. public string Sic
  68. {
  69. get { return sic; }
  70. set { sic = value; }
  71. }
  72. /// <summary>
  73. /// 公差项代码
  74. /// </summary>
  75. private string baseCode;
  76. /// <summary>
  77. /// 公差项代码
  78. /// </summary>
  79. public string BaseCode
  80. {
  81. get { return baseCode; }
  82. set { baseCode = value; }
  83. }
  84. /// <summary>
  85. /// 公差下限
  86. /// </summary>
  87. private double lower;
  88. /// <summary>
  89. /// 公差下限
  90. /// </summary>
  91. public double Lower
  92. {
  93. get { return lower; }
  94. set { lower = value; }
  95. }
  96. /// <summary>
  97. /// 公差上限
  98. /// </summary>
  99. private double upper;
  100. /// <summary>
  101. /// 公差上限
  102. /// </summary>
  103. public double Upper
  104. {
  105. get { return upper; }
  106. set { upper = value; }
  107. }
  108. public ToleranceNk(OpeBase openBase)
  109. {
  110. this.ob = openBase;
  111. outdiameter = 0;
  112. wallthick = 0;
  113. lengthmin = 0;
  114. lengthmax = 0;
  115. sic = "";
  116. baseCode = "";
  117. upper = 0;
  118. lower = 0;
  119. }
  120. /// <summary>
  121. /// 查询内控公差
  122. /// </summary>
  123. public void getToleranceOfNk()
  124. {
  125. ArrayList param = new ArrayList();
  126. param.Add(outdiameter);
  127. param.Add(wallthick);
  128. param.Add(sic);
  129. param.Add(lengthmin);
  130. param.Add(lengthmax);
  131. param.Add(baseCode);
  132. CoreClientParam ccp = new CoreClientParam();
  133. ccp.ServerName = "com.steering.pss.plan.order.baseMethod.CoreToleranceNk";
  134. ccp.MethodName = "getTolerOfNk";
  135. ccp.ServerParams = new object[] { param };
  136. ccp = ob.ExecuteSortResultByQueryToDataTable(ccp, CoreInvokeType.Internal);
  137. if (ccp == null || ccp.ReturnObject == null)
  138. {
  139. MessageBox.Show("服务端处理失败!");
  140. return;
  141. }
  142. ArrayList result = (ArrayList)ccp.ReturnObject;
  143. lower = (double)result[0];
  144. upper = (double)result[1];
  145. }
  146. }
  147. }