锐腾搅拌上料功能
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.

166 lines
4.3 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 ICSECGBLL
  11. {
  12. public static void Add(FormICSECGUIModel Info, string dsconn)
  13. {
  14. try
  15. {
  16. if (string.IsNullOrWhiteSpace(dsconn))
  17. {
  18. throw new Exception("请输入......");
  19. }
  20. List<FormICSECGUIModel> ecgInfoList = new List<FormICSECGUIModel>() { Info };
  21. ICSECGDAL.AddAndEdit(ecgInfoList, dsconn);
  22. }
  23. catch (Exception ex)
  24. {
  25. throw ex;
  26. }
  27. }
  28. #region select
  29. public static FormICSECGUIModel SearchEcgInfoByCode(string id, string dsconn)
  30. {
  31. try
  32. {
  33. List<FormICSECGUIModel> returnlist = ICSECGDAL.SearchEcgInfoById(id, 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 = ICSECGDAL.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. public static DataTable SearchRESInfoList(string str, string dsconn)
  65. {
  66. try
  67. {
  68. DataTable returndt = new DataTable();
  69. returndt.Columns.Add("资源代码", typeof(string));
  70. returndt.Columns.Add("资源描述", typeof(string));
  71. List<FormICSRESUIModel> returndal = ICSECGDAL.SearchRESInfoList(str, dsconn);
  72. foreach (FormICSRESUIModel returntype in returndal)
  73. {
  74. DataRow dr = returndt.NewRow();
  75. dr["资源代码"] = returntype.RESCODE;
  76. dr["资源描述"] = returntype.RESDESC;
  77. returndt.Rows.Add(dr);
  78. }
  79. return returndt;
  80. }
  81. catch (Exception ex)
  82. {
  83. throw ex;
  84. }
  85. }
  86. #region delete
  87. public static void delete(List<String> guidList, List<String> codeList)
  88. {
  89. ICSECGDAL.delete(guidList,codeList);
  90. }
  91. #endregion
  92. // public static DataTable SelectItemId(string str,string wp)
  93. // {
  94. // try
  95. // {
  96. // return ICSMODELOP2CKGROUPDAL.SelectItemId(str,wp);
  97. // }
  98. // catch (Exception ex)
  99. // {
  100. // throw ex;
  101. // }
  102. // }
  103. // public static DataTable SelectOpId(string str, string wp)
  104. // {
  105. // try
  106. // {
  107. // return ICSMODELOP2CKGROUPDAL.SelectOpId(str, wp);
  108. // }
  109. // catch (Exception ex)
  110. // {
  111. // throw ex;
  112. // }
  113. // }
  114. // public static DataTable SelectCkgroupId(string str, string wp)
  115. // {
  116. // try
  117. // {
  118. // return ICSMODELOP2CKGROUPDAL.SelectCkgroupId(str,wp);
  119. // }
  120. // catch (Exception ex)
  121. // {
  122. // throw ex;
  123. // }
  124. //}
  125. // public static bool IsIncludingItemOP(string ITEMCODE,string OPCODE, string dsconn)
  126. // {
  127. // try
  128. // {
  129. // return ICSMODELOP2CKGROUPDAL.IsIncludingItemOP(ITEMCODE, OPCODE, dsconn);
  130. // }
  131. // catch (Exception ex)
  132. // {
  133. // throw ex;
  134. // }
  135. // }
  136. }
  137. }