public void LogJournalTransaction(oJournal obj, bool isPosted, string action, string origin, ErrorLog errLog = null) { try { log.TransactionNo = obj.TransId.ToString(); log.Origin = origin; log.Type = TransactionLog.SBOType.JE; log.LogDate = DateTime.Now; log.IsPosted = isPosted; TransactionData rawData = new TransactionData(); rawData.PostedOn = obj.DocDate; rawData.RawData = JsonConvert.SerializeObject(obj); log.RawData = rawData; log.Action = action; log.CreatedBy = obj.CreatedBy; log.CreatedOn = obj.CreateDate; repo.AddOrUpdate(log); } catch (Exception ex) { throw new Exception(ex.Message); } }
public void LogJournalTransaction(oJournal obj, bool isPosted, ErrorLog errLog = null) { try { log.TransactionNo = obj.TransId.ToString(); log.Origin = string.Format("{0}-{1}", HttpContext.Current.Request.UserHostAddress, HttpContext.Current.Request.UserHostName); log.Type = TransactionLog.SBOType.JE; log.LogDate = DateTime.Now; log.IsPosted = isPosted; log.TransactionDataID = obj.TransId; log.RawData.PostedOn = obj.DocDate; log.RawData.RawData = JsonConvert.SerializeObject(obj); repo.AddOrUpdate(log); } catch (Exception ex) { throw new Exception(ex.Message); } }