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

68 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. namespace ICSSoft.Frame.Data.BLL
  8. {
  9. public class ICSOPBOMDETAILBLL
  10. {
  11. private FramDataContext _domainDataProvider = null;
  12. public ICSOPBOMDETAILBLL(FramDataContext domainDataProvider)
  13. {
  14. this._domainDataProvider = domainDataProvider;
  15. }
  16. public static void Add(ICSOPBOMDETAIL typeInfo, string dsconn)
  17. {
  18. try
  19. {
  20. if (string.IsNullOrWhiteSpace(dsconn))
  21. {
  22. throw new Exception("数据库连接字符串错误");
  23. }
  24. List<ICSOPBOMDETAIL> typeInfoList = new List<ICSOPBOMDETAIL>() { typeInfo };
  25. ICSOPBOMDETAILDAL.Add(typeInfoList, dsconn);
  26. }
  27. catch (Exception ex)
  28. {
  29. throw ex;
  30. }
  31. }
  32. public static void deleteInfo(string dsconn, List<string> codeList)
  33. {
  34. ICSOPBOMDETAILDAL.deleteInfo(dsconn, codeList);
  35. }
  36. public List<ICSOPBOMDETAIL> QueryOPBOMDetail(string itemCode, string OPID, string BOMCode, string BOMVersion, string routeCode, string OPCode, int actiontype)
  37. {
  38. ICSOPBOMDETAILDAL dal = new ICSOPBOMDETAILDAL(_domainDataProvider);
  39. return dal.QueryOPBOMDetail(itemCode, OPID, BOMCode, BOMVersion, routeCode, OPCode, actiontype, false);
  40. }
  41. public List<ICSOPBOMDETAIL> QueryOPBOMDetail(string itemCode, string OPID, string BOMCode, string BOMVersion, string routeCode, string OPCode, int actiontype, bool onlyValid)
  42. {
  43. ICSOPBOMDETAILDAL dal = new ICSOPBOMDETAILDAL(_domainDataProvider);
  44. return dal.QueryOPBOMDetail(itemCode, OPID, BOMCode, BOMVersion, routeCode, OPCode, actiontype, onlyValid);
  45. }
  46. public List<ICSOPBOMDETAIL> GetOPBOMDetails(string moCode, string routeCode, string opCode, bool check, bool onlyValid)
  47. {
  48. ICSOPBOMDETAILDAL dal = new ICSOPBOMDETAILDAL(_domainDataProvider);
  49. return dal.GetOPBOMDetails(moCode, routeCode, opCode, check, onlyValid);
  50. }
  51. public List<ICSOPBOMDETAIL> QueryOPBOMDetail(string itemCode, string mCode, string OPID, string BOMCode, string BOMVersion, string routeCode, string OPCode, int actiontype, bool onlyValid)
  52. {
  53. ICSOPBOMDETAILDAL dal = new ICSOPBOMDETAILDAL(_domainDataProvider);
  54. return dal.QueryOPBOMDetail(itemCode, mCode, OPID, BOMCode, BOMVersion, routeCode, OPCode, actiontype, onlyValid);
  55. }
  56. }
  57. }