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

150 lines
3.7 KiB

5 months ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. using ICSSoft.Frame.Data.Entity;
  7. using ICSSoft.Frame.Data.DAL;
  8. namespace ICSSoft.Frame.Data.BLL
  9. {
  10. public class ICSForecastBLL
  11. {
  12. #region 新增和修改
  13. public static void Add(ICSForecast Info, DataTable dt,string Version, string dsconn)
  14. {
  15. try
  16. {
  17. if (string.IsNullOrWhiteSpace(dsconn))
  18. {
  19. throw new Exception("数据库连接字符串错误");
  20. }
  21. ICSForecastDAL.Add(Info, dt, Version, dsconn);
  22. }
  23. catch (Exception ex)
  24. {
  25. throw ex;
  26. }
  27. }
  28. #endregion
  29. #region 导入
  30. public static void AddList(DataTable dt, string dsconn)
  31. {
  32. try
  33. {
  34. if (string.IsNullOrWhiteSpace(dsconn))
  35. {
  36. throw new Exception("数据库连接字符串错误");
  37. }
  38. ICSForecastDAL.AddList(dt, dsconn);
  39. }
  40. catch (Exception ex)
  41. {
  42. throw ex;
  43. }
  44. }
  45. #endregion
  46. #region 通过ID查询
  47. public static DataSet SearchInfoByID(string ID, string dsconn)
  48. {
  49. try
  50. {
  51. return ICSForecastDAL.SearchInfoByID(ID, dsconn);
  52. }
  53. catch (Exception ex)
  54. {
  55. throw ex;
  56. }
  57. }
  58. #endregion
  59. #region 删除
  60. public static void deleteInfo(List<string> IDList, string dsconn)
  61. {
  62. try
  63. {
  64. ICSForecastDAL.deleteInfo(IDList, dsconn);
  65. }
  66. catch (Exception ex)
  67. {
  68. throw ex;
  69. }
  70. }
  71. #endregion
  72. #region 审核
  73. public static void Check(List<string> IDList, string dsconn)
  74. {
  75. try
  76. {
  77. ICSForecastDAL.Check(IDList, dsconn);
  78. }
  79. catch (Exception ex)
  80. {
  81. throw ex;
  82. }
  83. }
  84. #endregion
  85. #region 弃审
  86. public static void RefuseCheck(List<string> IDList, string dsconn)
  87. {
  88. try
  89. {
  90. ICSForecastDAL.RefuseCheck(IDList, dsconn);
  91. }
  92. catch (Exception ex)
  93. {
  94. throw ex;
  95. }
  96. }
  97. #endregion
  98. #region 复审
  99. public static void Review(List<string> IDList, string dsconn)
  100. {
  101. try
  102. {
  103. ICSForecastDAL.Review(IDList, dsconn);
  104. }
  105. catch (Exception ex)
  106. {
  107. throw ex;
  108. }
  109. }
  110. #endregion
  111. #region 取消复审
  112. public static void ReviewBack(List<string> IDList, string dsconn)
  113. {
  114. try
  115. {
  116. ICSForecastDAL.ReviewBack(IDList, dsconn);
  117. }
  118. catch (Exception ex)
  119. {
  120. throw ex;
  121. }
  122. }
  123. #endregion
  124. #region 获取物料编码,助记码.客户编码
  125. /// <summary>
  126. /// 查询a.物料(表0) b.客户编码(表1)
  127. /// </summary>
  128. /// <param name="pk_org"></param>
  129. /// <returns></returns>
  130. public static DataSet GetInvInfoAndCust(string pk_org)
  131. {
  132. return ICSForecastDAL.GetInvInfoAndCust(pk_org);
  133. }
  134. #endregion
  135. public static void UploadErp(string ids, string dsconn)
  136. {
  137. ICSForecastDAL.UploadErp(ids, dsconn);
  138. }
  139. }
  140. }