public Content Add(Content _model) { _Repository.Add(_model); LogAction entity = new LogAction(); entity.action = "Thêm mới nội dung: <a href=\"" + _model.alias + "\" target=\"_blank\">" + _model.name + "</a>"; entity.browser = ""; entity.ipAddress = ""; entity.userAction = _model.createUser; entity.createTime = DateTime.Now; _RepositoryLogAction.Add(entity); return(_model); }
public void RegisterAudit(EnumPermision permision, EnumObjectType scopeType, string callMethod, string parametersMethod) { var data = callMethod + " | " + parametersMethod; var logAction = new LogAction(permision.ToString(), scopeType.ToString(), data); _logActionRepository.Add(logAction); }
public LienKetWeb Add(LienKetWeb _model, string _userName) { try { LogAction entity = new LogAction(); entity.action = "Thêm LienKetWeb: <a href=\"" + _model.lienKetWebId + "\" target=\"_blank\">" + _model.lienKetWebName + "</a>"; entity.browser = ""; entity.ipAddress = ""; entity.userAction = _userName; entity.createTime = DateTime.Now; _RepositoryLogAction.Add(entity); } catch { } return(_Repository.Add(_model)); }
public Option Add(Option _model, string _userName) { try { LogAction entity = new LogAction(); entity.action = "Thêm option: <a href=\"" + _model.contentId + "\" target=\"_blank\">" + _model.contentId + "</a>"; entity.browser = ""; entity.ipAddress = ""; entity.userAction = _userName; entity.createTime = DateTime.Now; _RepositoryLogAction.Add(entity); } catch { } return(_Repository.Add(_model)); }
public Menu Add(Menu _model, string _userName) { return(_Repository.Add(_model)); try { LogAction entity = new LogAction(); entity.action = "Thêm danh mục: <a href=\"" + _model.menuLink + "\" target=\"_blank\">" + _model.menuName + "</a>"; entity.browser = ""; entity.ipAddress = ""; entity.userAction = _userName; entity.createTime = DateTime.Now; _RepositoryLogAction.Add(entity); } catch { } }
public long InsertUpdate(LogAction logAction) { long Id = 0; try { _ILogActionRepository.Add(logAction); _ILogActionRepository.Save(); } catch (Exception) { throw; } return(Id); }
public LogAction Add(LogAction _model) { return(_Repository.Add(_model)); }