using BizCom; using System; namespace SiteCore { class LogHelper { public static void addLog(string ctid, int userid, string con, int orderState = 0, int aftersaleState = 0) { CeErpTradeLog log = new CeErpTradeLog(); log.tid = ctid; log.UserId = userid; log.Con = con; log.OrderState = orderState; log.AfterSaleState = aftersaleState; log.OperateTime = DateTime.Now; log.Create(); } public static void addDesignerBillLog(string ctid, int userid, string con, string username, int orderState = 0) { CeErpDesignerBillLog log = new CeErpDesignerBillLog(); log.tid = ctid; log.uId = userid; log.cont = con; log.orderState = orderState; log.userName = username; log.create_time = DateTime.Now; log.Create(); } public static void addSupplierLog(int uId, string uName, string oldCon, string newCon) { SupplierLog log = new SupplierLog(); log.UserID = uId; log.UserName = uName; log.OldContent = oldCon; log.NewContent = newCon; log.ModifyTime = DateTime.Now; log.Create(); } public static void AddAfterSaleLog(string ctid, int reasonId, string con, int userId, int type = 0, string reason = "", string img = "") { CeErpTradeAfterSaleLog log = new CeErpTradeAfterSaleLog(); log.UserId = userId; log.ResponsibleId = reasonId; log.tid = ctid; log.Con = con; log.Type = type; log.AfterSaleBackReason = reason; log.AfterSaleBackImg = img; log.createdTime = DateTime.Now; log.Create(); } } }