示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 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));
 }
示例#4
0
 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));
 }
示例#5
0
        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
            {
            }
        }
示例#6
0
        public long InsertUpdate(LogAction logAction)
        {
            long Id = 0;

            try
            {
                _ILogActionRepository.Add(logAction);
                _ILogActionRepository.Save();
            }
            catch (Exception)
            {
                throw;
            }
            return(Id);
        }
示例#7
0
 public LogAction Add(LogAction _model)
 {
     return(_Repository.Add(_model));
 }