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

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