ToleranceNk.cs 4.6 KB

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