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

34 lines
911 B

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.Base.Config.AppConfig;
  7. using System.Data;
  8. using System.Data.Sql;
  9. using System.Data.Linq;
  10. namespace ICSSoft.Frame.Data.DAL
  11. {
  12. public class ICSAgentDAL
  13. {
  14. #region AddandEdit
  15. public static void AddandEdit(AgentLogs ItemLot, string Appconstr)
  16. {
  17. FramDataContext db = new FramDataContext(Appconstr);
  18. db.Connection.Open();
  19. db.Transaction = db.Connection.BeginTransaction();
  20. try
  21. {
  22. db.AgentLogs.InsertOnSubmit(ItemLot);
  23. db.SubmitChanges();
  24. db.Transaction.Commit();
  25. }
  26. catch (Exception ex)
  27. {
  28. db.Transaction.Rollback();
  29. throw ex;
  30. }
  31. }
  32. #endregion
  33. }
  34. }