华恒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.

98 lines
2.4 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. using ICSSoft.Frame.APP.Entity;
  9. namespace ICSSoft.Frame.Data.BLL
  10. {
  11. public class ICSItemOPPriceBLL
  12. {
  13. #region 新增和修改
  14. public static void Add(ICSItemOPPrice Info, string dsconn)
  15. {
  16. try
  17. {
  18. if (string.IsNullOrWhiteSpace(dsconn))
  19. {
  20. throw new Exception("数据库连接字符串错误");
  21. }
  22. List<ICSItemOPPrice> InfoList = new List<ICSItemOPPrice>() { Info };
  23. ICSItemOPPriceDAL.Add(InfoList, dsconn);
  24. }
  25. catch (Exception ex)
  26. {
  27. throw ex;
  28. }
  29. }
  30. #endregion
  31. #region 新增和修改List
  32. public static string AddList(List<ICSItemOPPrice> InfoList, string dsconn)
  33. {
  34. try
  35. {
  36. if (string.IsNullOrWhiteSpace(dsconn))
  37. {
  38. throw new Exception("数据库连接字符串错误");
  39. }
  40. ICSItemOPPriceDAL.Add(InfoList, dsconn);
  41. return "";
  42. }
  43. catch (Exception ex)
  44. {
  45. throw ex;
  46. }
  47. }
  48. #endregion
  49. #region 通过ID查询
  50. public static DataTable searchInfoByID(string ID, string dsconn)
  51. {
  52. try
  53. {
  54. return ICSItemOPPriceDAL.searchInfoByID(ID, dsconn);
  55. }
  56. catch (Exception ex)
  57. {
  58. throw ex;
  59. }
  60. }
  61. #endregion
  62. #region 是否存在
  63. public static bool IsIncluding(string ItemCode, string OPCode, string eqptype, string dsconn)
  64. {
  65. try
  66. {
  67. return ICSItemOPPriceDAL.IsIncluding(ItemCode, OPCode, eqptype, dsconn);
  68. }
  69. catch (Exception ex)
  70. {
  71. throw ex;
  72. }
  73. }
  74. #endregion
  75. #region 删除
  76. public static void deleteInfo(List<string> codeList, string dsconn)
  77. {
  78. try
  79. {
  80. ICSItemOPPriceDAL.deleteInfo(codeList, dsconn);
  81. }
  82. catch (Exception ex)
  83. {
  84. throw ex;
  85. }
  86. }
  87. #endregion
  88. }
  89. }