锐腾搅拌上料功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
4.5 KiB

5 months ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using ICSSoft.Frame.Data.Entity;
  6. using ICSSoft.Frame.Data.DAL;
  7. using System.Data;
  8. namespace ICSSoft.Frame.Data.BLL
  9. {
  10. public class ICSOPBLL
  11. {
  12. #region 新增和修改
  13. public static void Add(FormICSOPUIModel tbInfo, string dsconn)
  14. {
  15. try
  16. {
  17. if (string.IsNullOrWhiteSpace(dsconn))
  18. {
  19. throw new Exception("数据库连接字符串错误");
  20. }
  21. List<FormICSOPUIModel> tbInfoList = new List<FormICSOPUIModel>() { tbInfo };
  22. ICSOPDAL.Add(tbInfoList, dsconn);
  23. }
  24. catch (Exception ex)
  25. {
  26. throw ex;
  27. }
  28. }
  29. #endregion
  30. #region 工序代码是否存在
  31. public static bool IsIncluding(string opCODE, string dsconn)
  32. {
  33. try
  34. {
  35. return ICSOPDAL.IsIncluding(opCODE, dsconn);
  36. }
  37. catch (Exception ex)
  38. {
  39. throw ex;
  40. }
  41. }
  42. #endregion
  43. #region 查询工序信息
  44. public static FormICSOPUIModel SearchOPInfo(string opcode, string dsconn)
  45. {
  46. try
  47. {
  48. List<FormICSOPUIModel> returnlist = ICSOPDAL.SearchOPInfo(opcode, dsconn);
  49. return returnlist[0];
  50. }
  51. catch (Exception ex)
  52. {
  53. throw ex;
  54. }
  55. }
  56. #endregion
  57. #region 删除
  58. public static void deleteInfo(List<string> codeList, string dsconn)
  59. {
  60. try
  61. {
  62. ICSOPDAL.deleteInfo(codeList, dsconn);
  63. }
  64. catch (Exception ex)
  65. {
  66. throw ex;
  67. }
  68. }
  69. #endregion
  70. #region 判断是否在工序和资源的关系中
  71. public static bool Including2RES(List<string> idList, string dsconn)
  72. {
  73. try
  74. {
  75. return ICSOPDAL.Including2RES(idList, dsconn);
  76. }
  77. catch (Exception ex)
  78. {
  79. throw ex;
  80. }
  81. }
  82. #endregion
  83. #region 判断是否在途程和工序的关系中
  84. public static bool IncludingROUTE2OP(List<string> idList, string dsconn)
  85. {
  86. try
  87. {
  88. return ICSOPDAL.IncludingROUTE2OP(idList, dsconn);
  89. }
  90. catch (Exception ex)
  91. {
  92. throw ex;
  93. }
  94. }
  95. public static List<ICSROUTE2OP> GetROUTE2OP(List<string> idList,string wp, string dsconn)
  96. {
  97. return ICSOPDAL.GetROUTE2OP(idList,wp, dsconn);
  98. }
  99. public static DataTable GetITEMROUTE2OP(List<string> idList, string wp, string dsconn)
  100. {
  101. return ICSOPDAL.GetITEMROUTE2OP(idList, wp, dsconn);
  102. }
  103. #endregion
  104. #region 新增和修改List
  105. public static void AddList(List<FormICSOPUIModel> tbInfoList, string dsconn)
  106. {
  107. try
  108. {
  109. if (string.IsNullOrWhiteSpace(dsconn))
  110. {
  111. throw new Exception("数据库连接字符串错误");
  112. }
  113. ICSOPDAL.Add(tbInfoList, dsconn);
  114. }
  115. catch (Exception ex)
  116. {
  117. throw ex;
  118. }
  119. }
  120. #endregion
  121. #region 获取成本中心
  122. public static DataTable SearchDataByEnumKey(string dsconn, string EnumKey)
  123. {
  124. try
  125. {
  126. return ICSOPDAL.SearchDataByEnumKey(dsconn, EnumKey);
  127. }
  128. catch (Exception ex)
  129. {
  130. throw ex;
  131. }
  132. }
  133. public static DataTable SearchDataByEnumText(string dsconn, string EnumKey, string EnumText)
  134. {
  135. try
  136. {
  137. return ICSOPDAL.SearchDataByEnumText(dsconn, EnumKey, EnumText);
  138. }
  139. catch (Exception ex)
  140. {
  141. throw ex;
  142. }
  143. }
  144. public static DataTable SearchDataByEnumValue(string dsconn, string EnumKey, string EnumValue)
  145. {
  146. try
  147. {
  148. return ICSOPDAL.SearchDataByEnumValue(dsconn, EnumKey, EnumValue);
  149. }
  150. catch (Exception ex)
  151. {
  152. throw ex;
  153. }
  154. }
  155. #endregion
  156. }
  157. }