LogHelper.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using BizCom;
  2. using System;
  3. namespace SiteCore
  4. {
  5. class LogHelper
  6. {
  7. public static void addLog(string ctid, int userid, string con, int orderState = 0, int aftersaleState = 0)
  8. {
  9. CeErpTradeLog log = new CeErpTradeLog();
  10. log.tid = ctid;
  11. log.UserId = userid;
  12. log.Con = con;
  13. log.OrderState = orderState;
  14. log.AfterSaleState = aftersaleState;
  15. log.OperateTime = DateTime.Now;
  16. log.Create();
  17. }
  18. public static void addDesignerBillLog(string ctid, int userid, string con, string username, int orderState = 0)
  19. {
  20. CeErpDesignerBillLog log = new CeErpDesignerBillLog();
  21. log.tid = ctid;
  22. log.uId = userid;
  23. log.cont = con;
  24. log.orderState = orderState;
  25. log.userName = username;
  26. log.create_time = DateTime.Now;
  27. log.Create();
  28. }
  29. public static void addSupplierLog(int uId, string uName, string oldCon, string newCon)
  30. {
  31. SupplierLog log = new SupplierLog();
  32. log.UserID = uId;
  33. log.UserName = uName;
  34. log.OldContent = oldCon;
  35. log.NewContent = newCon;
  36. log.ModifyTime = DateTime.Now;
  37. log.Create();
  38. }
  39. public static void AddAfterSaleLog(string ctid, int reasonId, string con, int userId, int type = 0, string reason = "", string img = "")
  40. {
  41. CeErpTradeAfterSaleLog log = new CeErpTradeAfterSaleLog();
  42. log.UserId = userId;
  43. log.ResponsibleId = reasonId;
  44. log.tid = ctid;
  45. log.Con = con;
  46. log.Type = type;
  47. log.AfterSaleBackImg = img;
  48. log.createdTime = DateTime.Now;
  49. log.Create();
  50. }
  51. }
  52. }