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

71 lines
2.0 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.DAL;
  7. using ICSSoft.Frame.Data.Entity;
  8. namespace ICSSoft.Frame.Data.BLL
  9. {
  10. public class ICSMaterialPickBLL
  11. {
  12. public static void Start(string Appconstr, ICSLOTSIMULATION simulation)
  13. {
  14. FramDataContext db = new FramDataContext(Appconstr);
  15. db.Connection.Open();
  16. db.Transaction = db.Connection.BeginTransaction();
  17. try
  18. {
  19. if (string.IsNullOrWhiteSpace(Appconstr))
  20. throw new Exception("连接字符串不能为空!");
  21. //校验传入数据是否符合采集要求
  22. ICSMaterialPickDAL.CheckInfo(db, simulation);
  23. //保存数据
  24. ICSMaterialPickDAL.SaveStart(db, simulation);
  25. db.SubmitChanges();
  26. db.Transaction.Commit();
  27. db.Connection.Close();
  28. }
  29. catch (Exception ex)
  30. {
  31. db.Transaction.Rollback();
  32. db.Connection.Close();
  33. throw ex;
  34. }
  35. }
  36. #region 根据工单查询子件机汇总信息
  37. public static DataSet select(String MOCode, String TransNO, String Appconstr)
  38. {
  39. try
  40. {
  41. return ICSMaterialPickDAL.select(MOCode, TransNO, Appconstr);
  42. }
  43. catch (Exception ex)
  44. {
  45. throw new Exception(ex.Message);
  46. }
  47. }
  48. #endregion
  49. #region 根据工单查询拣料表信息
  50. public static DataSet GetGauge(String MOCode, String Appconstr)
  51. {
  52. try
  53. {
  54. return ICSMaterialPickDAL.GetGauge(MOCode, Appconstr);
  55. }
  56. catch (Exception ex)
  57. {
  58. throw new Exception(ex.Message);
  59. }
  60. }
  61. #endregion
  62. }
  63. }