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

100 lines
2.6 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 ICSSoft.Base.Config.AppConfig;
  8. using System.Data;
  9. namespace ICSSoft.Frame.Data.BLL
  10. {
  11. public class ICSFACTORYBLL
  12. {
  13. #region 新增和修改
  14. public static void Add(FormICSFactoryUIModel factoryInfo, string dsconn)
  15. {
  16. try
  17. {
  18. if (string.IsNullOrWhiteSpace(dsconn))
  19. {
  20. throw new Exception("数据库连接字符串错误");
  21. }
  22. List<FormICSFactoryUIModel> factoryInfoList = new List<FormICSFactoryUIModel>() { factoryInfo };
  23. ICSFACTORYDAL.Add(factoryInfoList, dsconn);
  24. }
  25. catch (Exception ex)
  26. {
  27. throw ex;
  28. }
  29. }
  30. #endregion
  31. #region 通过工厂代码查询
  32. public static FormICSFactoryUIModel SearchFactoryInfoByCode(string FACCODE, string dsconn)
  33. {
  34. try
  35. {
  36. List<FormICSFactoryUIModel> returnlist = ICSFACTORYDAL.SearchFactoryInfoByCode(FACCODE, dsconn);
  37. return returnlist[0];
  38. }
  39. catch (Exception ex)
  40. {
  41. throw ex;
  42. }
  43. }
  44. #endregion
  45. #region 工厂代码是否存在
  46. public static bool IsIncluding(string FACCODE, string dsconn)
  47. {
  48. try
  49. {
  50. return ICSFACTORYDAL.IsIncluding(FACCODE, dsconn);
  51. }
  52. catch (Exception ex)
  53. {
  54. throw ex;
  55. }
  56. }
  57. #endregion
  58. #region 判断是否在产线中
  59. public static bool isIncludingInSeg(List<string> idList, string dsconn)
  60. {
  61. try
  62. {
  63. return ICSFACTORYDAL.isIncludingInSeg(idList, dsconn);
  64. }
  65. catch (Exception ex)
  66. {
  67. throw ex;
  68. }
  69. }
  70. #endregion
  71. #region 删除
  72. public static void deleteInfo(List<string> codeList, string dsconn)
  73. {
  74. try
  75. {
  76. ICSFACTORYDAL.deleteInfo(codeList, dsconn);
  77. }
  78. catch (Exception ex)
  79. {
  80. throw ex;
  81. }
  82. }
  83. #endregion
  84. #region 查询最大的工厂代码
  85. public static string SearchMaxCode(string dsconn)
  86. {
  87. return ICSFACTORYDAL.SearchMaxCode(dsconn);
  88. }
  89. #endregion
  90. }
  91. }