华恒Mes鼎捷代码
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.

138 lines
3.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 ICSMODELOP2CKGROUPBLL
  11. {
  12. public static void Add(FormICSMODELOP2CKGROUPUIModel Info, string dsconn)
  13. {
  14. try
  15. {
  16. if (string.IsNullOrWhiteSpace(dsconn))
  17. {
  18. throw new Exception("请输入......");
  19. }
  20. List<FormICSMODELOP2CKGROUPUIModel> ckgroupInfoList = new List<FormICSMODELOP2CKGROUPUIModel>() { Info };
  21. ICSMODELOP2CKGROUPDAL.AddAndEdit(ckgroupInfoList, dsconn);
  22. }
  23. catch (Exception ex)
  24. {
  25. throw ex;
  26. }
  27. }
  28. #region select
  29. public static FormICSMODELOP2CKGROUPUIModel SearchCkgroupInfoByCode(string ITEMCODE, string OPCODE, string CKGROUP, string dsconn)
  30. {
  31. try
  32. {
  33. List<FormICSMODELOP2CKGROUPUIModel> returnlist = ICSMODELOP2CKGROUPDAL.SearchCkgroupInfoByCode(ITEMCODE,OPCODE,CKGROUP,dsconn);
  34. return returnlist[0];
  35. }
  36. catch (Exception ex)
  37. {
  38. throw ex;
  39. }
  40. }
  41. #endregion
  42. public static DataTable SearchPOInfoList(string str,string dsconn)
  43. {
  44. try
  45. {
  46. DataTable returndt = new DataTable();
  47. returndt.Columns.Add("工序代码", typeof(string));
  48. returndt.Columns.Add("工序", typeof(string));
  49. List<FormICSOPUIModel> returndal = ICSMODELOP2CKGROUPDAL.SearchOPInfoList(str,dsconn);
  50. foreach (FormICSOPUIModel returntype in returndal)
  51. {
  52. DataRow dr = returndt.NewRow();
  53. dr["工序代码"] = returntype.OPCODE;
  54. dr["工序"] = returntype.OPDESC;
  55. returndt.Rows.Add(dr);
  56. }
  57. return returndt;
  58. }
  59. catch (Exception ex)
  60. {
  61. throw ex;
  62. }
  63. }
  64. #region delete
  65. public static void delete(List<String> codeList)
  66. {
  67. ICSMODELOP2CKGROUPDAL.delete(codeList);
  68. }
  69. #endregion
  70. public static DataTable SelectItemId(string str,string wp)
  71. {
  72. try
  73. {
  74. return ICSMODELOP2CKGROUPDAL.SelectItemId(str,wp);
  75. }
  76. catch (Exception ex)
  77. {
  78. throw ex;
  79. }
  80. }
  81. public static DataTable SelectOpId(string str, string wp)
  82. {
  83. try
  84. {
  85. return ICSMODELOP2CKGROUPDAL.SelectOpId(str, wp);
  86. }
  87. catch (Exception ex)
  88. {
  89. throw ex;
  90. }
  91. }
  92. public static DataTable SelectCkgroupId(string str, string wp)
  93. {
  94. try
  95. {
  96. return ICSMODELOP2CKGROUPDAL.SelectCkgroupId(str,wp);
  97. }
  98. catch (Exception ex)
  99. {
  100. throw ex;
  101. }
  102. }
  103. public static bool IsIncludingItemOP(string ITEMCODE,string OPCODE, string dsconn)
  104. {
  105. try
  106. {
  107. return ICSMODELOP2CKGROUPDAL.IsIncludingItemOP(ITEMCODE, OPCODE, dsconn);
  108. }
  109. catch (Exception ex)
  110. {
  111. throw ex;
  112. }
  113. }
  114. }
  115. }